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 - bsl$b- named - incrementStat- intermediary - comp_2907- official - c- named - newHandStack- intermediary - comp_2908- official - d
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theincrementStatrecord component.(package private) static ActionResult.ItemContext(package private) static ActionResult.ItemContextThe field for thenewHandStackrecord component.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
incrementStatprivate final boolean incrementStatThe field for theincrementStatrecord component.
- 
newHandStackThe field for thenewHandStackrecord 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- Lbsl$b;a:Lbsl$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- Lbsl$b;b:Lbsl$b;
 
 
- 
- 
Constructor Details- 
ItemContext
 
- 
- 
Method Details- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
incrementStatpublic boolean incrementStat()Returns the value of theincrementStatrecord component.- Returns:
- the value of the incrementStatrecord component
 
- 
newHandStackReturns the value of thenewHandStackrecord component.- Returns:
- the value of the newHandStackrecord component
 
 
-