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 revision Previous revision
tutorial:networking [2020/01/01 13:03]
fudge
tutorial:networking [2020/03/17 15:53] (current)
earthcomputer [Client To Server (C2S) Packets] Update mappings
Line 210: Line 210:
  
                 // ALWAYS validate that the information received is valid in a C2S packet!                 // ALWAYS validate that the information received is valid in a C2S packet!
-                if(packetContext.getPlayer().world.isHeightValidAndBlockLoaded(pos)){+                if(packetContext.getPlayer().world.canSetBlock(pos)){
                     // Turn to diamond                     // Turn to diamond
                     packetContext.getPlayer().world.setBlockState(pos,​ Blocks.DIAMOND_BLOCK.getDefaultState());​                     packetContext.getPlayer().world.setBlockState(pos,​ Blocks.DIAMOND_BLOCK.getDefaultState());​
tutorial/networking.txt ยท Last modified: 2020/03/17 15:53 by earthcomputer