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
Modifier and TypeFieldDescriptionstatic final CraftingInput.Positioned
private final CraftingInput
The field for theinput
record component.private final int
The field for theleft
record component.private final int
The field for thetop
record component. -
Constructor Summary
ConstructorDescriptionPositioned
(CraftingInput input, int left, int top) Creates an instance of aPositioned
record class. -
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.input()
Returns the value of theinput
record component.int
left()
Returns the value of theleft
record component.int
top()
Returns the value of thetop
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
input
The field for theinput
record component. -
left
private final int leftThe field for theleft
record component. -
top
private final int topThe field for thetop
record component. -
EMPTY
-
-
Constructor Details
-
Positioned
Creates an instance of aPositioned
record class.- Parameters:
input
- the value for theinput
record componentleft
- the value for theleft
record componenttop
- the value for thetop
record 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 theinput
record component.- Returns:
- the value of the
input
record component
-
left
public int left()Returns the value of theleft
record component.- Returns:
- the value of the
left
record component
-
top
public int top()Returns the value of thetop
record component.- Returns:
- the value of the
top
record component
-