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/01/01 13:03] fudgetutorial:networking [2020/03/17 15:53] – [Client To Server (C2S) Packets] Update mappings earthcomputer
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: 2024/04/15 02:17 by solidblock