Class BlockLootTableProvider.WithConditionsBuilder<T>
java.lang.Object
net.neoforged.neoforge.common.conditions.WithConditions.Builder<T>
com.github.minecraftschurlimods.bibliocraft.api.datagen.BlockLootTableProvider.WithConditionsBuilder<T>
- Type Parameters:
T- The wrapped builder's type.
- Enclosing class:
BlockLootTableProvider
public static class BlockLootTableProvider.WithConditionsBuilder<T>
extends net.neoforged.neoforge.common.conditions.WithConditions.Builder<T>
A variant of
WithConditions.Builder that has a map operation and does no validation on whether there are actually conditions added to the builder.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newBlockLootTableProvider.WithConditionsBuilderusing the provided existing list of conditions.WithConditionsBuilder(List<net.neoforged.neoforge.common.conditions.ICondition> conditions) Constructs a newBlockLootTableProvider.WithConditionsBuilderusing the provided existing list of conditions. -
Method Summary
Modifier and TypeMethodDescriptionaddCondition(Collection<net.neoforged.neoforge.common.conditions.ICondition> conditions) Adds a condition to the builder.addCondition(net.neoforged.neoforge.common.conditions.ICondition... conditions) Adds one or multiple conditions to the builder.net.neoforged.neoforge.common.conditions.WithConditions<T> build()Transforms thisWithConditionsBuilder<T>to aWithConditionsBuilder<N>using the provided mapper.withCarrier(T carrier) Sets the carrier of the conditions, i.e.
-
Constructor Details
-
WithConditionsBuilder
Constructs a newBlockLootTableProvider.WithConditionsBuilderusing the provided existing list of conditions.- Parameters:
conditions- The existing list of conditions to use.
-
WithConditionsBuilder
public WithConditionsBuilder()Constructs a newBlockLootTableProvider.WithConditionsBuilderusing the provided existing list of conditions.
-
-
Method Details
-
map
Transforms thisWithConditionsBuilder<T>to aWithConditionsBuilder<N>using the provided mapper.- Type Parameters:
N- The new generic type of theBlockLootTableProvider.WithConditionsBuilder.- Parameters:
mapper- The function to use for transforming.- Returns:
- A transformed variant of this
BlockLootTableProvider.WithConditionsBuilder.
-
addCondition
public BlockLootTableProvider.WithConditionsBuilder<T> addCondition(Collection<net.neoforged.neoforge.common.conditions.ICondition> conditions) Adds a condition to the builder.- Overrides:
addConditionin classnet.neoforged.neoforge.common.conditions.WithConditions.Builder<T>- Parameters:
conditions- The condition to add to the builder.- Returns:
- This builder, for chaining.
-
addCondition
public BlockLootTableProvider.WithConditionsBuilder<T> addCondition(net.neoforged.neoforge.common.conditions.ICondition... conditions) Adds one or multiple conditions to the builder.- Overrides:
addConditionin classnet.neoforged.neoforge.common.conditions.WithConditions.Builder<T>- Parameters:
conditions- The condition(s) to add to the builder.- Returns:
- This builder, for chaining.
-
withCarrier
Sets the carrier of the conditions, i.e. the underlying object the conditions will be applied to.- Overrides:
withCarrierin classnet.neoforged.neoforge.common.conditions.WithConditions.Builder<T>- Parameters:
carrier- The carrier to set.- Returns:
- This builder, for chaining.
-
build
- Overrides:
buildin classnet.neoforged.neoforge.common.conditions.WithConditions.Builder<T>- Returns:
- A
WithConditionsconstructed from this builder.
-