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 Details

    • WithConditionsBuilder

      public WithConditionsBuilder(List<net.neoforged.neoforge.common.conditions.ICondition> conditions)
      Constructs a new BlockLootTableProvider.WithConditionsBuilder using the provided existing list of conditions.
      Parameters:
      conditions - The existing list of conditions to use.
    • WithConditionsBuilder

      public WithConditionsBuilder()
      Constructs a new BlockLootTableProvider.WithConditionsBuilder using the provided existing list of conditions.
  • Method Details

    • map

      Transforms this WithConditionsBuilder<T> to a WithConditionsBuilder<N> using the provided mapper.
      Type Parameters:
      N - The new generic type of the BlockLootTableProvider.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:
      addCondition in class net.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:
      addCondition in class net.neoforged.neoforge.common.conditions.WithConditions.Builder<T>
      Parameters:
      conditions - The condition(s) to add to the builder.
      Returns:
      This builder, for chaining.
    • withCarrier

      public BlockLootTableProvider.WithConditionsBuilder<T> withCarrier(T carrier)
      Sets the carrier of the conditions, i.e. the underlying object the conditions will be applied to.
      Overrides:
      withCarrier in class net.neoforged.neoforge.common.conditions.WithConditions.Builder<T>
      Parameters:
      carrier - The carrier to set.
      Returns:
      This builder, for chaining.
    • build

      public net.neoforged.neoforge.common.conditions.WithConditions<T> build()
      Overrides:
      build in class net.neoforged.neoforge.common.conditions.WithConditions.Builder<T>
      Returns:
      A WithConditions constructed from this builder.