Package net.minecraft.util
Record Class Brightness
java.lang.Object
java.lang.Record
net.minecraft.util.Brightness
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intThe field for theblockrecord component.static final com.mojang.serialization.Codec<Brightness>static Brightnessstatic final com.mojang.serialization.Codec<Integer>private final intThe field for theskyrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionBrightness(int block, int sky) Creates an instance of aBrightnessrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionintblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intpack()intsky()Returns the value of theskyrecord component.final StringtoString()Returns a string representation of this record class.static Brightnessunpack(int p_270207_) 
- 
Field Details- 
blockprivate final int blockThe field for theblockrecord component.
- 
skyprivate final int skyThe field for theskyrecord component.
- 
LIGHT_VALUE_CODEC
- 
CODEC
- 
FULL_BRIGHT
 
- 
- 
Constructor Details- 
Brightnesspublic Brightness(int block, int sky) Creates an instance of aBrightnessrecord class.- Parameters:
- block- the value for the- blockrecord component
- sky- the value for the- skyrecord component
 
 
- 
- 
Method Details- 
packpublic int pack()
- 
unpack
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
blockpublic int block()Returns the value of theblockrecord component.- Returns:
- the value of the blockrecord component
 
- 
skypublic int sky()Returns the value of theskyrecord component.- Returns:
- the value of the skyrecord component
 
 
-