Java 类net.minecraft.world.IInteractionObject 实例源码

项目:DecompiledMinecraft    文件:EntityPlayerSP.java   
public void displayGui(IInteractionObject guiOwner)
{
    String s = guiOwner.getGuiID();

    if ("minecraft:crafting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj));
    }
    else if ("minecraft:enchanting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, guiOwner));
    }
    else if ("minecraft:anvil".equals(s))
    {
        this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj));
    }
}
项目:BaseClient    文件:EntityPlayerSP.java   
public void displayGui(IInteractionObject guiOwner)
{
    String s = guiOwner.getGuiID();

    if ("minecraft:crafting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj));
    }
    else if ("minecraft:enchanting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, guiOwner));
    }
    else if ("minecraft:anvil".equals(s))
    {
        this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj));
    }
}
项目:BaseClient    文件:EntityPlayerSP.java   
/**
 * Displays the GUI for interacting with a chest inventory. Args: chestInventory
 */
public void displayGUIChest(IInventory chestInventory) {
    String s = chestInventory instanceof IInteractionObject ? ((IInteractionObject) chestInventory).getGuiID()
            : "minecraft:container";

    if ("minecraft:chest".equals(s)) {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    } else if ("minecraft:hopper".equals(s)) {
        this.mc.displayGuiScreen(new GuiHopper(this.inventory, chestInventory));
    } else if ("minecraft:furnace".equals(s)) {
        this.mc.displayGuiScreen(new GuiFurnace(this.inventory, chestInventory));
    } else if ("minecraft:brewing_stand".equals(s)) {
        this.mc.displayGuiScreen(new GuiBrewingStand(this.inventory, chestInventory));
    } else if ("minecraft:beacon".equals(s)) {
        this.mc.displayGuiScreen(new GuiBeacon(this.inventory, chestInventory));
    } else if (!"minecraft:dispenser".equals(s) && !"minecraft:dropper".equals(s)) {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    } else {
        this.mc.displayGuiScreen(new GuiDispenser(this.inventory, chestInventory));
    }
}
项目:Zombe-Modpack    文件:EntityPlayerSP.java   
public void displayGui(IInteractionObject guiOwner)
{
    String s = guiOwner.getGuiID();

    if ("minecraft:crafting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.world));
    }
    else if ("minecraft:enchanting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.world, guiOwner));
    }
    else if ("minecraft:anvil".equals(s))
    {
        this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.world));
    }
}
项目:Backmemed    文件:EntityPlayerSP.java   
public void displayGui(IInteractionObject guiOwner)
{
    String s = guiOwner.getGuiID();

    if ("minecraft:crafting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.world));
    }
    else if ("minecraft:enchanting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.world, guiOwner));
    }
    else if ("minecraft:anvil".equals(s))
    {
        this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.world));
    }
}
项目:CustomWorldGen    文件:EntityPlayerMP.java   
public void displayGui(IInteractionObject guiOwner)
{
    if (guiOwner instanceof ILootContainer && ((ILootContainer)guiOwner).getLootTable() != null && this.isSpectator())
    {
        this.addChatMessage((new TextComponentTranslation("container.spectatorCantOpen", new Object[0])).setStyle((new Style()).setColor(TextFormatting.RED)));
    }
    else
    {
        this.getNextWindowId();
        this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, guiOwner.getGuiID(), guiOwner.getDisplayName()));
        this.openContainer = guiOwner.createContainer(this.inventory, this);
        this.openContainer.windowId = this.currentWindowId;
        this.openContainer.addListener(this);
        net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.player.PlayerContainerEvent.Open(this, this.openContainer));
    }
}
项目:CustomWorldGen    文件:EntityPlayerSP.java   
public void displayGui(IInteractionObject guiOwner)
{
    String s = guiOwner.getGuiID();

    if ("minecraft:crafting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj));
    }
    else if ("minecraft:enchanting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, guiOwner));
    }
    else if ("minecraft:anvil".equals(s))
    {
        this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj));
    }
}
项目:ExpandedRailsMod    文件:EntityPlayerMP.java   
public void displayGui(IInteractionObject guiOwner)
{
    if (guiOwner instanceof ILootContainer && ((ILootContainer)guiOwner).getLootTable() != null && this.isSpectator())
    {
        this.addChatMessage((new TextComponentTranslation("container.spectatorCantOpen", new Object[0])).setStyle((new Style()).setColor(TextFormatting.RED)));
    }
    else
    {
        this.getNextWindowId();
        this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, guiOwner.getGuiID(), guiOwner.getDisplayName()));
        this.openContainer = guiOwner.createContainer(this.inventory, this);
        this.openContainer.windowId = this.currentWindowId;
        this.openContainer.addListener(this);
        net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.player.PlayerContainerEvent.Open(this, this.openContainer));
    }
}
项目:ExpandedRailsMod    文件:EntityPlayerSP.java   
public void displayGui(IInteractionObject guiOwner)
{
    String s = guiOwner.getGuiID();

    if ("minecraft:crafting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj));
    }
    else if ("minecraft:enchanting_table".equals(s))
    {
        this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, guiOwner));
    }
    else if ("minecraft:anvil".equals(s))
    {
        this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj));
    }
}
项目:DecompiledMinecraft    文件:EntityPlayerMP.java   
public void displayGui(IInteractionObject guiOwner)
{
    this.getNextWindowId();
    this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, guiOwner.getGuiID(), guiOwner.getDisplayName()));
    this.openContainer = guiOwner.createContainer(this.inventory, this);
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.onCraftGuiOpened(this);
}
项目:DecompiledMinecraft    文件:EntityPlayerMP.java   
/**
 * Displays the GUI for interacting with a chest inventory. Args: chestInventory
 */
