Cleanup + Generic cross rendering

This commit is contained in:
Anuken
2021-01-15 11:34:33 -05:00
parent bceb7b5809
commit 136c8cfcd2
7 changed files with 23 additions and 17 deletions

View File

@@ -99,7 +99,7 @@ public class PlacementFragment extends Fragment{
if(Core.input.keyTap(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 instanceof ConstructBuild c ? c.cblock : tile.block;
Object tryConfig = tile == null ? null : tile.config();
for(BuildPlan req : player.unit().plans()){