Search in sources :

Example 11 with PacketSimpleMars

use of micdoodle8.mods.galacticraft.planets.mars.network.PacketSimpleMars in project Galacticraft by micdoodle8.

the class MarsUtil method openCargoRocketInventory.

public static void openCargoRocketInventory(EntityPlayerMP player, EntityCargoRocket rocket) {
    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, 1, rocket.getEntityId() }), player);
    player.openContainer = new ContainerRocketInventory(player.inventory, rocket, rocket.rocketType, player);
    player.openContainer.windowId = windowId;
    player.openContainer.onCraftGuiOpened(player);
}
Also used : ContainerRocketInventory(micdoodle8.mods.galacticraft.core.inventory.ContainerRocketInventory) PacketSimpleMars(micdoodle8.mods.galacticraft.planets.mars.network.PacketSimpleMars)

Aggregations

PacketSimpleMars (micdoodle8.mods.galacticraft.planets.mars.network.PacketSimpleMars)11 GCPlayerStats (micdoodle8.mods.galacticraft.core.entities.player.GCPlayerStats)1 ContainerRocketInventory (micdoodle8.mods.galacticraft.core.inventory.ContainerRocketInventory)1 ContainerLaunchControllerAdvanced (micdoodle8.mods.galacticraft.planets.mars.inventory.ContainerLaunchControllerAdvanced)1 ContainerSlimeling (micdoodle8.mods.galacticraft.planets.mars.inventory.ContainerSlimeling)1 Block (net.minecraft.block.Block)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 EnumStatus (net.minecraft.entity.player.EntityPlayer.EnumStatus)1 BlockPos (net.minecraft.util.BlockPos)1 ChatComponentText (net.minecraft.util.ChatComponentText)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 ChunkCoordIntPair (net.minecraft.world.ChunkCoordIntPair)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1