public void displayGUIChest(IInventory chestInventory)
{
    if (this.openContainer != this.inventoryContainer)
    {
        this.closeScreen();
    }

    if (chestInventory instanceof ILockableContainer)
    {
        ILockableContainer ilockablecontainer = (ILockableContainer)chestInventory;

        if (ilockablecontainer.isLocked() && !this.canOpen(ilockablecontainer.getLockCode()) && !this.isSpectator())
        {
            this.playerNetServerHandler.sendPacket(new S02PacketChat(new ChatComponentTranslation("container.isLocked", new Object[] {chestInventory.getDisplayName()}), (byte)2));
            this.playerNetServerHandler.sendPacket(new S29PacketSoundEffect("random.door_close", this.posX, this.posY, this.posZ, 1.0F, 1.0F));
            return;
        }
    }

    this.getNextWindowId();

    if (chestInventory instanceof IInteractionObject)
    {
        this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, ((IInteractionObject)chestInventory).getGuiID(), chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
        this.openContainer = ((IInteractionObject)chestInventory).createContainer(this.inventory, this);
    }
    else
    {
        this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, "minecraft:container", chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
        this.openContainer = new ContainerChest(this.inventory, chestInventory, this);
    }

    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.onCraftGuiOpened(this);
}
项目:DecompiledMinecraft    文件:EntityPlayerMP.java   
public void displayGui(IInteractionObject guiOwner)
{
    this.getNextWindowId();
    this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, guiOwner.getGuiID(), guiOwner.getDisplayName()));
    this.openContainer = guiOwner.createContainer(this.inventory, this);
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.onCraftGuiOpened(this);
}
项目:DecompiledMinecraft    文件:EntityPlayerMP.java   
/**
 * Displays the GUI for interacting with a chest inventory. Args: chestInventory
 */
public void displayGUIChest(IInventory chestInventory)
{
    if (this.openContainer != this.inventoryContainer)
    {
        this.closeScreen();
    }

    if (chestInventory instanceof ILockableContainer)
    {
        ILockableContainer ilockablecontainer = (ILockableContainer)chestInventory;

        if (ilockablecontainer.isLocked() && !this.canOpen(ilockablecontainer.getLockCode()) && !this.isSpectator())
        {
            this.playerNetServerHandler.sendPacket(new S02PacketChat(new ChatComponentTranslation("container.isLocked", new Object[] {chestInventory.getDisplayName()}), (byte)2));
            this.playerNetServerHandler.sendPacket(new S29PacketSoundEffect("random.door_close", this.posX, this.posY, this.posZ, 1.0F, 1.0F));
            return;
        }
    }

    this.getNextWindowId();

    if (chestInventory instanceof IInteractionObject)
    {
        this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, ((IInteractionObject)chestInventory).getGuiID(), chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
        this.openContainer = ((IInteractionObject)chestInventory).createContainer(this.inventory, this);
    }
    else
    {
        this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, "minecraft:container", chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
        this.openContainer = new ContainerChest(this.inventory, chestInventory, this);
    }

    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.onCraftGuiOpened(this);
}
项目:DecompiledMinecraft    文件:EntityPlayerSP.java   
/**
 * Displays the GUI for interacting with a chest inventory. Args: chestInventory
 */
