Record Class ConditionalPlanetRenderer

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

@ParametersAreNonnullByDefault public record ConditionalPlanetRenderer(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, PlanetSpriteRenderer ifTrue, PlanetSpriteRenderer orElse) extends Record implements PlanetSpriteRenderer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<ConditionalPlanetRenderer>
     
    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
    ConditionalPlanetRenderer(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, PlanetSpriteRenderer ifTrue, PlanetSpriteRenderer orElse)
    Creates an instance of a ConditionalPlanetRenderer record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the ifTrue record component.
    net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>
    Returns the value of the level record component.
    Returns the value of the orElse 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)
     
    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<ConditionalPlanetRenderer> CODEC
  • Constructor Details

    • ConditionalPlanetRenderer

      public ConditionalPlanetRenderer(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, PlanetSpriteRenderer ifTrue, PlanetSpriteRenderer orElse)
      Creates an instance of a ConditionalPlanetRenderer record class.
      Parameters:
      level - the value for the level record component
      ifTrue - the value for the ifTrue record component
      orElse - the value for the orElse 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. 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.
    • level

      public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level()
      Returns the value of the level record component.
      Returns:
      the value of the level record component
    • ifTrue

      public PlanetSpriteRenderer ifTrue()
      Returns the value of the ifTrue record component.
      Returns:
      the value of the ifTrue record component
    • orElse

      public PlanetSpriteRenderer orElse()
      Returns the value of the orElse record component.
      Returns:
      the value of the orElse record component