{"action":"opened","issue":{"url":"https://api.github.com/repos/McJty/ModTutorials/issues/9","repository_url":"https://api.github.com/repos/McJty/ModTutorials","labels_url":"https://api.github.com/repos/McJty/ModTutorials/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/McJty/ModTutorials/issues/9/comments","events_url":"https://api.github.com/repos/McJty/ModTutorials/issues/9/events","html_url":"https://github.com/McJty/ModTutorials/issues/9","id":173762699,"number":9,"title":"Container Created Twice?","user":{"login":"zenmogwai","id":21295035,"avatar_url":"https://avatars.githubusercontent.com/u/21295035?v=3","gravatar_id":"","url":"https://api.github.com/users/zenmogwai","html_url":"https://github.com/zenmogwai","followers_url":"https://api.github.com/users/zenmogwai/followers","following_url":"https://api.github.com/users/zenmogwai/following{/other_user}","gists_url":"https://api.github.com/users/zenmogwai/gists{/gist_id}","starred_url":"https://api.github.com/users/zenmogwai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenmogwai/subscriptions","organizations_url":"https://api.github.com/users/zenmogwai/orgs","repos_url":"https://api.github.com/users/zenmogwai/repos","events_url":"https://api.github.com/users/zenmogwai/events{/privacy}","received_events_url":"https://api.github.com/users/zenmogwai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-29T12:26:21Z","updated_at":"2016-08-29T12:26:21Z","closed_at":null,"body":"Hey, sorry I keep leaving these as issues but I can't find another way to correspond.  I'm learning how to code for Minecraft and I'm trying to understand every method.  So I'm following every line closer than normal.  I noticed that the container is created twice because of the methods in GuiProxy.  Is it supposed to be or is it preferable to create it only once?\r\n\r\nLine 19 creates a new TestContainer server side.  Also line 30 creates another new TestContainer client side.   It is possible if I create a TestContainer field in GuiProxy to pass the TestContainer created from the server method down to the client method and then only create one container...\r\n\r\nBoth approaches (one or two containers) don't appear to cause any errors.  Which is preferable?  Is there a reason why you would want to create one or two containers?\r\n\r\n```\r\n12 public class GuiProxy implements IGuiHandler { \r\n13 \r\n14     @Override \r\n15     public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { \r\n16         BlockPos pos = new BlockPos(x, y, z); \r\n17         TileEntity te = world.getTileEntity(pos); \r\n18         if (te instanceof TestContainerTileEntity) { \r\n19             return new TestContainer(player.inventory, (TestContainerTileEntity) te); \r\n20         } \r\n21         return null; \r\n22     } \r\n23 \r\n24     @Override \r\n25     public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { \r\n26         BlockPos pos = new BlockPos(x, y, z); \r\n27         TileEntity te = world.getTileEntity(pos); \r\n28         if (te instanceof TestContainerTileEntity) { \r\n29             TestContainerTileEntity containerTileEntity = (TestContainerTileEntity) te; \r\n30             return new TestContainerGui(containerTileEntity, new TestContainer(player.inventory, containerTileEntity)); \r\n31         } \r\n32         return null; \r\n33     } \r\n```\r\n"}}
{"actor":{"display_login":"zenmogwai"}}