Fixed placement teleporter crash, invalid packet handling

This commit is contained in:
Anuken
2018-02-26 10:06:36 -05:00
parent 7429d029f3
commit c90395ee2b
5 changed files with 20 additions and 15 deletions

View File

@@ -115,10 +115,11 @@ public abstract class InputHandler extends InputAdapter{
}
public void placeBlock(int x, int y, Block result, int rotation, boolean effects, boolean sound){
if(!Net.client()) Placement.placeBlock(x, y, result, rotation, effects, sound);
Tile tile = world.tile(x, y);
if(tile != null) result.placed(tile);
if(!Net.client()){
Placement.placeBlock(x, y, result, rotation, effects, sound);
Tile tile = world.tile(x, y);
if(tile != null) result.placed(tile);
}
if(Net.active()){
NetEvents.handlePlace(x, y, result, rotation);