Builder to create a 'Delegate' loot condition.

A delegate loot condition defers checking to another loot condition directly, effectively acting as a simple wrapper around the delegated condition. This allows other conditions that may have been built prior to the construction of this builder to be referenced and used directly.

A 'Delegate' loot condition requires a delegate to be built.

Импорт класса

Link to импорт-класса

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.Delegate;

Implemented Interfaces

Link to implemented-interfaces

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

Name: withDelegate

Sets the delegate to the loot condition created with the given LootConditionBuilder.

The builder must host a single loot condition. Builders with a different amount of conditions are not allowed. The builder will be used to generate a loot condition that will then be used as a delegate.

This parameter is required.

Returns: This builder for chaining.
Return Type: Delegate

ZenScript
Copy
Delegate.withDelegate(builder as LootConditionBuilder) as Delegate
ПараметрТипОписание
Параметр
конструктор
Тип
LootConditionBuilder
Описание
The builder to create a single ILootCondition.

Name: withDelegate

Sets the delegate loot condition.

This parameter is required.

Returns: This builder for chaining.
Return Type: Delegate

ZenScript
Copy
Delegate.withDelegate(other as ILootCondition) as Delegate
ПараметрТипОписание
Параметр
other
Тип
ILootCondition
Описание
The delegate loot condition.