Tile code cleanup

This commit is contained in:
Anuken
2020-03-03 19:29:41 -05:00
parent bac1648d4b
commit 087f8129b9
10 changed files with 75 additions and 103 deletions
+16
View File
@@ -243,6 +243,16 @@ public class Tile implements Position{
Call.setTile(this, block, team, rotation);
}
/** set()-s this tile, except it's synced across the network */
public void setFloorNet(Block floor, Block overlay){
Call.setFloor(this, floor, overlay);
}
/** set()-s this tile, except it's synced across the network */
public void setFloorNet(Block floor){
setFloorNet(floor, Blocks.air);
}
public byte rotation(){
return rotation;
}
@@ -526,6 +536,12 @@ public class Tile implements Position{
//remote utility methods
@Remote(called = Loc.server)
public static void setFloor(Tile tile, Block floor, Block overlay){
tile.setFloor(floor.asFloor());
tile.setOverlay(overlay);
}
@Remote(called = Loc.server)
public static void removeTile(Tile tile){
tile.remove();