Record Class SimpleModelWrapper
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.SimpleModelWrapper
- All Implemented Interfaces:
BlockModelPart, BlockModelPartExtension
public record SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, Material.Baked particleMaterial, boolean hasTranslucency)
extends Record
implements BlockModelPart
-
Nested Class Summary
Nested classes/interfaces inherited from interface BlockModelPart
BlockModelPart.Unbaked -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for thehasTranslucencyrecord component.private 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, boolean hasTranslucency) Creates an instance of aSimpleModelWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockModelPartbake(ModelBaker modelBakery, ResolvedModel model, ModelState state) static BlockModelPartbake(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.booleanReturns the value of thehasTranslucencyrecord component.Returns 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 BlockModelPartExtension
ambientOcclusion
-
Field Details
-
quads
The field for thequadsrecord component. -
useAmbientOcclusion
private final boolean useAmbientOcclusionThe field for theuseAmbientOcclusionrecord component. -
particleMaterial
The field for theparticleMaterialrecord component. -
hasTranslucency
private final boolean hasTranslucencyThe field for thehasTranslucencyrecord component. -
LOGGER
private static final org.slf4j.Logger LOGGER
-
-
Constructor Details
-
SimpleModelWrapper
public SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, Material.Baked particleMaterial, boolean hasTranslucency) Creates an instance of aSimpleModelWrapperrecord class.- Parameters:
quads- the value for thequadsrecord componentuseAmbientOcclusion- the value for theuseAmbientOcclusionrecord componentparticleMaterial- the value for theparticleMaterialrecord componenthasTranslucency- the value for thehasTranslucencyrecord component
-
-
Method Details
-
bake
-
bake
-
getQuads
- Specified by:
getQuadsin interfaceBlockModelPart
-
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 interfaceBlockModelPart- Returns:
- the value of the
useAmbientOcclusionrecord component
-
particleMaterial
Returns the value of theparticleMaterialrecord component.- Specified by:
particleMaterialin interfaceBlockModelPart- Returns:
- the value of the
particleMaterialrecord component
-
hasTranslucency
public boolean hasTranslucency()Returns the value of thehasTranslucencyrecord component.- Specified by:
hasTranslucencyin interfaceBlockModelPart- Returns:
- the value of the
hasTranslucencyrecord component
-