Examples of closeContainer()


Examples of net.minecraft.entity.player.EntityPlayerMP.closeContainer()

  public static void openGui(EntityPlayer pl, String name, int columns, int rows, String title, Container container) {
   
    EntityPlayerMP player = (EntityPlayerMP)pl;
    if (title == null) title = "";
   
    player.closeContainer();
    player.getNextWindowId();
   
    BetterStorage.networkChannel.sendTo(
        new PacketOpenGui(player.currentWindowId, name, columns, rows, title), player);
   
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP.closeContainer()

    if(!(oPlayer instanceof EntityPlayerMP)) throw new UnsupportedOperationException("Gui can only be opened on the server side");
    EntityPlayerMP player = (EntityPlayerMP) oPlayer;
    Container container = guiProvider.getContainer(player);
    if(container == null) return;
    player.getNextWindowId();
        player.closeContainer();
        int windowId = player.currentWindowId;

        GUIPacket packet = PacketHandler.getPacket(GUIPacket.class);
    LPDataOutputStream data = new LPDataOutputStream();
    guiProvider.writeData(data);
View Full Code Here

Examples of net.minecraft.entity.player.EntityPlayerMP.closeContainer()

            EntityPlayerMP entityPlayerMP = (EntityPlayerMP) entityPlayer;
            Container remoteGuiContainer = NetworkRegistry.INSTANCE.getRemoteGuiContainer(mc, entityPlayerMP, modGuiId, world, x, y, z);
            if (remoteGuiContainer != null)
            {
                entityPlayerMP.getNextWindowId();
                entityPlayerMP.closeContainer();
                int windowId = entityPlayerMP.currentWindowId;
                FMLMessage.OpenGui openGui = new FMLMessage.OpenGui(windowId, mc.getModId(), modGuiId, x, y, z);
                EmbeddedChannel embeddedChannel = channelPair.get(Side.SERVER);
                embeddedChannel.attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.PLAYER);
                embeddedChannel.attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(entityPlayerMP);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.