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, TextureAtlasSprite particleIcon, @Nullable RenderType renderType)
extends Record
implements BlockModelPart
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.renderer.block.model.BlockModelPart
BlockModelPart.Unbaked
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TextureAtlasSprite
The field for theparticleIcon
record component.private final QuadCollection
The field for thequads
record component.private final RenderType
The field for therenderType
record component.private final boolean
The field for theuseAmbientOcclusion
record component. -
Constructor Summary
ConstructorsConstructorDescriptionSimpleModelWrapper
(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon) Deprecated.SimpleModelWrapper
(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon, RenderType renderType) Creates an instance of aSimpleModelWrapper
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleModelWrapper
bake
(ModelBaker p_405335_, ResolvedModel resolvedmodel, ModelState p_405869_) static SimpleModelWrapper
bake
(ModelBaker p_405335_, ResourceLocation p_405098_, ModelState p_405869_) final boolean
Indicates whether some other object is "equal to" this one.getRenderType
(BlockState state) Gets the set ofrender types
to use when drawing this block in the level.final int
hashCode()
Returns a hash code value for this object.Returns the value of theparticleIcon
record component.quads()
Returns the value of thequads
record component.Returns the value of therenderType
record component.final String
toString()
Returns a string representation of this record class.boolean
Returns the value of theuseAmbientOcclusion
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.client.extensions.BlockModelPartExtension
ambientOcclusion
-
Field Details
-
quads
The field for thequads
record component. -
useAmbientOcclusion
private final boolean useAmbientOcclusionThe field for theuseAmbientOcclusion
record component. -
particleIcon
The field for theparticleIcon
record component. -
renderType
The field for therenderType
record component.
-
-
Constructor Details
-
SimpleModelWrapper
@Deprecated public SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon) Deprecated. -
SimpleModelWrapper
public SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon, @Nullable RenderType renderType) Creates an instance of aSimpleModelWrapper
record class.- Parameters:
quads
- the value for thequads
record componentuseAmbientOcclusion
- the value for theuseAmbientOcclusion
record componentparticleIcon
- the value for theparticleIcon
record componentrenderType
- the value for therenderType
record component
-
-
Method Details
-
bake
public static SimpleModelWrapper bake(ModelBaker p_405335_, ResourceLocation p_405098_, ModelState p_405869_) -
bake
public static SimpleModelWrapper bake(ModelBaker p_405335_, ResolvedModel resolvedmodel, ModelState p_405869_) -
getQuads
- Specified by:
getQuads
in interfaceBlockModelPart
-
getRenderType
Description copied from interface:BlockModelPartExtension
Gets the set ofrender types
to use when drawing this block in the level. Supported types are those returned byRenderType.chunkBufferLayers()
.By default, defers query to
ItemBlockRenderTypes
.- Specified by:
getRenderType
in interfaceBlockModelPartExtension
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
quads
Returns the value of thequads
record component.- Returns:
- the value of the
quads
record component
-
useAmbientOcclusion
public boolean useAmbientOcclusion()Returns the value of theuseAmbientOcclusion
record component.- Specified by:
useAmbientOcclusion
in interfaceBlockModelPart
- Returns:
- the value of the
useAmbientOcclusion
record component
-
particleIcon
Returns the value of theparticleIcon
record component.- Specified by:
particleIcon
in interfaceBlockModelPart
- Returns:
- the value of the
particleIcon
record component
-
renderType
Returns the value of therenderType
record component.- Returns:
- the value of the
renderType
record component
-