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$ItemContextintermediary net/minecraft/class_1269$class_9858official bvc$bnamed incrementStatintermediary comp_2907official cnamed newHandStackintermediary comp_2908official d
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theincrementStatrecord component.(package private) static ActionResult.ItemContext(package private) static ActionResult.ItemContextThe field for thenewHandStackrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theincrementStatrecord component.Returns the value of thenewHandStackrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
incrementStat
private final boolean incrementStatThe field for theincrementStatrecord component. -
newHandStack
The field for thenewHandStackrecord component. -
KEEP_HAND_STACK_NO_INCREMENT_STAT
- Mappings:
Namespace Name Mixin selector named KEEP_HAND_STACK_NO_INCREMENT_STATLnet/minecraft/util/ActionResult$ItemContext;KEEP_HAND_STACK_NO_INCREMENT_STAT:Lnet/minecraft/util/ActionResult$ItemContext;intermediary field_52424Lnet/minecraft/class_1269$class_9858;field_52424:Lnet/minecraft/class_1269$class_9858;official aLbvc$b;a:Lbvc$b;
-
KEEP_HAND_STACK
- Mappings:
Namespace Name Mixin selector named KEEP_HAND_STACKLnet/minecraft/util/ActionResult$ItemContext;KEEP_HAND_STACK:Lnet/minecraft/util/ActionResult$ItemContext;intermediary field_52425Lnet/minecraft/class_1269$class_9858;field_52425:Lnet/minecraft/class_1269$class_9858;official bLbvc$b;b:Lbvc$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 theincrementStatrecord component.- Returns:
- the value of the
incrementStatrecord component
-
newHandStack
Returns the value of thenewHandStackrecord component.- Returns:
- the value of the
newHandStackrecord component
-