use of crazypants.enderio.machine.invpanel.InventoryPanelContainer in project EnderIO by SleepyTrousers.
the class ClientRemoteGuiManager method getServerGuiElement.
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int posLow, int dim, int posHigh) {
long posl = ((long) posHigh << 32) | (posLow & 0xffffffffL);
BlockPos pos = BlockPos.fromLong(posl);
World targetWorld = world;
if (world.provider.getDimension() != dim) {
targetWorld = DimensionManager.getWorld(dim);
if (targetWorld == null) {
Log.warn("Unexpected failure to get dimension " + dim + " for the Inventory Panel Remote");
return null;
}
}
TileEntity te = targetWorld.getTileEntity(pos);
if (te instanceof TileInventoryPanel) {
return new InventoryPanelContainer(player.inventory, (TileInventoryPanel) te);
}
Log.warn("Unexpected failure to get tileentity at " + pos + " in dimension " + dim + " for the Inventory Panel Remote. Got: " + te);
return null;
}
use of crazypants.enderio.machine.invpanel.InventoryPanelContainer in project EnderIO by SleepyTrousers.
the class ClientRemoteGuiManager method getClientGuiElement.
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
TileInventoryPanel te;
if (targetTE != null && targetTEtime >= EnderIO.proxy.getTickCount()) {
te = targetTE;
targetTE = null;
} else {
te = new TileInventoryPanel();
}
return new GuiInventoryPanel(te, new InventoryPanelContainer(player.inventory, te));
}
use of crazypants.enderio.machine.invpanel.InventoryPanelContainer in project EnderIO by SleepyTrousers.
the class CraftingHelper method refill.
public void refill(GuiInventoryPanel gui, int amount) {
InventoryPanelContainer container = gui.getContainer();
refill(container, amount);
}
Aggregations