_gjkf_ Posted July 16, 2014 Posted July 16, 2014 Hello everyone!!! I'm making a mod that adds 2 items, an helmet that allows the player to listen to the radio while playing and the radio crystal that should go inside the helmet. My goal is to make a GUI for the helmet with only 1 slot that can contain only the radio crystal. I have no clue with GUIs, I looked at Minecraft code in order to do it (the ChestContainer class, the ChestGui). I have no idea where's my problem. Here's the crash report ---- Minecraft Crash Report ---- // Surprise! Haha. Well, this is awkward. Time: 16/07/14 15.05 Description: Unexpected error java.lang.NullPointerException: Unexpected error at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263) at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93) at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2514) at com.gjkf.headPhones.items.HeadPhones.onItemRightClick(HeadPhones.java:36) at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:166) at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:434) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1556) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2043) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1038) at net.minecraft.client.Minecraft.run(Minecraft.java:961) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at GradleStart.bounce(GradleStart.java:95) at GradleStart.startClient(GradleStart.java:88) at GradleStart.main(GradleStart.java:56) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263) at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93) at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2514) at com.gjkf.headPhones.items.HeadPhones.onItemRightClick(HeadPhones.java:36) at net.minecraft.item.ItemStack.useItemRightClick(ItemStack.java:166) at net.minecraft.client.multiplayer.PlayerControllerMP.sendUseItem(PlayerControllerMP.java:434) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1556) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['ForgeDevName'/168, l='MpServer', x=12,68, y=5,54, z=1,66]] Chunk stats: MultiplayerChunkCache: 360, 360 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: World: (356,4,-283), Chunk: (at 4,0,5 in 22,-18; contains blocks 352,0,-288 to 367,255,-273), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1) Level time: 5568 game time, 2346 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 1 total; [EntityClientPlayerMP['ForgeDevName'/168, l='MpServer', x=12,68, y=5,54, z=1,66]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:417) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2567) at net.minecraft.client.Minecraft.run(Minecraft.java:990) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at GradleStart.bounce(GradleStart.java:95) at GradleStart.startClient(GradleStart.java:88) at GradleStart.main(GradleStart.java:56) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Mac OS X (x86_64) version 10.7.5 Java Version: 1.7.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 842866192 bytes (803 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.18.1180 Minecraft Forge 10.13.0.1180 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.18.1180} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.0.1180} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available HeadPhonesRadio{0.1} [HeadPhonesRadio] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: NVIDIA GeForce 9400M OpenGL Engine GL version 2.1 NVIDIA-7.32.12, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) Here's my Main class package com.gjkf.headPhones; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemStack; import net.minecraftforge.common.util.EnumHelper; import com.gjkf.headPhones.creativeTab.HeadPhonesCreativeTab; import com.gjkf.headPhones.handler.ConfigurationHandler; import com.gjkf.headPhones.items.HeadPhones; import com.gjkf.headPhones.items.RadioCrystal; import com.gjkf.headPhones.proxy.CommonProxy; import com.gjkf.headPhones.reference.References; import com.gjkf.headPhones.utility.LogHelper; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = References.MODID, name = References.MOD_NAME,version = References.VERSION, guiFactory = References.GUI_FACTORY_CLASS) public class Main { @Instance(References.MODID) public static Main instance; @SidedProxy(clientSide = References.CLIENT_PROXY_CLASS, serverSide = References.SERVER_PROXY_CLASS) public static CommonProxy proxy; public static int headPhonesId; public static CreativeTabs tab = new HeadPhonesCreativeTab(CreativeTabs.getNextID(), "HeadPhonesTab"); public static ArmorMaterial plastic = new EnumHelper().addArmorMaterial("plastic", 100, new int[]{1,0,0,0}, 0); public static Item headPhones = new HeadPhones(plastic, headPhonesId, 0).setUnlocalizedName("headPhones") .setCreativeTab(tab); public static Item radioCrystal = new RadioCrystal().setUnlocalizedName("radioCrystal").setCreativeTab(tab); @EventHandler public void preinit(FMLPreInitializationEvent event){ ConfigurationHandler.init(event.getSuggestedConfigurationFile()); FMLCommonHandler.instance().bus().register(new ConfigurationHandler()); GameRegistry.registerItem(headPhones, "headPhones"); GameRegistry.registerItem(radioCrystal, "radioCrystal"); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_11); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_13); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_cat); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_chirp); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_far); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_mall); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_mellohi); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_stal); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_strad); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_wait); GameRegistry.addRecipe(new ItemStack(headPhones), "xxx","xax",'x', Blocks.log, 'a', Items.record_ward); LogHelper.info("Pre Initialization Complete!!!"); } @EventHandler public void init(FMLInitializationEvent event){ NetworkRegistry.INSTANCE.registerGuiHandler(this, new CommonProxy()); LogHelper.info("Initialization Complete!!!"); } @EventHandler public void postinit(FMLPostInitializationEvent event){ LogHelper.info("Post Initialization Complete!!!"); } } Here's my Helmet class package com.gjkf.headPhones.items; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import com.gjkf.headPhones.Main; import com.gjkf.headPhones.client.gui.HeadPhonesGui; import com.gjkf.headPhones.reference.References; import com.gjkf.headPhones.utility.LogHelper; public class HeadPhones extends ItemArmor{ public HeadPhonesContainer container; public HeadPhones(ArmorMaterial material, int id, int placement) { super(material, id, placement); if(placement == 0){ this.setTextureName(References.MODID+":headPhones"); } } @Override public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){ if(stack.getItem() == Main.headPhones){ return References.MODID+":textures/models/armor/headPhonesArmor_1.png"; }else{ return null; } } @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player){ if (player.isSneaking()){ player.openGui(HeadPhonesGui.class, References.GUI_ID, world, (int)player.serverPosX, (int)player.serverPosY, (int)player.serverPosZ); LogHelper.info("Succesfully opened GUI"); } return stack; } } Here's my Helmet Container class package com.gjkf.headPhones.items; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; public class HeadPhonesContainer extends Container{ private IInventory playerInv; private int numSlots = 1; public HeadPhonesContainer(IInventory inv1, IInventory inv2){ this.playerInv = inv1; for (int j = 0; j < this.numSlots; ++j) { for (int k = 0; k < 1; ++k) { this.addSlotToContainer(new Slot(inv2, k + j * 9, 8 + k * 18, 18 + j * 18)); } } } @Override public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_){ return null; } @Override public boolean canInteractWith(EntityPlayer player){ return this.playerInv.isUseableByPlayer(player); } @Override public void onContainerClosed(EntityPlayer p_75134_1_){ super.onContainerClosed(p_75134_1_); this.playerInv.closeInventory(); } } Here's my Helmet GUI class package com.gjkf.headPhones.client.gui; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.I18n; import net.minecraft.inventory.IInventory; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import com.gjkf.headPhones.items.HeadPhonesContainer; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class HeadPhonesGui extends GuiContainer{ private static final ResourceLocation location = new ResourceLocation("textures/gui/headPhonesGui.png"); public static IInventory headPhones; private IInventory playerInv; private int inventoryRows; public HeadPhonesGui(IInventory inv1, IInventory inv2) { super(new HeadPhonesContainer(inv1, inv2)); this.headPhones = inv1; this.playerInv = inv2; } @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { this.fontRendererObj.drawString(this.playerInv.hasCustomInventoryName() ? this.playerInv.getInventoryName() : I18n.format(this.playerInv.getInventoryName(), new Object[0]), 8, 6, 4210752); this.fontRendererObj.drawString(this.headPhones.hasCustomInventoryName() ? this.headPhones.getInventoryName() : I18n.format(this.headPhones.getInventoryName(), new Object[0]), 8, this.ySize - 96 + 2, 4210752); } protected void drawGuiContainerBackgroundLayer1(float p_146976_1_, int p_146976_2_, int p_146976_3_) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(location); int k = (this.width - this.xSize) / 2; int l = (this.height - this.ySize) / 2; this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.inventoryRows * 18 + 17); this.drawTexturedModalRect(k, l + this.inventoryRows * 18 + 17, 0, 126, this.xSize, 96); } } Here's my Common Proxy package com.gjkf.headPhones.proxy; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.world.World; import com.gjkf.headPhones.client.gui.HeadPhonesGui; import com.gjkf.headPhones.items.HeadPhonesContainer; import com.gjkf.headPhones.reference.References; import cpw.mods.fml.common.network.IGuiHandler; public class CommonProxy implements IGuiHandler{ @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID == References.GUI_ID){ return new HeadPhonesGui(player.inventory, HeadPhonesGui.headPhones); } return null; } } Here's my Reference class package com.gjkf.headPhones.reference; public class References { public static final String MODID = "HeadPhonesRadio"; public static final String MOD_NAME = "HeadPhones Radio Mod"; public static final String VERSION = "0.1"; public static final String GUI_FACTORY_CLASS = "com.gjkf.headPhones.client.gui.GuiFactory"; public static final String CLIENT_PROXY_CLASS = "com.gjkf.headPhones.proxy.ClientProxy"; public static final String SERVER_PROXY_CLASS = "com.gjkf.headPhones.proxy.ServerProxy"; public static final String COMMON_PROXY_CLASS = "com.gjkf.headPhones.proxy.CommonProxy"; public static final int GUI_ID = 1000; } Again, I'm really new to GUIs so I could have made incredible mistakes, please don't yell me. Thanks for all the help. Quote "I an atom in the universe, a universe of atoms"-- Richard P. Feynman
FLUFFY2 Posted July 16, 2014 Posted July 16, 2014 Try it like so: .openGui(Main.instance, yourGuiID, par2World, (int)player.posX, (int)player.posY, (int)player.posZ); Also not use serverPos for gui. Hope its working now. Quote
_gjkf_ Posted July 16, 2014 Author Posted July 16, 2014 Thanks for the early reply. Now it kinda is working. I still crash but for another reason. Here's the report ---- Minecraft Crash Report ---- // This doesn't make any sense! Time: 16/07/14 17.58 Description: Rendering screen java.lang.NullPointerException: Rendering screen at com.gjkf.headPhones.client.gui.HeadPhonesGui.drawGuiContainerBackgroundLayer(HeadPhonesGui.java:31) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:97) at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1145) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1066) at net.minecraft.client.Minecraft.run(Minecraft.java:961) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at GradleStart.bounce(GradleStart.java:95) at GradleStart.startClient(GradleStart.java:88) at GradleStart.main(GradleStart.java:56) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.gjkf.headPhones.client.gui.HeadPhonesGui.drawGuiContainerBackgroundLayer(HeadPhonesGui.java:31) at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:97) -- Screen render details -- Details: Screen name: com.gjkf.headPhones.client.gui.HeadPhonesGui Mouse location: Scaled: (273, 213). Absolute: (546, 52) Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['ForgeDevName'/106, l='MpServer', x=708,58, y=5,59, z=1059,00]] Chunk stats: MultiplayerChunkCache: 210, 210 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: World: (720,4,1047), Chunk: (at 0,0,7 in 45,65; contains blocks 720,0,1040 to 735,255,1055), Region: (1,2; contains chunks 32,64 to 63,95, blocks 512,0,1024 to 1023,255,1535) Level time: 1850 game time, 1850 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 60 total; [EntityChicken['Chicken'/3, l='MpServer', x=632,66, y=4,00, z=989,44], EntityChicken['Chicken'/5, l='MpServer', x=639,66, y=4,00, z=985,56], EntityChicken['Chicken'/6, l='MpServer', x=637,56, y=4,00, z=1069,53], EntityChicken['Chicken'/7, l='MpServer', x=638,50, y=4,00, z=1072,50], EntityChicken['Chicken'/8, l='MpServer', x=638,59, y=4,00, z=1077,44], EntityPig['Pig'/21, l='MpServer', x=644,50, y=4,00, z=985,50], EntityChicken['Chicken'/23, l='MpServer', x=641,50, y=4,00, z=988,50], EntityPig['Pig'/22, l='MpServer', x=640,94, y=4,00, z=984,56], EntityChicken['Chicken'/24, l='MpServer', x=640,50, y=4,00, z=986,50], EntityChicken['Chicken'/27, l='MpServer', x=640,63, y=4,00, z=1067,63], EntityChicken['Chicken'/26, l='MpServer', x=639,81, y=4,00, z=1068,78], EntityChicken['Chicken'/29, l='MpServer', x=651,57, y=4,00, z=1072,44], EntityChicken['Chicken'/28, l='MpServer', x=654,41, y=4,00, z=1067,56], EntitySheep['Sheep'/31, l='MpServer', x=652,16, y=4,00, z=1126,78], EntityChicken['Chicken'/30, l='MpServer', x=640,47, y=4,00, z=1073,47], EntityCow['Cow'/34, l='MpServer', x=659,22, y=4,00, z=1135,22], EntityChicken['Chicken'/33, l='MpServer', x=658,44, y=4,00, z=1059,56], EntityCow['Cow'/38, l='MpServer', x=657,34, y=4,00, z=1139,09], EntityCow['Cow'/42, l='MpServer', x=680,94, y=4,00, z=1015,19], EntityChicken['Chicken'/43, l='MpServer', x=686,53, y=4,00, z=1018,56], EntityCow['Cow'/46, l='MpServer', x=679,51, y=4,00, z=1026,43], EntityCow['Cow'/47, l='MpServer', x=682,13, y=4,00, z=1028,09], EntityChicken['Chicken'/44, l='MpServer', x=676,63, y=4,00, z=1036,44], EntitySheep['Sheep'/45, l='MpServer', x=684,50, y=4,00, z=1031,97], EntityChicken['Chicken'/51, l='MpServer', x=685,38, y=4,00, z=1076,44], EntitySheep['Sheep'/50, l='MpServer', x=678,34, y=4,00, z=1078,50], EntitySheep['Sheep'/49, l='MpServer', x=679,84, y=4,00, z=1079,88], EntitySheep['Sheep'/48, l='MpServer', x=680,72, y=4,00, z=1067,38], EntityChicken['Chicken'/54, l='MpServer', x=684,41, y=4,00, z=1092,44], EntityChicken['Chicken'/53, l='MpServer', x=676,72, y=4,00, z=1074,28], EntityChicken['Chicken'/52, l='MpServer', x=679,81, y=4,00, z=1077,34], EntitySheep['Sheep'/59, l='MpServer', x=696,41, y=4,00, z=1064,19], EntityChicken['Chicken'/58, l='MpServer', x=688,06, y=4,00, z=1028,19], EntitySheep['Sheep'/57, l='MpServer', x=697,19, y=4,00, z=1029,22], EntityClientPlayerMP['ForgeDevName'/106, l='MpServer', x=708,58, y=5,59, z=1059,00], EntitySheep['Sheep'/62, l='MpServer', x=717,25, y=4,00, z=1131,63], EntityCow['Cow'/61, l='MpServer', x=715,88, y=4,00, z=1126,13], EntitySheep['Sheep'/60, l='MpServer', x=708,94, y=4,00, z=1031,94], EntitySheep['Sheep'/68, l='MpServer', x=732,16, y=4,00, z=1125,16], EntitySheep['Sheep'/69, l='MpServer', x=728,50, y=4,00, z=1132,50], EntitySheep['Sheep'/70, l='MpServer', x=732,59, y=4,00, z=1132,72], EntitySheep['Sheep'/71, l='MpServer', x=734,63, y=4,00, z=1135,50], EntityCow['Cow'/76, l='MpServer', x=730,91, y=4,00, z=1128,19], EntityCow['Cow'/77, l='MpServer', x=735,50, y=4,00, z=1132,50], EntitySheep['Sheep'/72, l='MpServer', x=733,78, y=4,00, z=1134,38], EntitySheep['Sheep'/73, l='MpServer', x=733,50, y=4,00, z=1127,50], EntitySheep['Sheep'/74, l='MpServer', x=734,50, y=4,00, z=1129,50], EntityCow['Cow'/75, l='MpServer', x=729,50, y=4,00, z=1126,50], EntitySheep['Sheep'/85, l='MpServer', x=748,25, y=4,00, z=1077,63], EntityPig['Pig'/87, l='MpServer', x=758,47, y=4,00, z=1069,31], EntitySheep['Sheep'/86, l='MpServer', x=762,50, y=4,00, z=1071,50], EntitySheep['Sheep'/93, l='MpServer', x=764,50, y=4,00, z=1072,22], EntitySheep['Sheep'/92, l='MpServer', x=767,91, y=4,00, z=1062,94], EntitySheep['Sheep'/95, l='MpServer', x=759,63, y=4,00, z=1080,81], EntitySheep['Sheep'/94, l='MpServer', x=755,19, y=4,00, z=1083,19], EntityPig['Pig'/89, l='MpServer', x=754,55, y=4,00, z=1063,92], EntityPig['Pig'/88, l='MpServer', x=755,91, y=4,00, z=1064,49], EntitySheep['Sheep'/91, l='MpServer', x=764,81, y=4,00, z=1070,28], EntityPig['Pig'/90, l='MpServer', x=753,19, y=4,00, z=1065,81], EntitySheep['Sheep'/96, l='MpServer', x=770,81, y=4,00, z=1074,34]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:417) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2567) at net.minecraft.client.Minecraft.run(Minecraft.java:983) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at GradleStart.bounce(GradleStart.java:95) at GradleStart.startClient(GradleStart.java:88) at GradleStart.main(GradleStart.java:56) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Mac OS X (x86_64) version 10.7.5 Java Version: 1.7.0_51, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 851198632 bytes (811 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.05 FML v7.10.18.1180 Minecraft Forge 10.13.0.1180 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.18.1180} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.0.1180} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available HeadPhonesRadio{0.1} [HeadPhonesRadio] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: NVIDIA GeForce 9400M OpenGL Engine GL version 2.1 NVIDIA-7.32.12, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because ARB_framebuffer_object is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) Thanks again Quote "I an atom in the universe, a universe of atoms"-- Richard P. Feynman
_gjkf_ Posted July 16, 2014 Author Posted July 16, 2014 Do you mean like this? public HeadPhonesGui(IInventory inv1, IInventory inv2) { super(new HeadPhonesContainer(inv1, null)); this.headPhones = inv1; } If so, it still crashes at the exact same point. If you mean this public HeadPhonesGui(IInventory inv1, IInventory inv2) { super(new HeadPhonesContainer(inv1, inv2), null); this.headPhones = inv1; } It won't work because GuiContainer accepts only 1 argument I might have not understand you, sorry if that's the case Quote "I an atom in the universe, a universe of atoms"-- Richard P. Feynman
_gjkf_ Posted July 16, 2014 Author Posted July 16, 2014 Even with that set as null I still crash @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID == References.GUI_ID){ return new HeadPhonesGui(player.inventory, null); } return null; } Is it what you meant or did I misunderstand you again? Sorry, I'm really a noob at this, sorry again Quote "I an atom in the universe, a universe of atoms"-- Richard P. Feynman
Recommended Posts
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.