Package net.minecraft.world.chunk
Record Class PalettedContainer.Data<T>
java.lang.Object
java.lang.Record
net.minecraft.world.chunk.PalettedContainer.Data<T>
- Record Components:
- configuration- the data provider that derives the palette and storage of this data
- storage- the data
- palette- the palette for the storage
- Enclosing class:
- PalettedContainer<T>
private static record PalettedContainer.Data<T>(PalettedContainer.DataProvider<T> configuration, PaletteStorage storage, Palette<T> palette)
extends Record
Runtime representation of data in a paletted container.
- Mappings:
- Namespace - Name - official - cya$c- intermediary - net/minecraft/class_2841$class_6561- named - net/minecraft/world/chunk/PalettedContainer$Data- official - a- intermediary - comp_74- named - configuration- official - b- intermediary - comp_118- named - storage- official - c- intermediary - comp_119- named - palette
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final PalettedContainer.DataProvider<T>The field for theconfigurationrecord component.The field for thepaletterecord component.private final PaletteStorageThe field for thestoragerecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionData(PalettedContainer.DataProvider<T> configuration, PaletteStorage storage, Palette<T> palette) Creates an instance of aDatarecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of theconfigurationrecord component.copy()final booleanIndicates whether some other object is "equal to" this one.intReturns the size of this data, in bytes, when written to a packet.final inthashCode()Returns a hash code value for this object.voidimportFrom(Palette<T> palette, PaletteStorage storage) Imports the data from the otherstoragewith the otherpalette.palette()Returns the value of thepaletterecord component.storage()Returns the value of thestoragerecord component.final StringtoString()Returns a string representation of this record class.voidwritePacket(PacketByteBuf buf) 
- 
Field Details- 
configurationThe field for theconfigurationrecord component.
- 
storageThe field for thestoragerecord component.
- 
paletteThe field for thepaletterecord component.
 
- 
- 
Constructor Details- 
DataData(PalettedContainer.DataProvider<T> configuration, PaletteStorage storage, Palette<T> palette) Creates an instance of aDatarecord class.- Parameters:
- configuration- the value for the- configurationrecord component
- storage- the value for the- storagerecord component
- palette- the value for the- paletterecord component
 
 
- 
- 
Method Details- 
importFromImports the data from the otherstoragewith the otherpalette.- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcya$c;a(Lcxy;Lalf;)V- intermediary - method_38308- Lnet/minecraft/class_2841$class_6561;method_38308(Lnet/minecraft/class_2837;Lnet/minecraft/class_6490;)V- named - importFrom- Lnet/minecraft/world/chunk/PalettedContainer$Data;importFrom(Lnet/minecraft/world/chunk/Palette;Lnet/minecraft/util/collection/PaletteStorage;)V
 
- 
getPacketSizepublic int getPacketSize()Returns the size of this data, in bytes, when written to a packet.- Returns:
- the size of this data, in bytes, when written to a packet
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcya$c;a()I- intermediary - method_38306- Lnet/minecraft/class_2841$class_6561;method_38306()I- named - getPacketSize- Lnet/minecraft/world/chunk/PalettedContainer$Data;getPacketSize()I
 
- 
writePacket- Mappings:
- Namespace - Name - Mixin selector - official - a- Lcya$c;a(Lqx;)V- intermediary - method_38309- Lnet/minecraft/class_2841$class_6561;method_38309(Lnet/minecraft/class_2540;)V- named - writePacket- Lnet/minecraft/world/chunk/PalettedContainer$Data;writePacket(Lnet/minecraft/network/PacketByteBuf;)V
 
- 
copy- Mappings:
- Namespace - Name - Mixin selector - official - b- Lcya$c;b()Lcya$c;- intermediary - method_44338- Lnet/minecraft/class_2841$class_6561;method_44338()Lnet/minecraft/class_2841$class_6561;- named - copy- Lnet/minecraft/world/chunk/PalettedContainer$Data;copy()Lnet/minecraft/world/chunk/PalettedContainer$Data;
 
- 
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 withObjects::equals(Object,Object).
- 
configurationReturns the value of theconfigurationrecord component.- Returns:
- the value of the configurationrecord component
 
- 
storageReturns the value of thestoragerecord component.- Returns:
- the value of the storagerecord component
 
- 
paletteReturns the value of thepaletterecord component.- Returns:
- the value of the paletterecord component
 
 
-