User Tools

Site Tools


tutorial:side

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorial:side [2020/08/26 09:16] – Fix up grammar elisezerotwotutorial:side [2022/04/13 04:32] (current) – external edit 127.0.0.1
Line 25: Line 25:
 The logical client does rendering, sends player inputs to the server, handles resource packs, and partially simulates the game world. The server handles the core game logic, data packs, and maintains the true state of the game world. The logical client does rendering, sends player inputs to the server, handles resource packs, and partially simulates the game world. The server handles the core game logic, data packs, and maintains the true state of the game world.
  
-The client maintains a partial replica of the server's world, with copies of objects such as:<code+The client maintains a partial replica of the server's world, with copies of objects such as:<yarncode
-net.minecraft.world.World +net.minecraft.class_1937 
-net.minecraft.entity.Entity +net.minecraft.class_1297 
-net.minecraft.block.entity.BlockEntity +net.minecraft.class_2586 
-</code+</yarncode
-These replicated objects allow clients and servers to perform some common game logic. The client can interact with these objects while the server is responsible for keeping them in sync. Usually, to distinguish objects on the logical clients from the ones on the logical server you would access the world of the object and check its 'isClient' field. This can be used to perform authoritative actions on the server such as spawning entities, and to simulate actions on the client. This technique is necessary to avoid desynchronization between the two logical sides.+These replicated objects allow clients and servers to perform some common game logic. The client can interact with these objects while the server is responsible for keeping them in sync. Usually, to distinguish objects on the logical clients from the ones on the logical server you would access the world of the object and check its ''isClient'' field. This can be used to perform authoritative actions on the server such as spawning entities, and to simulate actions on the client. This technique is necessary to avoid desynchronization between the two logical sides.
 ===== Detailed look into all sides ===== ===== Detailed look into all sides =====
  
Line 71: Line 71:
 ===== Communication===== ===== Communication=====
  
-The only correct way to exchange data between logical clients and servers by exchanging packets. The packets (as documented on [[https://wiki.vg]]) are sent between logical clients and logical servers, not physical sides. Mods can add packets to transfer custom information between two logical sides. Packets are exchanged in-memory for a logical client connected to its own integrated server, and exchanged over a networking protocol otherwise.+The only correct way to exchange data between logical clients and servers is by exchanging packets. The packets (as documented on [[https://wiki.vg]]) are sent between logical clients and logical servers, not physical sides. Mods can add packets to transfer custom information between two logical sides. Packets are exchanged in-memory for a logical client connected to its own integrated server, and exchanged over a networking protocol otherwise.
  
 Logical clients send C2S (Client-To-Server) packets to the logical server. Logical clients send C2S (Client-To-Server) packets to the logical server.
tutorial/side.txt · Last modified: 2022/04/13 04:32 by 127.0.0.1