Class ServerboundCustomPayloadPacket
java.lang.Object
net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket
- All Implemented Interfaces:
Packet<ServerGamePacketListener>
,ICustomPacket<ServerboundCustomPayloadPacket>
public class ServerboundCustomPayloadPacket
extends Object
implements Packet<ServerGamePacketListener>, ICustomPacket<ServerboundCustomPayloadPacket>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ResourceLocation
private final FriendlyByteBuf
private final ResourceLocation
private static final int
-
Constructor Summary
ConstructorDescriptionServerboundCustomPayloadPacket
(FriendlyByteBuf p_179588_) ServerboundCustomPayloadPacket
(ResourceLocation p_133985_, FriendlyByteBuf p_133986_) -
Method Summary
Modifier and TypeMethodDescriptiongetData()
int
getIndex()
@Nullable FriendlyByteBuf
Returns a unsafe reference to this packet's internal data.getName()
void
handle
(ServerGamePacketListener p_133992_) void
write
(FriendlyByteBuf p_133994_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.network.ICustomPacket
getDirection, getThis
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable
-
Field Details
-
MAX_PAYLOAD_SIZE
private static final int MAX_PAYLOAD_SIZE- See Also:
-
BRAND
-
identifier
-
data
-
-
Constructor Details
-
ServerboundCustomPayloadPacket
-
ServerboundCustomPayloadPacket
-
-
Method Details
-
write
- Specified by:
write
in interfacePacket<ServerGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ServerGamePacketListener>
-
getIdentifier
-
getData
-
getIndex
public int getIndex()- Specified by:
getIndex
in interfaceICustomPacket<ServerboundCustomPayloadPacket>
-
getName
- Specified by:
getName
in interfaceICustomPacket<ServerboundCustomPayloadPacket>
-
getInternalData
Description copied from interface:ICustomPacket
Returns a unsafe reference to this packet's internal data. Any modifications to this buffer will be reflected in the main buffer.- Specified by:
getInternalData
in interfaceICustomPacket<ServerboundCustomPayloadPacket>
-