use of micdoodle8.mods.galacticraft.planets.mars.inventory.ContainerSlimeling in project Galacticraft by micdoodle8.
the class MarsUtil method openSlimelingInventory.
public static void openSlimelingInventory(EntityPlayerMP player, EntitySlimeling slimeling) {
player.getNextWindowId();
player.closeContainer();
int windowId = player.currentWindowId;
GalacticraftCore.packetPipeline.sendTo(new PacketSimpleMars(EnumSimplePacketMars.C_OPEN_CUSTOM_GUI, GCCoreUtil.getDimensionID(player.worldObj), new Object[] { windowId, 0, slimeling.getEntityId() }), player);
player.openContainer = new ContainerSlimeling(player.inventory, slimeling, player);
player.openContainer.windowId = windowId;
player.openContainer.onCraftGuiOpened(player);
}
use of micdoodle8.mods.galacticraft.planets.mars.inventory.ContainerSlimeling in project Galacticraft by micdoodle8.
the class ContainerSlimeling method addSlots.
public static void addSlots(ContainerSlimeling container, InventoryPlayer playerInventory, EntitySlimeling slimeling) {
Slot slot = new SlotSpecific(slimeling.slimelingInventory, 1, 9, 30, new ItemStack(MarsItems.marsItemBasic, 1, 4));
container.addSlotToContainer(slot);
int var3;
for (var3 = 0; var3 < 3; ++var3) {
for (int var4 = 0; var4 < 9; ++var4) {
slot = new Slot(playerInventory, var4 + var3 * 9 + 9, 8 + var4 * 18, 129 + var3 * 18);
container.addSlotToContainer(slot);
}
}
for (var3 = 0; var3 < 9; ++var3) {
slot = new Slot(playerInventory, var3, 8 + var3 * 18, 187);
container.addSlotToContainer(slot);
}
}
Aggregations