public void displayGUIChest(IInventory chestInventory)
{
    String s = chestInventory instanceof IInteractionObject ? ((IInteractionObject)chestInventory).getGuiID() : "minecraft:container";

    if ("minecraft:chest".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else if ("minecraft:hopper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiHopper(this.inventory, chestInventory));
    }
    else if ("minecraft:furnace".equals(s))
    {
        this.mc.displayGuiScreen(new GuiFurnace(this.inventory, chestInventory));
    }
    else if ("minecraft:brewing_stand".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBrewingStand(this.inventory, chestInventory));
    }
    else if ("minecraft:beacon".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBeacon(this.inventory, chestInventory));
    }
    else if (!"minecraft:dispenser".equals(s) && !"minecraft:dropper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else
    {
        this.mc.displayGuiScreen(new GuiDispenser(this.inventory, chestInventory));
    }
}
项目:BaseClient    文件:EntityPlayerMP.java   
public void displayGui(IInteractionObject guiOwner)
{
    this.getNextWindowId();
    this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, guiOwner.getGuiID(), guiOwner.getDisplayName()));
    this.openContainer = guiOwner.createContainer(this.inventory, this);
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.onCraftGuiOpened(this);
}
项目:BaseClient    文件:EntityPlayerMP.java   
/**
 * Displays the GUI for interacting with a chest inventory. Args: chestInventory
 */
public void displayGUIChest(IInventory chestInventory)
{
    if (this.openContainer != this.inventoryContainer)
    {
        this.closeScreen();
    }

    if (chestInventory instanceof ILockableContainer)
    {
        ILockableContainer ilockablecontainer = (ILockableContainer)chestInventory;

        if (ilockablecontainer.isLocked() && !this.canOpen(ilockablecontainer.getLockCode()) && !this.isSpectator())
        {
            this.playerNetServerHandler.sendPacket(new S02PacketChat(new ChatComponentTranslation("container.isLocked", new Object[] {chestInventory.getDisplayName()}), (byte)2));
            this.playerNetServerHandler.sendPacket(new S29PacketSoundEffect("random.door_close", this.posX, this.posY, this.posZ, 1.0F, 1.0F));
            return;
        }
    }

    this.getNextWindowId();

    if (chestInventory instanceof IInteractionObject)
    {
        this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, ((IInteractionObject)chestInventory).getGuiID(), chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
        this.openContainer = ((IInteractionObject)chestInventory).createContainer(this.inventory, this);
    }
    else
    {
        this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, "minecraft:container", chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
        this.openContainer = new ContainerChest(this.inventory, chestInventory, this);
    }

    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.onCraftGuiOpened(this);
}
项目:BaseClient    文件:EntityPlayerSP.java   
/**
 * Displays the GUI for interacting with a chest inventory. Args: chestInventory
 */
public void displayGUIChest(IInventory chestInventory)
{
    String s = chestInventory instanceof IInteractionObject ? ((IInteractionObject)chestInventory).getGuiID() : "minecraft:container";

    if ("minecraft:chest".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else if ("minecraft:hopper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiHopper(this.inventory, chestInventory));
    }
    else if ("minecraft:furnace".equals(s))
    {
        this.mc.displayGuiScreen(new GuiFurnace(this.inventory, chestInventory));
    }
    else if ("minecraft:brewing_stand".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBrewingStand(this.inventory, chestInventory));
    }
    else if ("minecraft:beacon".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBeacon(this.inventory, chestInventory));
    }
    else if (!"minecraft:dispenser".equals(s) && !"minecraft:dropper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else
    {
        this.mc.displayGuiScreen(new GuiDispenser(this.inventory, chestInventory));
    }
}
项目:BaseClient    文件:EntityPlayerMP.java   
public void displayGui(IInteractionObject guiOwner)
{
    this.getNextWindowId();
    this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, guiOwner.getGuiID(), guiOwner.getDisplayName()));
    this.openContainer = guiOwner.createContainer(this.inventory, this);
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.onCraftGuiOpened(this);
}
项目:BaseClient    文件:EntityPlayerMP.java   
/**
 * Displays the GUI for interacting with a chest inventory. Args: chestInventory
 */
