Package net.minecraft.world.level.chunk
Record Class PalettedContainer.Data<T>
java.lang.Object
java.lang.Record
net.minecraft.world.level.chunk.PalettedContainer.Data<T>
- Enclosing class:
- PalettedContainer<T>
static record PalettedContainer.Data<T>(PalettedContainer.Configuration<T> configuration, BitStorage storage, Palette<T> palette)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PalettedContainer.Configuration<T>The field for theconfigurationrecord component.The field for thepaletterecord component.private final BitStorageThe field for thestoragerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionData(PalettedContainer.Configuration<T> configuration, BitStorage storage, Palette<T> palette) Creates an instance of aDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfigurationrecord component.copy()voidcopyFrom(Palette<T> p_188112_, BitStorage p_188113_) final booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.palette()Returns the value of thepaletterecord component.storage()Returns the value of thestoragerecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_188115_)
-
Field Details
-
configuration
The field for theconfigurationrecord component. -
storage
The field for thestoragerecord component. -
palette
The field for thepaletterecord component.
-
-
Constructor Details
-
Data
Data(PalettedContainer.Configuration<T> configuration, BitStorage storage, Palette<T> palette) Creates an instance of aDatarecord class.- Parameters:
configuration- the value for theconfigurationrecord componentstorage- the value for thestoragerecord componentpalette- the value for thepaletterecord component
-
-
Method Details
-
copyFrom
-
getSerializedSize
public int getSerializedSize() -
write
-
copy
-
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). -
configuration
Returns the value of theconfigurationrecord component.- Returns:
- the value of the
configurationrecord component
-
storage
Returns the value of thestoragerecord component.- Returns:
- the value of the
storagerecord component
-
palette
Returns the value of thepaletterecord component.- Returns:
- the value of the
paletterecord component
-