Record Class UseRemainderComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.UseRemainderComponent
Record Components:
convertInto -

public record UseRemainderComponent(ItemStack convertInto) extends Record
Mappings:
Namespace Name
named net/minecraft/component/type/UseRemainderComponent
intermediary net/minecraft/class_10131
official dau
named convertInto
intermediary comp_3093
official c
  • Field Details

    • convertInto

      private final ItemStack convertInto
      The field for the convertInto record component.
    • CODEC

      public static final com.mojang.serialization.Codec<UseRemainderComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/UseRemainderComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_53801 Lnet/minecraft/class_10131;field_53801:Lcom/mojang/serialization/Codec;
      official a Ldau;a:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,UseRemainderComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/UseRemainderComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_53802 Lnet/minecraft/class_10131;field_53802:Lnet/minecraft/class_9139;
      official b Ldau;b:Lzt;
  • Constructor Details

    • UseRemainderComponent

      public UseRemainderComponent(ItemStack itemStack)
  • Method Details

    • convert

      public ItemStack convert(ItemStack stack, int oldCount, boolean inCreative, UseRemainderComponent.StackInserter inserter)
      Mappings:
      Namespace Name Mixin selector
      named convert Lnet/minecraft/component/type/UseRemainderComponent;convert(Lnet/minecraft/item/ItemStack;IZLnet/minecraft/component/type/UseRemainderComponent$StackInserter;)Lnet/minecraft/item/ItemStack;
      intermediary method_62863 Lnet/minecraft/class_10131;method_62863(Lnet/minecraft/class_1799;IZLnet/minecraft/class_10131$class_10259;)Lnet/minecraft/class_1799;
      official a Ldau;a(Lcxo;IZLdau$a;)Lcxo;
    • equals

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

      public 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
    • 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
    • convertInto

      public ItemStack convertInto()
      Returns the value of the convertInto record component.
      Returns:
      the value of the convertInto record component