类 VariantBlockStateBuilder

java.lang.Object
net.minecraftforge.client.model.generators.VariantBlockStateBuilder
所有已实现的接口:
IGeneratedBlockState

@Deprecated(since="1.21.4", forRemoval=true) public class VariantBlockStateBuilder extends Object implements IGeneratedBlockState
已过时, 待删除: 此 API 元素将从以后的版本中删除。
Use Vanilla's providers ModelProvider
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.

另请参阅: