Record Class SMDRenderingHandler
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.model.type.SMDRenderingHandler
- Record Components:
models
- The models used
- All Implemented Interfaces:
RenderingHandler
public record SMDRenderingHandler(List<ModelData> models)
extends Record
implements RenderingHandler
Renders an SMD model, with the given texture, on the client
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SMDRenderingHandler>
-
Constructor Summary
ConstructorsConstructorDescriptionSMDRenderingHandler
(List<ModelData> models) Creates an instance of aSMDRenderingHandler
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addScreenButtons
(NPC npc, net.minecraft.client.gui.Font font, net.minecraft.client.gui.layouts.GridLayout.RowHelper rowHelper) com.mojang.serialization.Codec<? extends RenderingHandler>
codec()
copy()
final boolean
Indicates whether some other object is "equal to" this one.protected float
getFlipDegrees
(NPC npc) final int
hashCode()
Returns a hash code value for this object.boolean
isEntityUpsideDown
(net.minecraft.world.entity.LivingEntity entity) protected boolean
models()
Returns the value of themodels
record component.void
render
(NPC npc, float yaw, float partialTicks, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, int packedLight) protected void
setupRotations
(NPC npc, com.mojang.blaze3d.vertex.PoseStack poseStack, float bob, float yBodyRotation, float partialTicks) 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 com.pixelmonmod.pixelmon.api.model.RenderingHandler
tick
-
Field Details
-
CODEC
-
-
Constructor Details
-
SMDRenderingHandler
Creates an instance of aSMDRenderingHandler
record class.- Parameters:
models
- the value for themodels
record component
-
-
Method Details
-
copy
- Specified by:
copy
in interfaceRenderingHandler
-
codec
- Specified by:
codec
in interfaceRenderingHandler
-
addScreenButtons
public void addScreenButtons(NPC npc, net.minecraft.client.gui.Font font, net.minecraft.client.gui.layouts.GridLayout.RowHelper rowHelper) - Specified by:
addScreenButtons
in interfaceRenderingHandler
-
render
public void render(NPC npc, float yaw, float partialTicks, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, int packedLight) - Specified by:
render
in interfaceRenderingHandler
-
setupRotations
protected void setupRotations(NPC npc, com.mojang.blaze3d.vertex.PoseStack poseStack, float bob, float yBodyRotation, float partialTicks) -
isEntityUpsideDown
public boolean isEntityUpsideDown(net.minecraft.world.entity.LivingEntity entity) -
isShaking
-
getFlipDegrees
-
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)
. -
models
Returns the value of themodels
record component.- Returns:
- the value of the
models
record component
-