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 ChunkSectionLayer 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 TextureAtlasSpriteThe field for theparticleIconrecord component.private final QuadCollectionThe field for thequadsrecord component.private final ChunkSectionLayerThe field for therenderTyperecord component.private final booleanThe field for theuseAmbientOcclusionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon) Deprecated.SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon, ChunkSectionLayer renderType) Creates an instance of aSimpleModelWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SimpleModelWrapperbake(ModelBaker p_405335_, ResolvedModel resolvedmodel, ModelState p_405869_) static SimpleModelWrapperbake(ModelBaker pBaker, ResourceLocation pModelLocation, ModelState pModelState) final booleanIndicates whether some other object is "equal to" this one.getRenderType(BlockState state) Get the setChunkSectionLayerto use when drawing this block in the level.final inthashCode()Returns a hash code value for this object.Returns the value of theparticleIconrecord component.quads()Returns the value of thequadsrecord component.Returns the value of therenderTyperecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theuseAmbientOcclusionrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.client.extensions.BlockModelPartExtension
ambientOcclusion
-
Field Details
-
quads
The field for thequadsrecord component. -
useAmbientOcclusion
private final boolean useAmbientOcclusionThe field for theuseAmbientOcclusionrecord component. -
particleIcon
The field for theparticleIconrecord component. -
renderType
The field for therenderTyperecord component.
-
-
Constructor Details
-
SimpleModelWrapper
@Deprecated public SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon) Deprecated. -
SimpleModelWrapper
public SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, TextureAtlasSprite particleIcon, @Nullable ChunkSectionLayer renderType) Creates an instance of aSimpleModelWrapperrecord class.- Parameters:
quads- the value for thequadsrecord componentuseAmbientOcclusion- the value for theuseAmbientOcclusionrecord componentparticleIcon- the value for theparticleIconrecord componentrenderType- the value for therenderTyperecord component
-
-
Method Details
-
bake
public static SimpleModelWrapper bake(ModelBaker pBaker, ResourceLocation pModelLocation, ModelState pModelState) -
bake
public static SimpleModelWrapper bake(ModelBaker p_405335_, ResolvedModel resolvedmodel, ModelState p_405869_) -
getQuads
- Specified by:
getQuadsin interfaceBlockModelPart
-
getRenderType
Description copied from interface:BlockModelPartExtensionGet the setChunkSectionLayerto use when drawing this block in the level.By default, defers query to
ItemBlockRenderTypes.- Specified by:
getRenderTypein 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 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
-
particleIcon
Returns the value of theparticleIconrecord component.- Specified by:
particleIconin interfaceBlockModelPart- Returns:
- the value of the
particleIconrecord component
-
renderType
Returns the value of therenderTyperecord component.- Returns:
- the value of the
renderTyperecord component
-