Builder to create a 'Not' condition.

The sub-condition added to a 'Not' condition will be passed through the equivalent of a NOT gate, effectively inverting the result of the query. This makes this loot condition effectively a clone of Inverted at the moment. This ensures a more coherent experience in case vanilla's behavior changes in the future, while also allowing the user to specify the logic gate directly.

A 'Not' condition requires a sub-condition 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.Not;

Implemented Interfaces

Link to implemented-interfaces

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

Link to g-

Name: withCondition

Sets the negated condition to the one 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 sub-condition.

This parameter is required.

Returns: This builder for chaining.
Return Type: Not

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

Link to g--1

Name: withCondition

Sets the loot condition to negate.

This parameter is required.

Returns: This builder for chaining.
Return Type: Not

ZenScript
Copy
Not.withCondition(condition as ILootCondition) as Not
ПараметрТипОписание
Параметр
condition
Тип
ILootCondition
Описание
The condition to negate.

Link to g--2

Name: withCondition

Creates and builds the sub-condition that will then be negated.

Returns: This builder for chaining.
Return Type: Not

ZenScript
Copy
Not.withCondition<T : ILootConditionTypeBuilder>(lender as Consumer<T>) as Not
ПараметрТипОписание
Параметр
lender
Тип
Consumer<T>
Описание
A consumer that allows configuration of the created condition.
Параметр
T
Тип
ILootConditionTypeBuilder
Описание
The known type of the condition itself.