Crash fix
This commit is contained in:
@@ -92,17 +92,19 @@ public class PlacementFragment extends Fragment{
|
|||||||
if(Core.input.keyDown(Binding.pick) && player.isBuilder()){ //mouse eyedropper select
|
if(Core.input.keyDown(Binding.pick) && player.isBuilder()){ //mouse eyedropper select
|
||||||
Tilec tile = world.entWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
|
Tilec tile = world.entWorld(Core.input.mouseWorld().x, Core.input.mouseWorld().y);
|
||||||
Block tryRecipe = tile == null ? null : tile.block();
|
Block tryRecipe = tile == null ? null : tile.block();
|
||||||
|
Object tryConfig = tile == null ? null : tile.config();
|
||||||
|
|
||||||
for(BuildRequest req : player.builder().requests()){
|
for(BuildRequest req : player.builder().requests()){
|
||||||
if(!req.breaking && req.block.bounds(req.x, req.y, Tmp.r1).contains(Core.input.mouseWorld())){
|
if(!req.breaking && req.block.bounds(req.x, req.y, Tmp.r1).contains(Core.input.mouseWorld())){
|
||||||
tryRecipe = req.block;
|
tryRecipe = req.block;
|
||||||
|
tryConfig = req.config;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tryRecipe != null && tryRecipe.isVisible() && unlocked(tryRecipe)){
|
if(tryRecipe != null && tryRecipe.isVisible() && unlocked(tryRecipe)){
|
||||||
input.block = tryRecipe;
|
input.block = tryRecipe;
|
||||||
tryRecipe.lastConfig = tile.config();
|
tryRecipe.lastConfig = tryConfig;
|
||||||
currentCategory = input.block.category;
|
currentCategory = input.block.category;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=87f9fe69f86966c2f3b8da5a7391b0cd0a4cff8f
|
archash=41fc7758d3853b18fdeb2e4c657a99895f44e721
|
||||||
|
|||||||
Reference in New Issue
Block a user