Record Class ActionResult.ItemContext

java.lang.Object
java.lang.Record
net.minecraft.util.ActionResult.ItemContext
Record Components:
incrementStat -
newHandStack - the item stack that should replace the hand stack after an interaction, if any
Enclosing interface:
ActionResult

public static record ActionResult.ItemContext(boolean incrementStat, @Nullable ItemStack newHandStack) extends Record
Mappings:
Namespace Name
named net/minecraft/util/ActionResult$ItemContext
intermediary net/minecraft/class_1269$class_9858
official bti$b
named incrementStat
intermediary comp_2907
official c
named newHandStack
intermediary comp_2908
official d
  • Field Details

    • incrementStat

      private final boolean incrementStat
      The field for the incrementStat record component.
    • newHandStack

      @Nullable private final @Nullable ItemStack newHandStack
      The field for the newHandStack record component.
    • KEEP_HAND_STACK_NO_INCREMENT_STAT

      static ActionResult.ItemContext KEEP_HAND_STACK_NO_INCREMENT_STAT
      Mappings:
      Namespace Name Mixin selector
      named KEEP_HAND_STACK_NO_INCREMENT_STAT Lnet/minecraft/util/ActionResult$ItemContext;KEEP_HAND_STACK_NO_INCREMENT_STAT:Lnet/minecraft/util/ActionResult$ItemContext;
      intermediary field_52424 Lnet/minecraft/class_1269$class_9858;field_52424:Lnet/minecraft/class_1269$class_9858;
      official a Lbti$b;a:Lbti$b;
    • KEEP_HAND_STACK

      static ActionResult.ItemContext KEEP_HAND_STACK
      Mappings:
      Namespace Name Mixin selector
      named KEEP_HAND_STACK Lnet/minecraft/util/ActionResult$ItemContext;KEEP_HAND_STACK:Lnet/minecraft/util/ActionResult$ItemContext;
      intermediary field_52425 Lnet/minecraft/class_1269$class_9858;field_52425:Lnet/minecraft/class_1269$class_9858;
      official b Lbti$b;b:Lbti$b;
  • Constructor Details

  • Method Details

    • 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.
    • incrementStat

      public boolean incrementStat()
      Returns the value of the incrementStat record component.
      Returns:
      the value of the incrementStat record component
    • newHandStack

      @Nullable public @Nullable ItemStack newHandStack()
      Returns the value of the newHandStack record component.
      Returns:
      the value of the newHandStack record component