Record Class SimpleUnbakedGeometry
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.SimpleUnbakedGeometry
- All Implemented Interfaces:
UnbakedGeometry
,UnbakedGeometryExtension
,ExtendedUnbakedGeometry
public record SimpleUnbakedGeometry(List<BlockElement> elements)
extends Record
implements UnbakedGeometry, ExtendedUnbakedGeometry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<BlockElement> The field for theelements
record component.Fields inherited from interface net.minecraft.client.resources.model.UnbakedGeometry
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleUnbakedGeometry
(List<BlockElement> elements) Creates an instance of aSimpleUnbakedGeometry
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic QuadCollection
bake
(List<BlockElement> pElements, TextureSlots pTextureSlots, SpriteGetter pSprites, ModelState pModelState, ModelDebugName pDebugName) bake
(TextureSlots pTextureSlots, ModelBaker pBaker, ModelState pModelState, ModelDebugName pDebugName, ContextMap additionalProperties) Version ofUnbakedGeometry.bake(TextureSlots, ModelBaker, ModelState, ModelDebugName)
that also receives additional properties sourced fromUnbakedModelExtension.fillAdditionalProperties(net.minecraft.util.context.ContextMap.Builder)
.static BakedQuad
bakeFace
(BlockElement pElement, BlockElementFace pFace, TextureAtlasSprite pSprite, Direction pDirection, ModelState pModelState) elements()
Returns the value of theelements
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.client.model.ExtendedUnbakedGeometry
bake
-
Field Details
-
elements
The field for theelements
record component.
-
-
Constructor Details
-
SimpleUnbakedGeometry
Creates an instance of aSimpleUnbakedGeometry
record class.- Parameters:
elements
- the value for theelements
record component
-
-
Method Details
-
bake
public QuadCollection bake(TextureSlots pTextureSlots, ModelBaker pBaker, ModelState pModelState, ModelDebugName pDebugName, ContextMap additionalProperties) Description copied from interface:UnbakedGeometryExtension
Version ofUnbakedGeometry.bake(TextureSlots, ModelBaker, ModelState, ModelDebugName)
that also receives additional properties sourced fromUnbakedModelExtension.fillAdditionalProperties(net.minecraft.util.context.ContextMap.Builder)
.- Specified by:
bake
in interfaceExtendedUnbakedGeometry
- Specified by:
bake
in interfaceUnbakedGeometryExtension
-
bake
public static QuadCollection bake(List<BlockElement> pElements, TextureSlots pTextureSlots, SpriteGetter pSprites, ModelState pModelState, ModelDebugName pDebugName) -
bakeFace
public static BakedQuad bakeFace(BlockElement pElement, BlockElementFace pFace, TextureAtlasSprite pSprite, Direction pDirection, ModelState pModelState) -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
elements
Returns the value of theelements
record component.- Returns:
- the value of the
elements
record component
-