Record Class MapDecoration
java.lang.Object
java.lang.Record
net.minecraft.world.level.saveddata.maps.MapDecoration
public record MapDecoration(MapDecoration.Type type, byte x, byte y, byte rot, @Nullable Component name)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ComponentThe field for thenamerecord component.private final byteThe field for therotrecord component.private final MapDecoration.TypeThe field for thetyperecord component.private final byteThe field for thexrecord component.private final byteThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMapDecoration(MapDecoration.Type type, byte x, byte y, byte rot, Component name) Creates an instance of aMapDecorationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.bytegetImage()final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.booleanbyterot()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. -
name
The field for thenamerecord component.
-
-
Constructor Details
-
MapDecoration
Creates an instance of aMapDecorationrecord class.- Parameters:
type- the value for thetyperecord componentx- the value for thexrecord componenty- the value for theyrecord componentrot- the value for therotrecord componentname- the value for thenamerecord component
-
-
Method Details
-
getImage
public byte getImage() -
renderOnFrame
public boolean renderOnFrame() -
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
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-