Fixed teleporter crash and color switch bug

This commit is contained in:
Anuken
2018-03-22 19:21:35 -04:00
parent d5493e6149
commit 357fc37a79
4 changed files with 11 additions and 9 deletions

View File

@@ -115,19 +115,23 @@ public abstract class InputHandler extends InputAdapter{
}
public void placeBlock(int x, int y, Block result, int rotation, boolean effects, boolean sound){
if(!Net.client()){
if(!Net.client()){ //is server or singleplayer
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);
}
if(!Net.client()){
Tile tile = world.tile(x, y);
if(tile != null) result.placed(tile);
}
}
public void breakBlock(int x, int y, boolean sound){
if(!Net.client()) Placement.breakBlock(x, y, true, sound);
if(!Net.client())
Placement.breakBlock(x, y, true, sound);
if(Net.active()){
NetEvents.handleBreak(x, y);