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
  • Field Details

    • item

      private final RegistryEntry<Item> item
      The field for the item record component.
    • count

      private final int count
      The field for the count record component.
    • components

      private final ComponentChangesHash components
      The field for the components record component.
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,ItemStackHash.Impl> 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

  • Method Details

    • hashEquals

      public boolean hashEquals(ItemStack stack, ComponentChangesHash.ComponentHasher hasher)
      Specified by:
      hashEquals in interface ItemStackHash
      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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • item

      public RegistryEntry<Item> item()
      Returns the value of the item record component.
      Returns:
      the value of the item record component
    • count

      public int count()
      Returns the value of the count record component.
      Returns:
      the value of the count record component
    • components

      public ComponentChangesHash components()
      Returns the value of the components record component.
      Returns:
      the value of the components record component