Record Class SimplePlanetRenderer
java.lang.Object
java.lang.Record
com.lightning.northstar.planet.data.render.SimplePlanetRenderer
- All Implemented Interfaces:
PlanetSpriteRenderer
@ParametersAreNonnullByDefault
public record SimplePlanetRenderer(net.minecraft.resources.ResourceLocation texture)
extends Record
implements PlanetSpriteRenderer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SimplePlanetRenderer> static final net.minecraft.resources.ResourceLocationFields inherited from interface com.lightning.northstar.planet.data.render.PlanetSpriteRenderer
CODEC_OR_INLINE, REGISTRY -
Constructor Summary
ConstructorsConstructorDescriptionSimplePlanetRenderer(net.minecraft.resources.ResourceLocation texture) Creates an instance of aSimplePlanetRendererrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidrender(net.minecraft.world.level.Level level, com.mojang.blaze3d.vertex.PoseStack pose, com.mojang.blaze3d.vertex.VertexConsumer vc, float size, org.joml.Vector4fc color, @Nullable Planet planet) net.minecraft.resources.ResourceLocationtexture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.resources.ResourceLocationtype()
-
Field Details
-
TYPE
public static final net.minecraft.resources.ResourceLocation TYPE -
CODEC
-
-
Constructor Details
-
SimplePlanetRenderer
public SimplePlanetRenderer(net.minecraft.resources.ResourceLocation texture) Creates an instance of aSimplePlanetRendererrecord class.- Parameters:
texture- the value for thetexturerecord component
-
-
Method Details
-
type
public net.minecraft.resources.ResourceLocation type()- Specified by:
typein interfacePlanetSpriteRenderer
-
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, @Nullable @Nullable Planet planet) - Specified by:
renderin interfacePlanetSpriteRenderer
-
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). -
texture
public net.minecraft.resources.ResourceLocation texture()Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-