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$Implintermediary net/minecraft/class_10938$class_10939official wb$anamed itemintermediary comp_3876official dnamed countintermediary comp_3877official enamed componentsintermediary comp_3878official f
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.screen.sync.ItemStackHash
ItemStackHash.Impl -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComponentChangesHashThe field for thecomponentsrecord component.private final intThe field for thecountrecord component.private final RegistryEntry<Item> The field for theitemrecord 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 thecomponentsrecord component.intcount()Returns the value of thecountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanhashEquals(ItemStack stack, ComponentChangesHash.ComponentHasher hasher) item()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
item
The field for theitemrecord component. -
count
private final int countThe field for thecountrecord component. -
components
The field for thecomponentsrecord component. -
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/screen/sync/ItemStackHash$Impl;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_58178Lnet/minecraft/class_10938$class_10939;field_58178:Lnet/minecraft/class_9139;official cLwb$a;c:Lze;
-
-
Constructor Details
-
Impl
-
-
Method Details
-
hashEquals
- Specified by:
hashEqualsin interfaceItemStackHash- Mappings:
Namespace Name Mixin selector named hashEqualsLnet/minecraft/screen/sync/ItemStackHash;hashEquals(Lnet/minecraft/item/ItemStack;Lnet/minecraft/screen/sync/ComponentChangesHash$ComponentHasher;)Zintermediary method_68850Lnet/minecraft/class_10938;method_68850(Lnet/minecraft/class_1799;Lnet/minecraft/class_10936$class_10937;)Zofficial aLwb;a(Ldak;Lwa$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 theitemrecord component.- Returns:
- the value of the
itemrecord component
-
count
public int count()Returns the value of thecountrecord component.- Returns:
- the value of the
countrecord component
-
components
Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-