Fixed a crash which could occur when unconstructing environment (#290)
This commit is contained in:
@@ -79,6 +79,7 @@ public class Drone extends FlyingUnit implements BuilderTrait{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if it's missing requirements, try and mine them
|
//if it's missing requirements, try and mine them
|
||||||
|
if(entity.recipe != null){
|
||||||
for(ItemStack stack : entity.recipe.requirements){
|
for(ItemStack stack : entity.recipe.requirements){
|
||||||
if(!core.items.has(stack.item, stack.amount) && type.toMine.contains(stack.item)){
|
if(!core.items.has(stack.item, stack.amount) && type.toMine.contains(stack.item)){
|
||||||
targetItem = stack.item;
|
targetItem = stack.item;
|
||||||
@@ -87,6 +88,7 @@ public class Drone extends FlyingUnit implements BuilderTrait{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
circle(placeDistance * 0.7f);
|
circle(placeDistance * 0.7f);
|
||||||
}else{ //building isn't valid
|
}else{ //building isn't valid
|
||||||
|
|||||||
Reference in New Issue
Block a user