Record Class WaypointPacket
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.common.network.packets.editor.WaypointPacket
- All Implemented Interfaces:
AbstractPacket<WaypointPacket>, net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record WaypointPacket(String action, int x, int y, int z, String icon, String name, Color color)
extends Record
implements AbstractPacket<WaypointPacket>
-
Nested Class Summary
Nested classes/interfaces inherited from interface AbstractPacket
AbstractPacket.Definition<T>Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, WaypointPacket> static final AbstractPacket.Definition<WaypointPacket> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<WaypointPacket> -
Constructor Summary
ConstructorsConstructorDescriptionWaypointPacket(String action, int x, int y, int z, String icon, String name, Color color) Creates an instance of aWaypointPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.static WaypointPacketstatic WaypointPacketclear()color()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, WaypointPacket> getCodec()net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<WaypointPacket> getType()final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.name()Returns the value of thenamerecord component.static WaypointPacketremove(int x, int y, int z) final StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.intz()Returns the value of thezrecord component.Methods inherited from interface AbstractPacket
handleClient, handleServer, typeMethods inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
toVanillaClientbound, toVanillaServerbound
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<WaypointPacket> TYPE -
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, WaypointPacket> CODEC -
DEFINITION
-
-
Constructor Details
-
WaypointPacket
Creates an instance of aWaypointPacketrecord class.- Parameters:
action- the value for theactionrecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componenticon- the value for theiconrecord componentname- the value for thenamerecord componentcolor- the value for thecolorrecord component
-
-
Method Details
-
add
-
remove
-
clear
-
getType
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<WaypointPacket> getType()- Specified by:
getTypein interfaceAbstractPacket<WaypointPacket>
-
getBoundTo
- Specified by:
getBoundToin interfaceAbstractPacket<WaypointPacket>
-
getCodec
public net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, WaypointPacket> getCodec()- Specified by:
getCodecin interfaceAbstractPacket<WaypointPacket>
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public int z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-