public void displayGUIChest(IInventory chestInventory)
{
    if (this.openContainer != this.inventoryContainer)
    {
        this.closeScreen();
    }

    if (chestInventory instanceof ILockableContainer)
    {
        ILockableContainer ilockablecontainer = (ILockableContainer)chestInventory;

        if (ilockablecontainer.isLocked() && !this.canOpen(ilockablecontainer.getLockCode()) && !this.isSpectator())
        {
            this.playerNetServerHandler.sendPacket(new S02PacketChat(new ChatComponentTranslation("container.isLocked", new Object[] {chestInventory.getDisplayName()}), (byte)2));
            this.playerNetServerHandler.sendPacket(new S29PacketSoundEffect("random.door_close", this.posX, this.posY, this.posZ, 1.0F, 1.0F));
            return;
        }
    }

    this.getNextWindowId();

    if (chestInventory instanceof IInteractionObject)
    {
        this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, ((IInteractionObject)chestInventory).getGuiID(), chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
        this.openContainer = ((IInteractionObject)chestInventory).createContainer(this.inventory, this);
    }
    else
    {
        this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, "minecraft:container", chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
        this.openContainer = new ContainerChest(this.inventory, chestInventory, this);
    }

    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.onCraftGuiOpened(this);
}
项目:BaseClient    文件:EntityPlayerSP.java   
public void displayGui(IInteractionObject guiOwner) {
    String s = guiOwner.getGuiID();

    if ("minecraft:crafting_table".equals(s)) {
        this.mc.displayGuiScreen(new GuiCrafting(this.inventory, this.worldObj));
    } else if ("minecraft:enchanting_table".equals(s)) {
        this.mc.displayGuiScreen(new GuiEnchantment(this.inventory, this.worldObj, guiOwner));
    } else if ("minecraft:anvil".equals(s)) {
        this.mc.displayGuiScreen(new GuiRepair(this.inventory, this.worldObj));
    }
}
项目:UniversalRemote    文件:EntityPlayerMPProxy.java   
@Override
public void displayGui(IInteractionObject guiOwner) {
    if (m_realPlayer == null) {
        super.displayGui(guiOwner);
    } else {
        syncToRealPlayer();
        m_realPlayer.displayGui(guiOwner);
        syncPublicFieldsFromReal();
    }
}
项目:UniversalRemote    文件:EntityPlayerProxy.java   
@Override
public void displayGui(IInteractionObject guiOwner) {
    if (m_realPlayer == null) {
        super.displayGui(guiOwner);
    } else {
        m_realPlayer.displayGui(guiOwner);
    }
}
项目:Zombe-Modpack    文件:EntityPlayerMP.java   
public void displayGui(IInteractionObject guiOwner)
{
    if (guiOwner instanceof ILootContainer && ((ILootContainer)guiOwner).getLootTable() != null && this.isSpectator())
    {
        this.addChatComponentMessage((new TextComponentTranslation("container.spectatorCantOpen", new Object[0])).setStyle((new Style()).setColor(TextFormatting.RED)), true);
    }
    else
    {
        this.getNextWindowId();
        this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, guiOwner.getGuiID(), guiOwner.getDisplayName()));
        this.openContainer = guiOwner.createContainer(this.inventory, this);
        this.openContainer.windowId = this.currentWindowId;
        this.openContainer.addListener(this);
    }
}
项目:Backmemed    文件:EntityPlayerMP.java   
public void displayGui(IInteractionObject guiOwner)
{
    if (guiOwner instanceof ILootContainer && ((ILootContainer)guiOwner).getLootTable() != null && this.isSpectator())
    {
        this.addChatComponentMessage((new TextComponentTranslation("container.spectatorCantOpen", new Object[0])).setStyle((new Style()).setColor(TextFormatting.RED)), true);
    }
    else
    {
        this.getNextWindowId();
        this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, guiOwner.getGuiID(), guiOwner.getDisplayName()));
        this.openContainer = guiOwner.createContainer(this.inventory, this);
        this.openContainer.windowId = this.currentWindowId;
        this.openContainer.addListener(this);
    }
}
项目:CustomWorldGen    文件:EntityPlayerSP.java   
/**
 * Displays the GUI for interacting with a chest inventory.
 */
