Fixed teleporter crash and color switch bug
This commit is contained in:
@@ -122,8 +122,6 @@ public class Control extends Module{
|
||||
"lastBuild", 0
|
||||
);
|
||||
|
||||
Log.info("{0}", (int)'ї');
|
||||
|
||||
KeyBinds.load();
|
||||
|
||||
for(Map map : world.maps().list()){
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user