Package net.minecraft.screen.sync
Record Class ItemStackHash.Impl
java.lang.Object
java.lang.Record
net.minecraft.screen.sync.ItemStackHash.Impl
- Record Components:
item
-count
-components
-
- All Implemented Interfaces:
ItemStackHash
- Enclosing interface:
ItemStackHash
public static record ItemStackHash.Impl(RegistryEntry<Item> item, int count, ComponentChangesHash components)
extends Record
implements ItemStackHash
- Mappings:
Namespace Name named net/minecraft/screen/sync/ItemStackHash$Impl
intermediary net/minecraft/class_10938$class_10939
official wj$a
named item
intermediary comp_3876
official d
named count
intermediary comp_3877
official e
named components
intermediary comp_3878
official f
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.screen.sync.ItemStackHash
ItemStackHash.Impl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComponentChangesHash
The field for thecomponents
record component.private final int
The field for thecount
record component.private final RegistryEntry
<Item> The field for theitem
record component.static final PacketCodec
<RegistryByteBuf, ItemStackHash.Impl> Fields inherited from interface net.minecraft.screen.sync.ItemStackHash
EMPTY
-
Constructor Summary
ConstructorsConstructorDescriptionImpl
(RegistryEntry<Item> registryEntry, int int2, ComponentChangesHash componentChangesHash) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomponents
record component.int
count()
Returns the value of thecount
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.boolean
hashEquals
(ItemStack stack, ComponentChangesHash.ComponentHasher hasher) item()
Returns the value of theitem
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
item
The field for theitem
record component. -
count
private final int countThe field for thecount
record component. -
components
The field for thecomponents
record component. -
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/screen/sync/ItemStackHash$Impl;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_58178
Lnet/minecraft/class_10938$class_10939;field_58178:Lnet/minecraft/class_9139;
official c
Lwj$a;c:Lzm;
-
-
Constructor Details
-
Impl
-
-
Method Details
-
hashEquals
- Specified by:
hashEquals
in interfaceItemStackHash
- Mappings:
Namespace Name Mixin selector named hashEquals
Lnet/minecraft/screen/sync/ItemStackHash;hashEquals(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/sync/ComponentChangesHash$ComponentHasher;)Z
intermediary method_68850
Lnet/minecraft/class_10938;method_68850(Lnet/minecraft/class_1799;Lnet/minecraft/class_10936$class_10937;)Z
official a
Lwj;a(Ldcv;Lwi$a;)Z
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
item
Returns the value of theitem
record component.- Returns:
- the value of the
item
record component
-
count
public int count()Returns the value of thecount
record component.- Returns:
- the value of the
count
record component
-
components
Returns the value of thecomponents
record component.- Returns:
- the value of the
components
record component
-