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

@@ -122,8 +122,6 @@ public class Control extends Module{
"lastBuild", 0
);
Log.info("{0}", (int)'ї');
KeyBinds.load();
for(Map map : world.maps().list()){

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);

View File

@@ -69,7 +69,7 @@ public class Teleporter extends PowerBlock{
@Override
public void placed(Tile tile){
tile.<TeleporterEntity>entity().color = lastColor;
Timers.run(1f, () -> setConfigure(tile, lastColor));
setConfigure(tile, lastColor);
}
@Override