Fixed teleporter crash and color switch bug
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user