mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 19:29:31 +00:00
Fixed a crash when using a Corporea Funnel with an empty Item Frame. Closes #687
This commit is contained in:
1 parent
953a0f57c6
commit
ed2204768f
1 file changed
+12
-10
@@ -38,17 +38,19 @@ public class TileCorporeaFunnel extends TileCorporeaBase {
|
||||
if(!filter.isEmpty()) {
|
||||
ItemStack stack = filter.get(worldObj.rand.nextInt(filter.size()));
|
||||
|
||||
List<ItemStack> stacks = CorporeaHelper.requestItem(stack, spark, true, true);
|
||||
spark.onItemsRequested(stacks);
|
||||
for(ItemStack reqStack : stacks)
|
||||
if(stack != null) {
|
||||
if(inv != null && reqStack.stackSize == InventoryHelper.testInventoryInsertion(inv, stack, ForgeDirection.UP))
|
||||
InventoryHelper.insertItemIntoInventory(inv, reqStack);
|
||||
else {
|
||||
EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord + 1.5, zCoord + 0.5, stack);
|
||||
worldObj.spawnEntityInWorld(item);
|
||||
if(stack != null) {
|
||||
List<ItemStack> stacks = CorporeaHelper.requestItem(stack, spark, true, true);
|
||||
spark.onItemsRequested(stacks);
|
||||
for(ItemStack reqStack : stacks)
|
||||
if(stack != null) {
|
||||
if(inv != null && reqStack.stackSize == InventoryHelper.testInventoryInsertion(inv, stack, ForgeDirection.UP))
|
||||
InventoryHelper.insertItemIntoInventory(inv, reqStack);
|
||||
else {
|
||||
EntityItem item = new EntityItem(worldObj, xCoord + 0.5, yCoord + 1.5, zCoord + 0.5, stack);
|
||||
worldObj.spawnEntityInWorld(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user