User Tools

Site Tools


tutorial:networking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:networking [2020/03/17 15:53] – [Client To Server (C2S) Packets] Update mappings earthcomputertutorial:networking [2020/10/20 03:37] – [Client To Server (C2S) Packets] Added link to keybinds tutorial nshak
Line 163: Line 163:
 Client to server packets follow the same principles. Some things can only be done from the server, such as changing the world in a way that affects other players, but you want them to be triggered by a client-only action, such as holding a keybinding. One key difference is that **you must validate what you receive in the ''%%PacketByteBuf%%''**. Client to server packets follow the same principles. Some things can only be done from the server, such as changing the world in a way that affects other players, but you want them to be triggered by a client-only action, such as holding a keybinding. One key difference is that **you must validate what you receive in the ''%%PacketByteBuf%%''**.
  
-In this example we will replace a block with diamond when it is right clicked when a keybinding is held, using a C2S packet. If you want to know how to use hotkeys specifically, refer to the [hotkeys tutorial]($$$ LINK TO KEYBINDINGS TUTORIAL+In this example we will replace a block with diamond when it is right clicked when a keybinding is held, using a C2S packet. If you want to know how to use hotkeys specifically, refer to the [[tutorial:keybinds|hotkeys tutorial]]
  
 As before we'll define an identifier for our packet: As before we'll define an identifier for our packet:
tutorial/networking.txt · Last modified: 2024/04/24 18:53 by skycatminepokie