Class VariantBlockStateBuilder

java.lang.Object
net.minecraftforge.client.model.generators.VariantBlockStateBuilder
All Implemented Interfaces:
IGeneratedBlockstate

public class VariantBlockStateBuilder extends Object implements IGeneratedBlockstate
Builder for variant-type blockstates, i.e. non-multipart blockstates. Should not be manually instantiated, instead use BlockStateProvider.getVariantBuilder(Block).

Variants can either be set via setModels(PartialBlockstate, ConfiguredModel...) or addModels(PartialBlockstate, ConfiguredModel...), where model(s) can be assigned directly to partial states, or builder style via partialState() and its subsequent methods.

This class also provides the convenience methods forAllStates(Function) and forAllStatesExcept(Function, Property...) for cases where the model for each variant can be decided dynamically based on the state's property values.

See Also: