java.lang.Object
net.neoforged.neoforge.client.model.generators.blockstate.UnbakedMutator

public final class UnbakedMutator extends Object
Implements functionality similar to Vanillas VariantMutator, but generalized to unbaked blockstate models in general.

This is used in conjunction with PropertyDispatch.modifyUnbaked(net.minecraft.world.level.block.state.properties.Property<T1>) and MultiVariantGenerator.withUnbaked(net.minecraft.client.data.models.blockstates.PropertyDispatch<net.neoforged.neoforge.client.model.generators.blockstate.UnbakedMutator>) to modify arbitrary properties of custom unbaked blockstate models during datagen based on blockstate properties.

Note that an unbaked mutator must declare handlers for all types of unbaked models that it expects to be applied to. If it finds a type of unbaked model in the blockstate definition that it cannot handle it will throw an exception to avoid silently ignoring property modifications.

  • Field Details

  • Constructor Details

  • Method Details

    • apply

      public <T extends net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked> T apply(T unbaked)
    • getHandler

      @Nullable private <T extends net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked> @Nullable UnbakedMutator.Handler<T> getHandler(T unbaked)
    • builder

      public static UnbakedMutator.Builder builder()