Package net.minecraft.util
Record Class Brightness
java.lang.Object
java.lang.Record
net.minecraft.util.Brightness
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for theblock
record component.static final com.mojang.serialization.Codec
<Brightness> static Brightness
static final com.mojang.serialization.Codec
<Integer> private final int
The field for thesky
record component. -
Constructor Summary
ConstructorDescriptionBrightness
(int block, int sky) Creates an instance of aBrightness
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
block()
Returns the value of theblock
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
pack()
int
sky()
Returns the value of thesky
record component.final String
toString()
Returns a string representation of this record class.static Brightness
unpack
(int p_270207_)
-
Field Details
-
block
private final int blockThe field for theblock
record component. -
sky
private final int skyThe field for thesky
record component. -
LIGHT_VALUE_CODEC
-
CODEC
-
FULL_BRIGHT
-
-
Constructor Details
-
Brightness
public Brightness(int block, int sky) Creates an instance of aBrightness
record class.- Parameters:
block
- the value for theblock
record componentsky
- the value for thesky
record component
-
-
Method Details
-
pack
public int pack() -
unpack
-
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 with '=='. -
block
public int block()Returns the value of theblock
record component.- Returns:
- the value of the
block
record component
-
sky
public int sky()Returns the value of thesky
record component.- Returns:
- the value of the
sky
record component
-