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 SummaryNested Classes
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionMapDecoration(MapDecoration.Type type, byte x, byte y, byte rot, Component name) Creates an instance of aMapDecorationrecord class.
- 
Method SummaryModifier 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- 
typeThe field for thetyperecord component.
- 
xprivate final byte xThe field for thexrecord component.
- 
yprivate final byte yThe field for theyrecord component.
- 
rotprivate final byte rotThe field for therotrecord component.
- 
nameThe field for thenamerecord component.
 
- 
- 
Constructor Details- 
MapDecorationCreates an instance of aMapDecorationrecord class.- Parameters:
- type- the value for the- typerecord component
- x- the value for the- xrecord component
- y- the value for the- yrecord component
- rot- the value for the- rotrecord component
- name- the value for the- namerecord component
 
 
- 
- 
Method Details- 
getImagepublic byte getImage()
- 
renderOnFramepublic boolean renderOnFrame()
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
typeReturns the value of thetyperecord component.- Returns:
- the value of the typerecord component
 
- 
xpublic byte x()Returns the value of thexrecord component.- Returns:
- the value of the xrecord component
 
- 
ypublic byte y()Returns the value of theyrecord component.- Returns:
- the value of the yrecord component
 
- 
rotpublic byte rot()Returns the value of therotrecord component.- Returns:
- the value of the rotrecord component
 
- 
nameReturns the value of thenamerecord component.- Returns:
- the value of the namerecord component
 
 
-