Record Class BlockStateModelDispatcher
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.dispatch.BlockStateModelDispatcher
public record BlockStateModelDispatcher(Optional<BlockStateModelDispatcher.SimpleModelSelectors> simpleModels, Optional<BlockStateModelDispatcher.MultiPartDefinition> multiPart, Optional<CustomBlockModelDefinition> customDefinition)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BlockStateModelDispatcher> private final Optional<CustomBlockModelDefinition> The field for thecustomDefinitionrecord component.private static final org.slf4j.Loggerprivate final Optional<BlockStateModelDispatcher.MultiPartDefinition> The field for themultiPartrecord component.private final Optional<BlockStateModelDispatcher.SimpleModelSelectors> The field for thesimpleModelsrecord component.static final MapCodec<BlockStateModelDispatcher> -
Constructor Summary
ConstructorsConstructorDescriptionBlockStateModelDispatcher(Optional<BlockStateModelDispatcher.SimpleModelSelectors> simpleModels, Optional<BlockStateModelDispatcher.MultiPartDefinition> multiPart) BlockStateModelDispatcher(Optional<BlockStateModelDispatcher.SimpleModelSelectors> simpleModels, Optional<BlockStateModelDispatcher.MultiPartDefinition> multiPart, Optional<CustomBlockModelDefinition> customDefinition) Creates an instance of aBlockStateModelDispatcherrecord class.BlockStateModelDispatcher(CustomBlockModelDefinition customDefinition) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecustomDefinitionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.instantiate(StateDefinition<Block, BlockState> stateDefinition, Supplier<String> source) instantiateVanilla(StateDefinition<Block, BlockState> stateDefinition, Supplier<String> source) Returns the value of themultiPartrecord component.Returns the value of thesimpleModelsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
simpleModels
The field for thesimpleModelsrecord component. -
multiPart
The field for themultiPartrecord component. -
customDefinition
The field for thecustomDefinitionrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER -
VANILLA_CODEC
-
CODEC
-
-
Constructor Details
-
BlockStateModelDispatcher
public BlockStateModelDispatcher(Optional<BlockStateModelDispatcher.SimpleModelSelectors> simpleModels, Optional<BlockStateModelDispatcher.MultiPartDefinition> multiPart) -
BlockStateModelDispatcher
-
BlockStateModelDispatcher
public BlockStateModelDispatcher(Optional<BlockStateModelDispatcher.SimpleModelSelectors> simpleModels, Optional<BlockStateModelDispatcher.MultiPartDefinition> multiPart, Optional<CustomBlockModelDefinition> customDefinition) Creates an instance of aBlockStateModelDispatcherrecord class.- Parameters:
simpleModels- the value for thesimpleModelsrecord componentmultiPart- the value for themultiPartrecord componentcustomDefinition- the value for thecustomDefinitionrecord component
-
-
Method Details
-
instantiate
public Map<BlockState, BlockStateModel.UnbakedRoot> instantiate(StateDefinition<Block, BlockState> stateDefinition, Supplier<String> source) -
instantiateVanilla
public Map<BlockState, BlockStateModel.UnbakedRoot> instantiateVanilla(StateDefinition<Block, BlockState> stateDefinition, Supplier<String> source) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
simpleModels
Returns the value of thesimpleModelsrecord component.- Returns:
- the value of the
simpleModelsrecord component
-
multiPart
Returns the value of themultiPartrecord component.- Returns:
- the value of the
multiPartrecord component
-
customDefinition
Returns the value of thecustomDefinitionrecord component.- Returns:
- the value of the
customDefinitionrecord component
-