Record Class MapBanner
java.lang.Object
java.lang.Record
net.minecraft.world.level.saveddata.maps.MapBanner
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncolor()
Returns the value of thecolor
record component.final boolean
Indicates whether some other object is "equal to" this one.static MapBanner
fromWorld
(BlockGetter p_77775_, BlockPos p_77776_) getId()
final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.pos()
Returns the value of thepos
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
pos
The field for thepos
record component. -
color
The field for thecolor
record component. -
name
The field for thename
record component. -
CODEC
-
LIST_CODEC
-
-
Constructor Details
-
MapBanner
Creates an instance of aMapBanner
record class.- Parameters:
pos
- the value for thepos
record componentcolor
- the value for thecolor
record componentname
- the value for thename
record component
-
-
Method Details
-
fromWorld
-
getDecoration
-
getId
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
pos
Returns the value of thepos
record component.- Returns:
- the value of the
pos
record component
-
color
Returns the value of thecolor
record component.- Returns:
- the value of the
color
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-