public void displayGUIChest(IInventory chestInventory)
{
    String s = chestInventory instanceof IInteractionObject ? ((IInteractionObject)chestInventory).getGuiID() : "minecraft:container";

    if ("minecraft:chest".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else if ("minecraft:hopper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiHopper(this.inventory, chestInventory));
    }
    else if ("minecraft:furnace".equals(s))
    {
        this.mc.displayGuiScreen(new GuiFurnace(this.inventory, chestInventory));
    }
    else if ("minecraft:brewing_stand".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBrewingStand(this.inventory, chestInventory));
    }
    else if ("minecraft:beacon".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBeacon(this.inventory, chestInventory));
    }
    else if (!"minecraft:dispenser".equals(s) && !"minecraft:dropper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else
    {
        this.mc.displayGuiScreen(new GuiDispenser(this.inventory, chestInventory));
    }
}
项目:MeddleAPI    文件:MeddleClientHooks.java   
public static void displayGuiHook(EntityPlayerSP player, IInteractionObject iiobject)
{
    if (debug) System.out.println("displayGui: " + iiobject.getGuiID());

    MeddleClient.IDisplayGui handler = MeddleClient.guiHandlers.get(iiobject.getGuiID());
    if (handler != null) handler.onOpenGui(player, iiobject.getGuiID(), iiobject.getDisplayName(), 0);
}
项目:ExpandedRailsMod    文件:EntityPlayerSP.java   
/**
 * Displays the GUI for interacting with a chest inventory.
 */
public void displayGUIChest(IInventory chestInventory)
{
    String s = chestInventory instanceof IInteractionObject ? ((IInteractionObject)chestInventory).getGuiID() : "minecraft:container";

    if ("minecraft:chest".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else if ("minecraft:hopper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiHopper(this.inventory, chestInventory));
    }
    else if ("minecraft:furnace".equals(s))
    {
        this.mc.displayGuiScreen(new GuiFurnace(this.inventory, chestInventory));
    }
    else if ("minecraft:brewing_stand".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBrewingStand(this.inventory, chestInventory));
    }
    else if ("minecraft:beacon".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBeacon(this.inventory, chestInventory));
    }
    else if (!"minecraft:dispenser".equals(s) && !"minecraft:dropper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else
    {
        this.mc.displayGuiScreen(new GuiDispenser(this.inventory, chestInventory));
    }
}
项目:DecompiledMinecraft    文件:EntityPlayer.java   
public void displayGui(IInteractionObject guiOwner)
{
}
项目:DecompiledMinecraft    文件:EntityPlayer.java   
public void displayGui(IInteractionObject guiOwner)
{
}
项目:BaseClient    文件:EntityPlayer.java   
public void displayGui(IInteractionObject guiOwner)
{
}
项目:BaseClient    文件:EntityPlayer.java   
public void displayGui(IInteractionObject guiOwner)
{
}
项目:Zombe-Modpack    文件:EntityPlayerMP.java   
/**
 * Displays the GUI for interacting with a chest inventory.
 */
