Record Class FloatPair
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.math.FloatPair
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFloatPair(float a, float b) Creates an instance of aFloatPairrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloata()Returns the value of thearecord component.floatb()Returns the value of thebrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static FloatPairof(float value) static FloatPairof(float a, float b) static @Nullable FloatPairofTag(@Nullable net.minecraft.nbt.Tag nbt) toString()Returns a string representation of this record class.net.minecraft.nbt.TagtoTag()static net.minecraft.nbt.TagtoTag(float a, float b)
-
Field Details
-
ZERO
-
ONE
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, FloatPair> STREAM_CODEC
-
-
Constructor Details
-
FloatPair
public FloatPair(float a, float b) Creates an instance of aFloatPairrecord class.- Parameters:
a- the value for thearecord componentb- the value for thebrecord component
-
-
Method Details
-
of
-
of
-
ofTag
-
toTag
public static net.minecraft.nbt.Tag toTag(float a, float b) -
toTag
public net.minecraft.nbt.Tag toTag() -
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
a
public float a()Returns the value of thearecord component.- Returns:
- the value of the
arecord component
-
b
public float b()Returns the value of thebrecord component.- Returns:
- the value of the
brecord component
-