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

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<SMDRenderingHandler>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a SMDRenderingHandler record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addScreenButtons(NPC npc, net.minecraft.client.gui.Font font, net.minecraft.client.gui.layouts.GridLayout.RowHelper rowHelper)
     
    com.mojang.serialization.Codec<? extends RenderingHandler>
     
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    protected float
     
    final int
    Returns a hash code value for this object.
    boolean
    isEntityUpsideDown(net.minecraft.world.entity.LivingEntity entity)
     
    protected boolean
     
    Returns the value of the models 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
    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

  • Constructor Details

    • SMDRenderingHandler

      public SMDRenderingHandler(List<ModelData> models)
      Creates an instance of a SMDRenderingHandler record class.
      Parameters:
      models - the value for the models record component
  • Method Details

    • copy

      public RenderingHandler copy()
      Specified by:
      copy in interface RenderingHandler
    • codec

      public com.mojang.serialization.Codec<? extends RenderingHandler> codec()
      Specified by:
      codec in interface RenderingHandler
    • addScreenButtons

      public void addScreenButtons(NPC npc, net.minecraft.client.gui.Font font, net.minecraft.client.gui.layouts.GridLayout.RowHelper rowHelper)
      Specified by:
      addScreenButtons in interface RenderingHandler
    • 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 interface RenderingHandler
    • 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

      protected boolean isShaking(NPC npc)
    • getFlipDegrees

      protected float getFlipDegrees(NPC npc)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • models

      public List<ModelData> models()
      Returns the value of the models record component.
      Returns:
      the value of the models record component