public interface ISyncedData
Modifier and Type | Method and Description |
---|---|
void |
handleFromClient(net.minecraft.network.PacketBuffer buffer)
This method is called on the server side.
|
void |
handleFromServer(net.minecraft.network.PacketBuffer buffer)
This method is called on the client side.
|
default void |
sendDataToClient(net.minecraft.entity.player.ServerPlayerEntity player)
This method will call
#sendToClient(buffer) to get the data and then call
#sendDataToClient(player, buffer) to send the data. |
default void |
sendDataToClient(net.minecraft.entity.player.ServerPlayerEntity player,
net.minecraft.network.PacketBuffer buffer)
This method sends a new
SyncedContainerMessage with a buffer on the uteamcore network channel to a client. |
default void |
sendDataToServer()
This method will call
#sendToServer(buffer) to get the data and then call #sendDataToServer(buffer)
to send the data. |
default void |
sendDataToServer(net.minecraft.network.PacketBuffer buffer)
This method sends a new
SyncedContainerMessage with a buffer on the uteamcore network channel to the server |
void |
sendToClient(net.minecraft.network.PacketBuffer buffer)
This method is called on the server side.
|
void |
sendToServer(net.minecraft.network.PacketBuffer buffer)
This method is called on the client side.
|
void sendToClient(net.minecraft.network.PacketBuffer buffer)
#handleFromServer(buffer)
.
This method is for client -> server sync.buffer
- Packet buffervoid handleFromServer(net.minecraft.network.PacketBuffer buffer)
#sendToClient(buffer)
.
This method is for client -> server sync.buffer
- Packet buffervoid sendToServer(net.minecraft.network.PacketBuffer buffer)
#handleFromClient(buffer)
.
This method is for server -> client sync.buffer
- Packet buffervoid handleFromClient(net.minecraft.network.PacketBuffer buffer)
#sendToServer(buffer)
.
This method is for server -> client sync.buffer
- Packet bufferdefault void sendDataToClient(net.minecraft.entity.player.ServerPlayerEntity player)
#sendToClient(buffer)
to get the data and then call
#sendDataToClient(player, buffer)
to send the data.player
- Server playerdefault void sendDataToClient(net.minecraft.entity.player.ServerPlayerEntity player, net.minecraft.network.PacketBuffer buffer)
SyncedContainerMessage
with a buffer on the uteamcore network channel to a client.player
- Server playerbuffer
- Datadefault void sendDataToServer()
#sendToServer(buffer)
to get the data and then call #sendDataToServer(buffer)
to send the data.default void sendDataToServer(net.minecraft.network.PacketBuffer buffer)
SyncedContainerMessage
with a buffer on the uteamcore network channel to the serverbuffer
- Data