Use IItemHandler instead of IInventory internally (#2971)
* Use IItemHandler instead of IInventory internally
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
package appeng.api.implementations.guiobjects;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.networking.IGridHost;
|
||||
|
||||
@@ -32,8 +32,9 @@ import appeng.api.networking.IGridHost;
|
||||
/**
|
||||
* Obtained via {@link IGuiItem} getGuiObject
|
||||
*/
|
||||
public interface INetworkTool extends IInventory, IGuiItemObject
|
||||
public interface INetworkTool extends IGuiItemObject
|
||||
{
|
||||
|
||||
IGridHost getGridHost(); // null for most purposes.
|
||||
|
||||
IItemHandler getInventory();
|
||||
}
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
|
||||
public interface ISegmentedInventory
|
||||
@@ -38,5 +37,5 @@ public interface ISegmentedInventory
|
||||
*
|
||||
* @return inventory with inventory name
|
||||
*/
|
||||
IInventory getInventoryByName( String name );
|
||||
IItemHandler getInventoryByName( String name );
|
||||
}
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
package appeng.api.implementations.tiles;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
|
||||
public interface IViewCellStorage
|
||||
@@ -35,5 +34,5 @@ public interface IViewCellStorage
|
||||
*
|
||||
* @return inventory with at least 5 slot
|
||||
*/
|
||||
IInventory getViewCellStorage();
|
||||
IItemHandler getViewCellStorage();
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
package appeng.api.storage;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
@@ -52,12 +52,12 @@ public interface ICellInventory extends IMEInventory<IAEItemStack>
|
||||
/**
|
||||
* @return access configured list
|
||||
*/
|
||||
IInventory getConfigInventory();
|
||||
IItemHandler getConfigInventory();
|
||||
|
||||
/**
|
||||
* @return access installed upgrades.
|
||||
*/
|
||||
IInventory getUpgradesInventory();
|
||||
IItemHandler getUpgradesInventory();
|
||||
|
||||
/**
|
||||
* @return How many bytes are used for each type?
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
package appeng.api.storage;
|
||||
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
|
||||
@@ -48,7 +48,7 @@ public interface ICellWorkbenchItem
|
||||
*
|
||||
* onInventoryChange will be called when saving is needed.
|
||||
*/
|
||||
IInventory getUpgradesInventory( ItemStack is );
|
||||
IItemHandler getUpgradesInventory( ItemStack is );
|
||||
|
||||
/**
|
||||
* Used to extract, or mirror the contents of the work bench onto the cell.
|
||||
@@ -57,7 +57,7 @@ public interface ICellWorkbenchItem
|
||||
*
|
||||
* onInventoryChange will be called when saving is needed.
|
||||
*/
|
||||
IInventory getConfigInventory( ItemStack is );
|
||||
IItemHandler getConfigInventory( ItemStack is );
|
||||
|
||||
/**
|
||||
* @return the current fuzzy status.
|
||||
|
||||
Reference in New Issue
Block a user