Своё открытие Gui с Container'ом.

Своё открытие Gui с Container'ом.

Обновление ресурса.
Добавлено.
Можно ещё по другому написать в ProxyCommon и ProxyClient:
ProxyCommon:
public class ProxyCommon {

    //IGuiHandler

    private static Container getContainer(final int id, final EntityPlayer player) {
        return null;
    }

    private static Container getContainer(final int id, final EntityPlayer player, final Entity entity) {
        return null;
    }

    private static Container getContainer(final int id, final EntityPlayer player, final World world, final int x, final int y, final int z) {
        return null;
    }

    //FMLNetworkHandler.openGui(EntityPlayer entityPlayer, Object mod, int modGuiId, World world, int x, int y, int z)

    public void openGui(byte id, EntityPlayer player) {
        if (player instanceof EntityPlayerMP) {
            EntityPlayerMP playerMP = (EntityPlayerMP)player;
            Container container = getContainer(id, player);
            if (container == null) return;
            playerMP.closeContainer();
            playerMP.getNextWindowId();
            int windowId = playerMP.currentWindowId;

            OpenGuiMessage message = new OpenGuiMessage();
            message.windowID = windowId;
            message.id = id;
            MoneyMod.network.sendTo(message, playerMP);

            player.openContainer = container;
            playerMP.openContainer.windowId = windowId;
            playerMP.openContainer.addCraftingToCrafters(playerMP);
        }
    }

    public void openGui(byte id, EntityPlayer player, Entity entity) {
        if (player instanceof EntityPlayerMP) {
            EntityPlayerMP playerMP = (EntityPlayerMP)player;
            Container container = getContainer(id, player, entity);
            if (container == null) return;
            playerMP.closeContainer();
            playerMP.getNextWindowId();
            int windowId = playerMP.currentWindowId;

            OpenGuiEntityMessage message = new OpenGuiEntityMessage();
            message.windowID = windowId;
            message.id = id;
            message.entityID = entity.getEntityId();
            MoneyMod.network.sendTo(message, playerMP);

            player.openContainer = container;
            playerMP.openContainer.windowId = windowId;
            playerMP.openContainer.addCraftingToCrafters(playerMP);
        }
    }

    public void openGui(byte id, EntityPlayer player, World world, int x, int y, int z) {
        if (player instanceof EntityPlayerMP) {
            EntityPlayerMP playerMP = (EntityPlayerMP)player;
            Container container = getContainer(id, player, world, x, y, z);
            if (container == null) return;
            playerMP.closeContainer();
            playerMP.getNextWindowId();
            int windowId = playerMP.currentWindowId;

            OpenGuiPositionMessage message = new OpenGuiPositionMessage();
            message.windowID = windowId;
            message.id = id;
            message.x = x;
            message.y = y;
            message.z = z;
            MoneyMod.network.sendTo(message, playerMP);

            player.openContainer = container;
            playerMP.openContainer.windowId = windowId;
            playerMP.openContainer.addCraftingToCrafters(playerMP);
        }
    }

}
ProxyClient:
public class ProxyClient extends ProxyCommon {

    //IGuiHandler

    private static GuiScreen getGui(final int id, final EntityPlayer player) {
        return null;
    }

    private static GuiScreen getGui(final int id, final EntityPlayer player, final Entity entity) {
        return null;
    }

    private static GuiScreen getGui(final int id, final EntityPlayer player, final World world, final int x, final int y, final int z) {
        return null;
    }

    //FMLNetworkHandler.openGui(EntityPlayer entityPlayer, Object mod, int modGuiId, World world, int x, int y, int z)

    public void openGui(byte id, EntityPlayer player) {
        if (player instanceof EntityPlayerMP)
            super.openGui(id, player);
        else if (FMLCommonHandler.instance().getSide().equals(Side.CLIENT)) {
            GuiScreen gui = getGui(id, player);
            if (gui == null) return;
            Minecraft.getMinecraft().displayGuiScreen(gui);
        }
    }

    public void openGui(byte id, EntityPlayer player, Entity entity) {
        if (player instanceof EntityPlayerMP)
            super.openGui(id, player, entity);
        else if (FMLCommonHandler.instance().getSide().equals(Side.CLIENT)) {
            GuiScreen gui = getGui(id, player, entity);
            if (gui == null) return;
            Minecraft.getMinecraft().displayGuiScreen(gui);
        }
    }

    public void openGui(byte id, EntityPlayer player, World world, int x, int y, int z) {
        if (player instanceof EntityPlayerMP)
            super.openGui(id, player, world, x, y, z);
        else if (FMLCommonHandler.instance().getSide().equals(Side.CLIENT)) {
            GuiScreen gui = getGui(id, player, world, x, y, z);
            if (gui == null) return;
            Minecraft.getMinecraft().displayGuiScreen(gui);
        }
    }

}
Сверху