Record Class MapItemSavedData.MapDecorationLocation
java.lang.Object
java.lang.Record
net.minecraft.world.level.saveddata.maps.MapItemSavedData.MapDecorationLocation
- Enclosing class:
MapItemSavedData
static record MapItemSavedData.MapDecorationLocation(Holder<MapDecorationType> type, byte x, byte y, byte rot)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byteThe field for therotrecord component.private final Holder<MapDecorationType> The field for thetyperecord component.private final byteThe field for thexrecord component.private final byteThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMapDecorationLocation(Holder<MapDecorationType> type, byte x, byte y, byte rot) Creates an instance of aMapDecorationLocationrecord 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.byterot()Returns the value of therotrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.bytex()Returns the value of thexrecord component.bytey()Returns the value of theyrecord component.
-
Field Details
-
type
The field for thetyperecord component. -
x
private final byte xThe field for thexrecord component. -
y
private final byte yThe field for theyrecord component. -
rot
private final byte rotThe field for therotrecord component.
-
-
Constructor Details
-
MapDecorationLocation
MapDecorationLocation(Holder<MapDecorationType> type, byte x, byte y, byte rot) Creates an instance of aMapDecorationLocationrecord class.- Parameters:
type- the value for thetyperecord componentx- the value for thexrecord componenty- the value for theyrecord componentrot- the value for therotrecord 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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
x
public byte x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public byte y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
rot
public byte rot()Returns the value of therotrecord component.- Returns:
- the value of the
rotrecord component
-