Record Class MapDataPacket.Icon
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.MapDataPacket.Icon
- All Implemented Interfaces:
NetworkBuffer.Writer
- Enclosing class:
MapDataPacket
public static record MapDataPacket.Icon(int type, byte x, byte z, byte direction, @Nullable Component displayName)
extends Record
implements NetworkBuffer.Writer
-
Constructor Summary
ConstructorDescriptionCreates an instance of aIcon
record class.Icon
(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescriptionbyte
Returns the value of thedirection
record component.@Nullable Component
Returns the value of thedisplayName
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.int
type()
Returns the value of thetype
record component.void
write
(@NotNull NetworkBuffer writer) byte
x()
Returns the value of thex
record component.byte
z()
Returns the value of thez
record component.
-
Constructor Details
-
Icon
-
Icon
Creates an instance of aIcon
record class.- Parameters:
type
- the value for thetype
record componentx
- the value for thex
record componentz
- the value for thez
record componentdirection
- the value for thedirection
record componentdisplayName
- the value for thedisplayName
record component
-
-
Method Details
-
write
- Specified by:
write
in interfaceNetworkBuffer.Writer
-
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
public int 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
-
z
public byte z()Returns the value of thez
record component.- Returns:
- the value of the
z
record component
-
direction
public byte direction()Returns the value of thedirection
record component.- Returns:
- the value of the
direction
record component
-
displayName
Returns the value of thedisplayName
record component.- Returns:
- the value of the
displayName
record component
-