Record Class CraftingInput.Positioned
java.lang.Object
java.lang.Record
net.minecraft.world.item.crafting.CraftingInput.Positioned
- Enclosing class:
CraftingInput
public static record CraftingInput.Positioned(CraftingInput input, int left, int top)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CraftingInput.Positionedprivate final CraftingInputThe field for theinputrecord component.private final intThe field for theleftrecord component.private final intThe field for thetoprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPositioned(CraftingInput input, int left, int top) Creates an instance of aPositionedrecord class. -
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.input()Returns the value of theinputrecord component.intleft()Returns the value of theleftrecord component.inttop()Returns the value of thetoprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
input
The field for theinputrecord component. -
left
private final int leftThe field for theleftrecord component. -
top
private final int topThe field for thetoprecord component. -
EMPTY
-
-
Constructor Details
-
Positioned
Creates an instance of aPositionedrecord class.- Parameters:
input- the value for theinputrecord componentleft- the value for theleftrecord componenttop- the value for thetoprecord component
-
-
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 '=='. -
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
left
public int left()Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
top
public int top()Returns the value of thetoprecord component.- Returns:
- the value of the
toprecord component
-