Dacite decoration block / Environmental renaming

This commit is contained in:
Anuken
2020-09-10 15:17:10 -04:00
parent 88e3022db0
commit 74cefb3ec9
95 changed files with 10486 additions and 10175 deletions

View File

@@ -61,7 +61,7 @@ public class BlockConfigFragment extends Fragment{
}
table.setOrigin(Align.center);
if(configTile == null || configTile.block() == Blocks.air || !configTile.isValid()){
if(configTile == null || configTile.block == Blocks.air || !configTile.isValid()){
hideConfig();
}else{
configTile.updateTableAlign(table);

View File

@@ -79,7 +79,7 @@ public class BlockInventoryFragment extends Fragment{
return;
}
this.tile = t;
if(tile == null || !tile.block().isAccessible() || tile.items.total() == 0)
if(tile == null || !tile.block.isAccessible() || tile.items.total() == 0)
return;
rebuild(true);
}
@@ -108,7 +108,7 @@ public class BlockInventoryFragment extends Fragment{
table.touchable = Touchable.enabled;
table.update(() -> {
if(state.isMenu() || tile == null || !tile.isValid() || !tile.block().isAccessible() || emptyTime >= holdShrink){
if(state.isMenu() || tile == null || !tile.isValid() || !tile.block.isAccessible() || emptyTime >= holdShrink){
hide();
}else{
if(tile.items.total() == 0){
@@ -131,7 +131,7 @@ public class BlockInventoryFragment extends Fragment{
}
updateTablePosition();
if(tile.block().hasItems){
if(tile.block.hasItems){
boolean dirty = false;
if(shrinkHoldTimes.length != content.items().size) shrinkHoldTimes = new float[content.items().size];
@@ -157,7 +157,7 @@ public class BlockInventoryFragment extends Fragment{
table.margin(4f);
table.defaults().size(8 * 5).pad(4f);
if(tile.block().hasItems){
if(tile.block.hasItems){
for(int i = 0; i < content.items().size; i++){
Item item = content.item(i);
@@ -233,7 +233,7 @@ public class BlockInventoryFragment extends Fragment{
}
private void updateTablePosition(){
Vec2 v = Core.input.mouseScreen(tile.x + tile.block().size * tilesize / 2f, tile.y + tile.block().size * tilesize / 2f);
Vec2 v = Core.input.mouseScreen(tile.x + tile.block.size * tilesize / 2f, tile.y + tile.block.size * tilesize / 2f);
table.pack();
table.setPosition(v.x, v.y, Align.topLeft);
}

View File

@@ -95,7 +95,7 @@ public class PlacementFragment extends Fragment{
if(Core.input.keyDown(Binding.pick) && player.isBuilder()){ //mouse eyedropper select
Building tile = world.buildWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
Block tryRecipe = tile == null ? null : tile.block() instanceof ConstructBlock ? ((ConstructBuild)tile).cblock : tile.block;
Block tryRecipe = tile == null ? null : tile.block instanceof ConstructBlock ? ((ConstructBuild)tile).cblock : tile.block;
Object tryConfig = tile == null ? null : tile.config();
for(BuildPlan req : player.builder().plans()){