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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Component
The field for thename
record component.private final byte
The field for therot
record component.private final MapDecoration.Type
The field for thetype
record component.private final byte
The field for thex
record component.private final byte
The field for they
record component. -
Constructor Summary
ConstructorDescriptionMapDecoration
(MapDecoration.Type type, byte x, byte y, byte rot, Component name) Creates an instance of aMapDecoration
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.byte
getImage()
final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.boolean
byte
rot()
Returns the value of therot
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.byte
x()
Returns the value of thex
record component.byte
y()
Returns the value of they
record component.
-
Field Details
-
type
The field for thetype
record component. -
x
private final byte xThe field for thex
record component. -
y
private final byte yThe field for they
record component. -
rot
private final byte rotThe field for therot
record component. -
name
The field for thename
record component.
-
-
Constructor Details
-
MapDecoration
Creates an instance of aMapDecoration
record class.- Parameters:
type
- the value for thetype
record componentx
- the value for thex
record componenty
- the value for they
record componentrot
- the value for therot
record componentname
- the value for thename
record 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 thetype
record component.- Returns:
- the value of the
type
record component
-
x
public byte x()Returns the value of thex
record component.- Returns:
- the value of the
x
record component
-
y
public byte y()Returns the value of they
record component.- Returns:
- the value of the
y
record component
-
rot
public byte rot()Returns the value of therot
record component.- Returns:
- the value of the
rot
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-