Search in sources :

Example 1 with ItemHandlerProxy

use of gregtech.api.capability.impl.ItemHandlerProxy in project GregTech by GregTechCE.

the class MetaTileEntity method initializeInventory.

protected void initializeInventory() {
    this.importItems = createImportItemHandler();
    this.exportItems = createExportItemHandler();
    this.itemInventory = new ItemHandlerProxy(importItems, exportItems);
    this.importFluids = createImportFluidHandler();
    this.exportFluids = createExportFluidHandler();
    this.fluidInventory = new FluidHandlerProxy(importFluids, exportFluids);
}
Also used : FluidHandlerProxy(gregtech.api.capability.impl.FluidHandlerProxy) ItemHandlerProxy(gregtech.api.capability.impl.ItemHandlerProxy)

Example 2 with ItemHandlerProxy

use of gregtech.api.capability.impl.ItemHandlerProxy in project GregTech by GregTechCE.

the class MetaTileEntityCokeOvenHatch method addToMultiBlock.

@Override
public void addToMultiBlock(MultiblockControllerBase controllerBase) {
    super.addToMultiBlock(controllerBase);
    this.fluidInventory = new FluidHandlerProxy(new FluidTankList(false), controllerBase.getExportFluids());
    this.itemInventory = new ItemHandlerProxy(controllerBase.getImportItems(), controllerBase.getExportItems());
}
Also used : FluidTankList(gregtech.api.capability.impl.FluidTankList) FluidHandlerProxy(gregtech.api.capability.impl.FluidHandlerProxy) ItemHandlerProxy(gregtech.api.capability.impl.ItemHandlerProxy)

Example 3 with ItemHandlerProxy

use of gregtech.api.capability.impl.ItemHandlerProxy in project GregTech by GregTechCE.

the class MetaTileEntityPrimitiveBlastFurnace method initializeInventory.

@Override
protected void initializeInventory() {
    super.initializeInventory();
    ItemStackHandler emptyHandler = new ItemStackHandler(0);
    this.itemInventory = new ItemHandlerProxy(emptyHandler, emptyHandler);
}
Also used : ItemStackHandler(net.minecraftforge.items.ItemStackHandler) ItemHandlerProxy(gregtech.api.capability.impl.ItemHandlerProxy)

Example 4 with ItemHandlerProxy

use of gregtech.api.capability.impl.ItemHandlerProxy in project GregTech by GregTechCE.

the class SimpleMachineMetaTileEntity method initializeInventory.

@Override
protected void initializeInventory() {
    super.initializeInventory();
    this.outputItemInventory = new ItemHandlerProxy(new ItemStackHandler(0), exportItems);
    this.outputFluidInventory = new FluidHandlerProxy(new FluidTankList(false), exportFluids);
}
Also used : FluidTankList(gregtech.api.capability.impl.FluidTankList) ItemStackHandler(net.minecraftforge.items.ItemStackHandler) FluidHandlerProxy(gregtech.api.capability.impl.FluidHandlerProxy) ItemHandlerProxy(gregtech.api.capability.impl.ItemHandlerProxy)

Aggregations

ItemHandlerProxy (gregtech.api.capability.impl.ItemHandlerProxy)4 FluidHandlerProxy (gregtech.api.capability.impl.FluidHandlerProxy)3 FluidTankList (gregtech.api.capability.impl.FluidTankList)2 ItemStackHandler (net.minecraftforge.items.ItemStackHandler)2