public void displayGUIChest(IInventory chestInventory)
{
    if (chestInventory instanceof ILootContainer && ((ILootContainer)chestInventory).getLootTable() != null && this.isSpectator())
    {
        this.addChatComponentMessage((new TextComponentTranslation("container.spectatorCantOpen", new Object[0])).setStyle((new Style()).setColor(TextFormatting.RED)), true);
    }
    else
    {
        if (this.openContainer != this.inventoryContainer)
        {
            this.closeScreen();
        }

        if (chestInventory instanceof ILockableContainer)
        {
            ILockableContainer ilockablecontainer = (ILockableContainer)chestInventory;

            if (ilockablecontainer.isLocked() && !this.canOpen(ilockablecontainer.getLockCode()) && !this.isSpectator())
            {
                this.connection.sendPacket(new SPacketChat(new TextComponentTranslation("container.isLocked", new Object[] {chestInventory.getDisplayName()}), (byte)2));
                this.connection.sendPacket(new SPacketSoundEffect(SoundEvents.BLOCK_CHEST_LOCKED, SoundCategory.BLOCKS, this.posX, this.posY, this.posZ, 1.0F, 1.0F));
                return;
            }
        }

        this.getNextWindowId();

        if (chestInventory instanceof IInteractionObject)
        {
            this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, ((IInteractionObject)chestInventory).getGuiID(), chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
            this.openContainer = ((IInteractionObject)chestInventory).createContainer(this.inventory, this);
        }
        else
        {
            this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, "minecraft:container", chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
            this.openContainer = new ContainerChest(this.inventory, chestInventory, this);
        }

        this.openContainer.windowId = this.currentWindowId;
        this.openContainer.addListener(this);
    }
}
项目:Zombe-Modpack    文件:EntityPlayer.java   
public void displayGui(IInteractionObject guiOwner)
{
}
项目:Zombe-Modpack    文件:EntityPlayerSP.java   
/**
 * Displays the GUI for interacting with a chest inventory.
 */
public void displayGUIChest(IInventory chestInventory)
{
    String s = chestInventory instanceof IInteractionObject ? ((IInteractionObject)chestInventory).getGuiID() : "minecraft:container";

    if ("minecraft:chest".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else if ("minecraft:hopper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiHopper(this.inventory, chestInventory));
    }
    else if ("minecraft:furnace".equals(s))
    {
        this.mc.displayGuiScreen(new GuiFurnace(this.inventory, chestInventory));
    }
    else if ("minecraft:brewing_stand".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBrewingStand(this.inventory, chestInventory));
    }
    else if ("minecraft:beacon".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBeacon(this.inventory, chestInventory));
    }
    else if (!"minecraft:dispenser".equals(s) && !"minecraft:dropper".equals(s))
    {
        if ("minecraft:shulker_box".equals(s))
        {
            this.mc.displayGuiScreen(new GuiShulkerBox(this.inventory, chestInventory));
        }
        else
        {
            this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
        }
    }
    else
    {
        this.mc.displayGuiScreen(new GuiDispenser(this.inventory, chestInventory));
    }
}
项目:Backmemed    文件:EntityPlayerMP.java   
/**
 * Displays the GUI for interacting with a chest inventory.
 */
public void displayGUIChest(IInventory chestInventory)
{
    if (chestInventory instanceof ILootContainer && ((ILootContainer)chestInventory).getLootTable() != null && this.isSpectator())
    {
        this.addChatComponentMessage((new TextComponentTranslation("container.spectatorCantOpen", new Object[0])).setStyle((new Style()).setColor(TextFormatting.RED)), true);
    }
    else
    {
        if (this.openContainer != this.inventoryContainer)
        {
            this.closeScreen();
        }

        if (chestInventory instanceof ILockableContainer)
        {
            ILockableContainer ilockablecontainer = (ILockableContainer)chestInventory;

            if (ilockablecontainer.isLocked() && !this.canOpen(ilockablecontainer.getLockCode()) && !this.isSpectator())
            {
                this.connection.sendPacket(new SPacketChat(new TextComponentTranslation("container.isLocked", new Object[] {chestInventory.getDisplayName()}), (byte)2));
                this.connection.sendPacket(new SPacketSoundEffect(SoundEvents.BLOCK_CHEST_LOCKED, SoundCategory.BLOCKS, this.posX, this.posY, this.posZ, 1.0F, 1.0F));
                return;
            }
        }

        this.getNextWindowId();

        if (chestInventory instanceof IInteractionObject)
        {
            this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, ((IInteractionObject)chestInventory).getGuiID(), chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
            this.openContainer = ((IInteractionObject)chestInventory).createContainer(this.inventory, this);
        }
        else
        {
            this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, "minecraft:container", chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
            this.openContainer = new ContainerChest(this.inventory, chestInventory, this);
        }

        this.openContainer.windowId = this.currentWindowId;
        this.openContainer.addListener(this);
    }
}
项目:Backmemed    文件:EntityPlayer.java   
public void displayGui(IInteractionObject guiOwner)
{
}
项目:Backmemed    文件:EntityPlayerSP.java   
/**
 * Displays the GUI for interacting with a chest inventory.
 */
