Merge pull request #228 from yueh/fix-227
Fixes inscriber not dropping upgrade cards.
This commit is contained in:
commit
ebd338ca85
1 changed files with 15 additions and 0 deletions
|
@ -3,11 +3,13 @@ package appeng.tile.misc;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
|
@ -447,6 +449,19 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
||||||
return 3;
|
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
|
@Override
|
||||||
public void updateSetting(IConfigManager manager, Enum settingName, Enum newValue)
|
public void updateSetting(IConfigManager manager, Enum settingName, Enum newValue)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue