Use IItemHandler instead of IInventory internally (#2971)

* Use IItemHandler instead of IInventory internally
This commit is contained in:
fscan
2017-07-28 22:04:32 +02:00
committed by yueh
parent c077840988
commit 52d28fabe3
156 changed files with 2410 additions and 4604 deletions
@@ -25,8 +25,8 @@ import org.lwjgl.input.Mouse;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import appeng.api.config.ActionItems;
import appeng.api.config.CopyMode;
@@ -137,8 +137,8 @@ public class GuiCellWorkbench extends GuiUpgradeable
this.copyMode.setState( this.workbench.getCopyMode() == CopyMode.CLEAR_ON_REMOVE );
boolean hasFuzzy = false;
final IInventory inv = this.workbench.getCellUpgradeInventory();
for( int x = 0; x < inv.getSizeInventory(); x++ )
final IItemHandler inv = this.workbench.getCellUpgradeInventory();
for( int x = 0; x < inv.getSlots(); x++ )
{
final ItemStack is = inv.getStackInSlot( x );
if( !is.isEmpty() && is.getItem() instanceof IUpgradeModule )