public void displayGUIChest(IInventory chestInventory)
{
    String s = chestInventory instanceof IInteractionObject ? ((IInteractionObject)chestInventory).getGuiID() : "minecraft:container";

    if ("minecraft:chest".equals(s))
    {
        this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
    }
    else if ("minecraft:hopper".equals(s))
    {
        this.mc.displayGuiScreen(new GuiHopper(this.inventory, chestInventory));
    }
    else if ("minecraft:furnace".equals(s))
    {
        this.mc.displayGuiScreen(new GuiFurnace(this.inventory, chestInventory));
    }
    else if ("minecraft:brewing_stand".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBrewingStand(this.inventory, chestInventory));
    }
    else if ("minecraft:beacon".equals(s))
    {
        this.mc.displayGuiScreen(new GuiBeacon(this.inventory, chestInventory));
    }
    else if (!"minecraft:dispenser".equals(s) && !"minecraft:dropper".equals(s))
    {
        if ("minecraft:shulker_box".equals(s))
        {
            this.mc.displayGuiScreen(new GuiShulkerBox(this.inventory, chestInventory));
        }
        else
        {
            this.mc.displayGuiScreen(new GuiChest(this.inventory, chestInventory));
        }
    }
    else
    {
        this.mc.displayGuiScreen(new GuiDispenser(this.inventory, chestInventory));
    }
}
项目:CustomWorldGen    文件:EntityPlayerMP.java   
/**
 * Displays the GUI for interacting with a chest inventory.
 */
public void displayGUIChest(IInventory chestInventory)
{
    if (chestInventory instanceof ILootContainer && ((ILootContainer)chestInventory).getLootTable() != null && this.isSpectator())
    {
        this.addChatMessage((new TextComponentTranslation("container.spectatorCantOpen", new Object[0])).setStyle((new Style()).setColor(TextFormatting.RED)));
    }
    else
    {
        if (this.openContainer != this.inventoryContainer)
        {
            this.closeScreen();
        }

        if (chestInventory instanceof ILockableContainer)
        {
            ILockableContainer ilockablecontainer = (ILockableContainer)chestInventory;

            if (ilockablecontainer.isLocked() && !this.canOpen(ilockablecontainer.getLockCode()) && !this.isSpectator())
            {
                this.connection.sendPacket(new SPacketChat(new TextComponentTranslation("container.isLocked", new Object[] {chestInventory.getDisplayName()}), (byte)2));
                this.connection.sendPacket(new SPacketSoundEffect(SoundEvents.BLOCK_CHEST_LOCKED, SoundCategory.BLOCKS, this.posX, this.posY, this.posZ, 1.0F, 1.0F));
                return;
            }
        }

        this.getNextWindowId();

        if (chestInventory instanceof IInteractionObject)
        {
            this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, ((IInteractionObject)chestInventory).getGuiID(), chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
            this.openContainer = ((IInteractionObject)chestInventory).createContainer(this.inventory, this);
        }
        else
        {
            this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, "minecraft:container", chestInventory.getDisplayName(), chestInventory.getSizeInventory()));
            this.openContainer = new ContainerChest(this.inventory, chestInventory, this);
        }

        this.openContainer.windowId = this.currentWindowId;
        this.openContainer.addListener(this);
        net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.player.PlayerContainerEvent.Open(this, this.openContainer));
    }
}
项目:CustomWorldGen    文件:EntityPlayer.java   
public void displayGui(IInteractionObject guiOwner)
{
}
项目:placementpreview    文件:FakePlayerSP.java   
@Override
public void displayGui(IInteractionObject guiOwner)
{
    // NO-OP
}