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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<PhasedPlanetRenderer> static final net.minecraft.resources.ResourceLocationFields inherited from interface com.lightning.northstar.planet.data.render.PlanetSpriteRenderer
CODEC_OR_INLINE, REGISTRY -
Constructor Summary
ConstructorsConstructorDescriptionPhasedPlanetRenderer(net.minecraft.resources.ResourceLocation texture, int phaseDuration, int phaseCount, int timeOffset, int columns, int rows) Creates an instance of aPhasedPlanetRendererrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcolumns()Returns the value of thecolumnsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thephaseCountrecord component.intReturns the value of thephaseDurationrecord component.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, Planet planet) introws()Returns the value of therowsrecord component.net.minecraft.resources.ResourceLocationtexture()Returns the value of thetexturerecord component.intReturns the value of thetimeOffsetrecord 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
-
PhasedPlanetRenderer
public PhasedPlanetRenderer(net.minecraft.resources.ResourceLocation texture, int phaseDuration, int phaseCount, int timeOffset, int columns, int rows) Creates an instance of aPhasedPlanetRendererrecord class.- Parameters:
texture- the value for thetexturerecord componentphaseDuration- the value for thephaseDurationrecord componentphaseCount- the value for thephaseCountrecord componenttimeOffset- the value for thetimeOffsetrecord componentcolumns- the value for thecolumnsrecord componentrows- the value for therowsrecord 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, 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
texture
public net.minecraft.resources.ResourceLocation texture()Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
phaseDuration
public int phaseDuration()Returns the value of thephaseDurationrecord component.- Returns:
- the value of the
phaseDurationrecord component
-
phaseCount
public int phaseCount()Returns the value of thephaseCountrecord component.- Returns:
- the value of the
phaseCountrecord component
-
timeOffset
public int timeOffset()Returns the value of thetimeOffsetrecord component.- Returns:
- the value of the
timeOffsetrecord component
-
columns
public int columns()Returns the value of thecolumnsrecord component.- Returns:
- the value of the
columnsrecord component
-
rows
public int rows()Returns the value of therowsrecord component.- Returns:
- the value of the
rowsrecord component
-