Record Class PhasedPlanetRenderer

java.lang.Object
java.lang.Record
com.lightning.northstar.planet.data.render.PhasedPlanetRenderer
All Implemented Interfaces:
PlanetSpriteRenderer

@ParametersAreNonnullByDefault public record PhasedPlanetRenderer(net.minecraft.resources.ResourceLocation texture, int phaseDuration, int phaseCount, int timeOffset, int columns, int rows) extends Record implements PlanetSpriteRenderer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<PhasedPlanetRenderer>
     
    static final net.minecraft.resources.ResourceLocation
     

    Fields inherited from interface com.lightning.northstar.planet.data.render.PlanetSpriteRenderer

    CODEC_OR_INLINE, REGISTRY
  • Constructor Summary

    Constructors
    Constructor
    Description
    PhasedPlanetRenderer(net.minecraft.resources.ResourceLocation texture, int phaseDuration, int phaseCount, int timeOffset, int columns, int rows)
    Creates an instance of a PhasedPlanetRenderer record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the columns record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the phaseCount record component.
    int
    Returns the value of the phaseDuration record component.
    void
    render(net.minecraft.world.level.Level level, com.mojang.blaze3d.vertex.PoseStack pose, com.mojang.blaze3d.vertex.VertexConsumer vc, float size, org.joml.Vector4fc color, Planet planet)
     
    int
    Returns the value of the rows record component.
    net.minecraft.resources.ResourceLocation
    Returns the value of the texture record component.
    int
    Returns the value of the timeOffset record component.
    final String
    Returns a string representation of this record class.
    net.minecraft.resources.ResourceLocation
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • TYPE

      public static final net.minecraft.resources.ResourceLocation TYPE
    • CODEC

      public static final com.mojang.serialization.MapCodec<PhasedPlanetRenderer> CODEC
  • Constructor Details

    • PhasedPlanetRenderer

      public PhasedPlanetRenderer(net.minecraft.resources.ResourceLocation texture, int phaseDuration, int phaseCount, int timeOffset, int columns, int rows)
      Creates an instance of a PhasedPlanetRenderer record class.
      Parameters:
      texture - the value for the texture record component
      phaseDuration - the value for the phaseDuration record component
      phaseCount - the value for the phaseCount record component
      timeOffset - the value for the timeOffset record component
      columns - the value for the columns record component
      rows - the value for the rows record component
  • Method Details

    • type

      public net.minecraft.resources.ResourceLocation type()
      Specified by:
      type in interface PlanetSpriteRenderer
    • render

      public void render(net.minecraft.world.level.Level level, com.mojang.blaze3d.vertex.PoseStack pose, com.mojang.blaze3d.vertex.VertexConsumer vc, float size, org.joml.Vector4fc color, Planet planet)
      Specified by:
      render in interface PlanetSpriteRenderer
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • texture

      public net.minecraft.resources.ResourceLocation texture()
      Returns the value of the texture record component.
      Returns:
      the value of the texture record component
    • phaseDuration

      public int phaseDuration()
      Returns the value of the phaseDuration record component.
      Returns:
      the value of the phaseDuration record component
    • phaseCount

      public int phaseCount()
      Returns the value of the phaseCount record component.
      Returns:
      the value of the phaseCount record component
    • timeOffset

      public int timeOffset()
      Returns the value of the timeOffset record component.
      Returns:
      the value of the timeOffset record component
    • columns

      public int columns()
      Returns the value of the columns record component.
      Returns:
      the value of the columns record component
    • rows

      public int rows()
      Returns the value of the rows record component.
      Returns:
      the value of the rows record component