Record Class ActionResult.Success

java.lang.Object
java.lang.Record
net.minecraft.util.ActionResult.Success
Record Components:
swingSource -
itemContext -
All Implemented Interfaces:
ActionResult
Enclosing interface:
ActionResult

public static record ActionResult.Success(ActionResult.SwingSource swingSource, ActionResult.ItemContext itemContext) extends Record implements ActionResult
Mappings:
Namespace Name
named net/minecraft/util/ActionResult$Success
intermediary net/minecraft/class_1269$class_9860
official bti$d
named swingSource
intermediary comp_2909
official g
named itemContext
intermediary comp_2910
official h
  • Field Details

  • Constructor Details

  • Method Details

    • isAccepted

      public boolean isAccepted()
      Returns whether an action is performed.
      Specified by:
      isAccepted in interface ActionResult
      Returns:
      whether an action is performed
      Mappings:
      Namespace Name Mixin selector
      named isAccepted Lnet/minecraft/util/ActionResult;isAccepted()Z
      intermediary method_23665 Lnet/minecraft/class_1269;method_23665()Z
      official a Lbti;a()Z
    • withNewHandStack

      public ActionResult.Success withNewHandStack(ItemStack newHandStack)
      Mappings:
      Namespace Name Mixin selector
      named withNewHandStack Lnet/minecraft/util/ActionResult$Success;withNewHandStack(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/ActionResult$Success;
      intermediary method_61393 Lnet/minecraft/class_1269$class_9860;method_61393(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1269$class_9860;
      official a Lbti$d;a(Lcxo;)Lbti$d;
    • noIncrementStat

      public ActionResult.Success noIncrementStat()
      Mappings:
      Namespace Name Mixin selector
      named noIncrementStat Lnet/minecraft/util/ActionResult$Success;noIncrementStat()Lnet/minecraft/util/ActionResult$Success;
      intermediary method_61394 Lnet/minecraft/class_1269$class_9860;method_61394()Lnet/minecraft/class_1269$class_9860;
      official b Lbti$d;b()Lbti$d;
    • shouldIncrementStat

      public boolean shouldIncrementStat()
      Mappings:
      Namespace Name Mixin selector
      named shouldIncrementStat Lnet/minecraft/util/ActionResult$Success;shouldIncrementStat()Z
      intermediary method_61395 Lnet/minecraft/class_1269$class_9860;method_61395()Z
      official c Lbti$d;c()Z
    • getNewHandStack

      @Nullable public @Nullable ItemStack getNewHandStack()
      Returns the item stack that should replace the hand stack after this interaction, if any.
      Returns:
      the item stack that should replace the hand stack after this interaction, if any
      Mappings:
      Namespace Name Mixin selector
      named getNewHandStack Lnet/minecraft/util/ActionResult$Success;getNewHandStack()Lnet/minecraft/item/ItemStack;
      intermediary method_61396 Lnet/minecraft/class_1269$class_9860;method_61396()Lnet/minecraft/class_1799;
      official d Lbti$d;d()Lcxo;
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • swingSource

      public ActionResult.SwingSource swingSource()
      Returns the value of the swingSource record component.
      Returns:
      the value of the swingSource record component
    • itemContext

      public ActionResult.ItemContext itemContext()
      Returns the value of the itemContext record component.
      Returns:
      the value of the itemContext record component