Posted July 26, 201510 yr I'm sitting here now for hours, and I do'nt know why this isn't working, I have some problem with my Container and GuiContainer: PS: I'm definetly not new to java, but maybe sometimes a experienced person gets some mistakes public class GuiHandler implements IGuiHandler{ @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(new BlockPos(x, y, z)); if(tileEntity instanceof TileEntityArmorModifier){ return new ContainerArmorModifier(player.inventory, (TileEntityArmorModifier) tileEntity); } return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { TileEntity tileEntity = world.getTileEntity(new BlockPos(x, y, z)); if(tileEntity instanceof TileEntityArmorModifier){ return new GuiArmorModifier(player.inventory, (TileEntityArmorModifier) tileEntity); } return null; } } public class ContainerArmorModifier extends Container{ protected TileEntity tileEntity; public ContainerArmorModifier(InventoryPlayer invPlayer, TileEntityArmorModifier te) { tileEntity = te; } } An there is my Error public class GuiArmorModifier extends GuiContainer{ public GuiArmorModifier(InventoryPlayer inventory, TileEntityArmorModifier tileEntity) { super(new ContainerArmorModifier(inventory, tileEntity)); //this doesn't work here, I get an error here, But I cant understand why } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { } } Creator of Extra Shoes Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then
July 26, 201510 yr would u mind to tell us ur error? EDIT: You should be switiching by the id given in the GuiHandler, its better style :b
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.