Fixes #1118 Does not crash with invalid ItemStacks anymore

This commit is contained in:
thatsIch
2015-03-29 09:33:06 +02:00
parent 67d9a48d75
commit 2a89bdf52a
10 changed files with 1077 additions and 1068 deletions
@@ -21,6 +21,7 @@ package appeng.tile.storage;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -114,7 +115,8 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
this.mySrc = new MachineSource( this );
this.lastRedstoneState = YesNo.UNDECIDED;
this.upgrades = new BlockUpgradeInventory( this.getBlockType(), this, 3 );
final Block ioPortBlock = AEApi.instance().definitions().blocks().iOPort().maybeBlock().get();
this.upgrades = new BlockUpgradeInventory( ioPortBlock, this, 3 );
}
@TileEvent( TileEventType.WORLD_NBT_WRITE )