Package net.minecraft.util
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 Summary
Modifier and TypeFieldDescriptionprivate final boolean
The field for theincrementStat
record component.(package private) static ActionResult.ItemContext
(package private) static ActionResult.ItemContext
The field for thenewHandStack
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theincrementStat
record component.Returns the value of thenewHandStack
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
incrementStat
private final boolean incrementStatThe field for theincrementStat
record component. -
newHandStack
The field for thenewHandStack
record component. -
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
- 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
-
ItemContext
-
-
Method Details
-
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 '=='. -
incrementStat
public boolean incrementStat()Returns the value of theincrementStat
record component.- Returns:
- the value of the
incrementStat
record component
-
newHandStack
Returns the value of thenewHandStack
record component.- Returns:
- the value of the
newHandStack
record component
-