Merge pull request #228 from yueh/fix-227

Fixes inscriber not dropping upgrade cards.
This commit is contained in:
thatsIch 2014-10-02 12:01:59 +02:00
commit ebd338ca85

View file

@ -3,11 +3,13 @@ package appeng.tile.misc;
import io.netty.buffer.ByteBuf;
import java.io.IOException;
import java.util.ArrayList;
import java.util.EnumSet;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
@ -447,6 +449,19 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
return 3;
}
@Override
public void getDrops(World w, int x, int y, int z, ArrayList<ItemStack> drops)
{
super.getDrops( w, x, y, z, drops );
for (int h = 0; h < upgrades.getSizeInventory(); h++)
{
ItemStack is = upgrades.getStackInSlot( h );
if ( is != null )
drops.add( is );
}
}
@Override
public void updateSetting(IConfigManager manager, Enum settingName, Enum newValue)
{