Fixed Sigil of Magnetism and Call of the Zephyr picking up "dead" items.

This commit is contained in:
WayofTime 2016-05-28 07:19:43 -04:00
parent 3ac00ce4d6
commit 5e0a390f48
2 changed files with 6 additions and 2 deletions

View file

@ -8,7 +8,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.world.World; import net.minecraft.world.World;
import WayofTime.bloodmagic.api.Constants;
public class ItemSigilMagnetism extends ItemSigilToggleableBase public class ItemSigilMagnetism extends ItemSigilToggleableBase
{ {
@ -30,7 +29,7 @@ public class ItemSigilMagnetism extends ItemSigilToggleableBase
for (EntityItem entity : entities) for (EntityItem entity : entities)
{ {
if (entity != null && !world.isRemote) if (entity != null && !world.isRemote && !entity.isDead)
{ {
entity.onCollideWithPlayer(player); entity.onCollideWithPlayer(player);
} }

View file

@ -58,6 +58,11 @@ public class RitualZephyr extends Ritual
{ {
for (EntityItem entityItem : itemList) for (EntityItem entityItem : itemList)
{ {
if (entityItem.isDead)
{
continue;
}
ItemStack copyStack = entityItem.getEntityItem().copy(); ItemStack copyStack = entityItem.getEntityItem().copy();
int originalAmount = copyStack.stackSize; int originalAmount = copyStack.stackSize;
ItemStack newStack = Utils.insertStackIntoInventory(copyStack, (IInventory) tileInventory, EnumFacing.DOWN); ItemStack newStack = Utils.insertStackIntoInventory(copyStack, (IInventory) tileInventory, EnumFacing.DOWN);