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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ConditionalPlanetRenderer> static final net.minecraft.resources.ResourceLocationFields inherited from interface com.lightning.northstar.planet.data.render.PlanetSpriteRenderer
CODEC_OR_INLINE, REGISTRY -
Constructor Summary
ConstructorsConstructorDescriptionConditionalPlanetRenderer(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, PlanetSpriteRenderer ifTrue, PlanetSpriteRenderer orElse) Creates an instance of aConditionalPlanetRendererrecord 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.ifTrue()Returns the value of theifTruerecord component.net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level()Returns the value of thelevelrecord component.orElse()Returns the value of theorElserecord 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) 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
-
ConditionalPlanetRenderer
public ConditionalPlanetRenderer(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level, PlanetSpriteRenderer ifTrue, PlanetSpriteRenderer orElse) Creates an instance of aConditionalPlanetRendererrecord class.- Parameters:
level- the value for thelevelrecord componentifTrue- the value for theifTruerecord componentorElse- the value for theorElserecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
level
public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
ifTrue
Returns the value of theifTruerecord component.- Returns:
- the value of the
ifTruerecord component
-
orElse
Returns the value of theorElserecord component.- Returns:
- the value of the
orElserecord component
-