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 aSMDRenderingHandlerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddScreenButtons(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 booleanIndicates whether some other object is "equal to" this one.protected floatgetFlipDegrees(NPC npc) final inthashCode()Returns a hash code value for this object.booleanisEntityUpsideDown(net.minecraft.world.entity.LivingEntity entity) protected booleanmodels()Returns the value of themodelsrecord component.voidrender(NPC npc, float yaw, float partialTicks, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, int packedLight) protected voidsetupRotations(NPC npc, com.mojang.blaze3d.vertex.PoseStack poseStack, float bob, float yBodyRotation, float partialTicks) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.pixelmonmod.pixelmon.api.model.RenderingHandler
tick
-
Field Details
-
CODEC
-
-
Constructor Details
-
SMDRenderingHandler
Creates an instance of aSMDRenderingHandlerrecord class.- Parameters:
models- the value for themodelsrecord component
-
-
Method Details
-
copy
- Specified by:
copyin interfaceRenderingHandler
-
codec
- Specified by:
codecin interfaceRenderingHandler
-
addScreenButtons
public void addScreenButtons(NPC npc, net.minecraft.client.gui.Font font, net.minecraft.client.gui.layouts.GridLayout.RowHelper rowHelper) - Specified by:
addScreenButtonsin 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:
renderin 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 themodelsrecord component.- Returns:
- the value of the
modelsrecord component
-