Record Class FishProperties.Star
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.registry.FishProperties.Star
- Enclosing class:
FishProperties
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FishProperties.Star> static final FishProperties.Starstatic final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, FishProperties.Star> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectionsrecord component.intReturns the value of thedebugColorrecord component.final booleanIndicates whether some other object is "equal to" this one.static FishProperties.StarfromRaAndDec(String name, int degrees, float dec, int color, String... connections) static FishProperties.StarfromRaAndDec(String name, int hours, int minutes, double seconds, float dec, int color, String... connections) final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.static floattransform(float v) intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,FishProperties.Star> STREAM_CODEC -
DEFAULT
-
-
Constructor Details
-
Star
Creates an instance of aStarrecord class.- Parameters:
name- the value for thenamerecord componentx- the value for thexrecord componenty- the value for theyrecord componentconnections- the value for theconnectionsrecord componentdebugColor- the value for thedebugColorrecord component
-
-
Method Details
-
fromRaAndDec
public static FishProperties.Star fromRaAndDec(String name, int degrees, float dec, int color, String... connections) -
transform
public static float transform(float v) -
fromRaAndDec
public static FishProperties.Star fromRaAndDec(String name, int hours, int minutes, double seconds, float dec, int color, String... connections) -
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
connections
Returns the value of theconnectionsrecord component.- Returns:
- the value of the
connectionsrecord component
-
debugColor
public int debugColor()Returns the value of thedebugColorrecord component.- Returns:
- the value of the
debugColorrecord component
-