Record Class SimpleModelWrapper
java.lang.Object
java.lang.Record
net.minecraft.client.resources.model.SimpleModelWrapper
- All Implemented Interfaces:
BlockStateModelPart, BlockStateModelPartExtension
public record SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, Material.Baked particleMaterial)
extends Record
implements BlockStateModelPart
-
Nested Class Summary
Nested classes/interfaces inherited from interface BlockStateModelPart
BlockStateModelPart.Unbaked -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate final Material.BakedThe field for theparticleMaterialrecord component.private final QuadCollectionThe field for thequadsrecord component.private final booleanThe field for theuseAmbientOcclusionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, Material.Baked particleMaterial) Creates an instance of aSimpleModelWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockStateModelPartbake(ModelBaker modelBakery, ResolvedModel model, ModelState state) static BlockStateModelPartbake(ModelBaker modelBakery, Identifier location, ModelState state) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theparticleMaterialrecord component.quads()Returns the value of thequadsrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseAmbientOcclusionrecord component.Methods inherited from interface BlockStateModelPartExtension
ambientOcclusion
-
Field Details
-
quads
The field for thequadsrecord component. -
useAmbientOcclusion
private final boolean useAmbientOcclusionThe field for theuseAmbientOcclusionrecord component. -
particleMaterial
The field for theparticleMaterialrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
SimpleModelWrapper
public SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, Material.Baked particleMaterial) Creates an instance of aSimpleModelWrapperrecord class.- Parameters:
quads- the value for thequadsrecord componentuseAmbientOcclusion- the value for theuseAmbientOcclusionrecord componentparticleMaterial- the value for theparticleMaterialrecord component
-
-
Method Details
-
bake
public static BlockStateModelPart bake(ModelBaker modelBakery, Identifier location, ModelState state) -
bake
public static BlockStateModelPart bake(ModelBaker modelBakery, ResolvedModel model, ModelState state) -
getQuads
- Specified by:
getQuadsin interfaceBlockStateModelPart
-
materialFlags
public int materialFlags()- Specified by:
materialFlagsin interfaceBlockStateModelPart
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
quads
Returns the value of thequadsrecord component.- Returns:
- the value of the
quadsrecord component
-
useAmbientOcclusion
public boolean useAmbientOcclusion()Returns the value of theuseAmbientOcclusionrecord component.- Specified by:
useAmbientOcclusionin interfaceBlockStateModelPart- Returns:
- the value of the
useAmbientOcclusionrecord component
-
particleMaterial
Returns the value of theparticleMaterialrecord component.- Specified by:
particleMaterialin interfaceBlockStateModelPart- Returns:
- the value of the
particleMaterialrecord component
-