LootTableIdRegex

Link to loottableidregex

Builder for a 'LootTableIdRegex' loot condition.

This condition will pass if and only if the ID of the loot table currently being queried matches the target regex.

While this condition is provided merely as a convenience, it is suggested not to rely on this condition only. Due to backwards compatibility, some loot tables may in fact lack an ID or have overlapping ones. Other conditions should be used instead.

The 'LootTableIdRegex' condition requires a regex to be built.

Importare la Classe

Link to importare-la-classe

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.loot.conditions.crafttweaker.LootTableIdRegex;

Interfacce Implementate

Link to interfacce-implementate

LootTableIdRegex implements the following interfaces. That means all methods defined in these interfaces are also available in LootTableIdRegex

Name: withRegex

Sets the regex of the loot table that should be targeted.

This parameter is required.

Returns: This builder for chaining.
Return Type: LootTableIdRegex

ZenScript
Copy
LootTableIdRegex.withRegex(regex as string) as LootTableIdRegex
ParametroTipoDescrizione
Parametro
regex
Tipo
string
Descrizione
The regex of the loot table to match.