-
Posts
867 -
Joined
-
Last visited
-
Days Won
3
Everything posted by JimiIT92
-
So last night i went to files.minecraftforge.net to download a newer version of Forge for 1.8. What i found out was a version even newer wich is for Minecraft 1.8.8. So i've downloaded and try to install like forge 1.8, but the installation has failed I've checked the build file at lines 36 (where it says there is an error), i didn't modified that. What is written there is this mappings = "snapshot_20141130" Here are a couple o pics to see what the console gives when trying to do the setupDecompWorkspace command https://imgur.com/a/0R7d9 Is this a bug with this version of Forge or am i doing something wrong?
-
Ah quindi non sono il solo Perfetto, appena posso mi farò sentire
-
[1.8] [SOLVED] NullPointerException when opening custom GUI
JimiIT92 replied to JimiIT92's topic in Modder Support
If i could kiss you i will do The GUI finally works and doesn't crash or gives some error Now i will find how to give the new slot a proper shift-click function Thank you soooooooo much diesieben Finally it has solved -
[1.8] [SOLVED] NullPointerException when opening custom GUI
JimiIT92 replied to JimiIT92's topic in Modder Support
Ok, i'll remove it and do that check -
[1.8] [SOLVED] NullPointerException when opening custom GUI
JimiIT92 replied to JimiIT92's topic in Modder Support
How can i do that? Should i comment the Client Event class? -
[1.8] [SOLVED] NullPointerException when opening custom GUI
JimiIT92 replied to JimiIT92's topic in Modder Support
I will do more debug now that it doesn't crash Thanks diesieben I've still the IndexOutOfBounds error I've update the github repository with the new code -
[1.8] [SOLVED] NullPointerException when opening custom GUI
JimiIT92 replied to JimiIT92's topic in Modder Support
Alright, so this is the "new" crash report [23:53:44] [server thread/ERROR]: Encountered an unexpected exception net.minecraft.util.ReportedException: Ticking entity at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:781) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) ~[integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_60] Caused by: java.lang.IndexOutOfBoundsException: Index: 46, Size: 46 at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.8.0_60] at java.util.ArrayList.get(Unknown Source) ~[?:1.8.0_60] at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:98) ~[Container.class:?] at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:263) ~[EntityPlayerMP.class:?] at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2031) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:758) ~[WorldServer.class:?] at net.minecraft.world.World.updateEntity(World.java:1997) ~[World.class:?] at net.minecraft.world.World.updateEntities(World.java:1823) ~[World.class:?] at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:587) ~[WorldServer.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:775) ~[MinecraftServer.class:?] ... 4 more [23:53:44] [server thread/ERROR]: This crash report has been saved to: C:\Users\jimia\Documents\Minecraft Mods\NewGUI\run\.\crash-reports\crash-2015-10-04_23.53.44-server.txt [23:53:44] [server thread/INFO]: Stopping server [23:53:44] [server thread/INFO]: Saving players [23:53:44] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:663]: ---- Minecraft Crash Report ---- // I blame Dinnerbone. Time: 04/10/15 23.53 Description: Ticking entity java.lang.IndexOutOfBoundsException: Index: 46, Size: 46 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:98) at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:263) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2031) at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:758) at net.minecraft.world.World.updateEntity(World.java:1997) at net.minecraft.world.World.updateEntities(World.java:1823) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:587) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:775) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) at java.lang.Thread.run(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:98) at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:263) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2031) at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:758) at net.minecraft.world.World.updateEntity(World.java:1997) -- Entity being ticked -- Details: Entity Type: null (net.minecraft.entity.player.EntityPlayerMP) Entity ID: 142 Entity Name: Player796 Entity's Exact location: 881,61, 5,00, 1215,05 Entity's Block location: 881,00,5,00,1215,00 - World: (881,5,1215), Chunk: (at 1,0,15 in 55,75; contains blocks 880,0,1200 to 895,255,1215), Region: (1,2; contains chunks 32,64 to 63,95, blocks 512,0,1024 to 1023,255,1535) Entity's Momentum: 0,00, -0,08, 0,00 Entity's Rider: ~~ERROR~~ NullPointerException: null Entity's Vehicle: ~~ERROR~~ NullPointerException: null Stacktrace: at net.minecraft.world.World.updateEntities(World.java:1823) at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:587) -- Affected level -- Details: Level name: New World All players: 1 total; [EntityPlayerMP['Player796'/142, l='New World', x=881,61, y=5,00, z=1215,05]] Chunk stats: ServerChunkCache: 707 Drop: 0 Level seed: 2632965430761002026 Level generator: ID 01 - flat, ver 0. Features enabled: true Level generator options: Level spawn location: 889,00,4,00,1221,00 - World: (889,4,1221), Chunk: (at 9,0,5 in 55,76; contains blocks 880,0,1216 to 895,255,1231), Region: (1,2; contains chunks 32,64 to 63,95, blocks 512,0,1024 to 1023,255,1535) Level time: 5598 game time, 5598 day time Level dimension: 0 Level storage version: 0x04ABD - Anvil Level weather: Rain time: 28257 (now: false), thunder time: 72580 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true Stacktrace: at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:775) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) at java.lang.Thread.run(Unknown Source) -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_60, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 253236464 bytes (241 MB) / 661127168 bytes (630 MB) up to 1398276096 bytes (1333 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1516 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8-11.14.3.1516.jar) UCHIJAAAA Forge{11.14.3.1516} [Minecraft Forge] (forgeSrc-1.8-11.14.3.1516.jar) UCHIJAAAA newgui{1.0} [newgui] (bin) Loaded coremods (and transformers): GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Player Count: 1 / 8; [EntityPlayerMP['Player796'/142, l='New World', x=881,61, y=5,00, z=1215,05]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [23:53:44] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:663]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-10-04_23.53.44-server.txt it's always the problem of the indexOutOfBounds Also the EntityPlayerMP is null, why? -
[1.8] [SOLVED] NullPointerException when opening custom GUI
JimiIT92 replied to JimiIT92's topic in Modder Support
Thanks I'll see what happens switching to that version -
[1.8] [SOLVED] NullPointerException when opening custom GUI
JimiIT92 replied to JimiIT92's topic in Modder Support
Can't change to the "bleeding edge" version to fix that bug -
[1.8] [SOLVED] NullPointerException when opening custom GUI
JimiIT92 replied to JimiIT92's topic in Modder Support
http://files.minecraftforge.net/maven 404 not found -
[1.8] [SOLVED] NullPointerException when opening custom GUI
JimiIT92 replied to JimiIT92's topic in Modder Support
Ops, i'm so sorry i've forgot that Here is the crash given in eclipse [23:31:32] [server thread/ERROR]: Encountered an unexpected exception java.lang.NullPointerException at net.minecraft.crash.CrashReportCategory.firstTwoElementsOfStackTraceMatch(Unknown Source) ~[CrashReportCategory.class:?] at net.minecraft.crash.CrashReport.makeCategoryDepth(Unknown Source) ~[CrashReport.class:?] at net.minecraft.world.World.addWorldInfoToCrashReport(Unknown Source) ~[World.class:?] at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(Unknown Source) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.tick(Unknown Source) ~[MinecraftServer.class:?] at net.minecraft.server.integrated.IntegratedServer.tick(Unknown Source) ~[integratedServer.class:?] at net.minecraft.server.MinecraftServer.run(Unknown Source) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_60] [23:31:32] [server thread/ERROR]: This crash report has been saved to: C:\Users\jimia\Documents\Minecraft Mods\NewGUI\run\.\crash-reports\crash-2015-10-04_23.31.32-server.txt [23:31:32] [server thread/INFO]: Stopping server [23:31:32] [server thread/INFO]: Saving players [23:31:32] [server thread/INFO]: Player12 lost connection: TextComponent{text='Server closed', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}} [23:31:32] [server thread/INFO]: Player12 left the game [23:31:32] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:-1]: ---- Minecraft Crash Report ---- // Sorry Time: 04/10/15 23.31 Description: Exception in server tick loop java.lang.NullPointerException: Exception in server tick loop at net.minecraft.crash.CrashReportCategory.firstTwoElementsOfStackTraceMatch(Unknown Source) at net.minecraft.crash.CrashReport.makeCategoryDepth(Unknown Source) at net.minecraft.world.World.addWorldInfoToCrashReport(Unknown Source) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(Unknown Source) at net.minecraft.server.MinecraftServer.tick(Unknown Source) at net.minecraft.server.integrated.IntegratedServer.tick(Unknown Source) at net.minecraft.server.MinecraftServer.run(Unknown Source) at java.lang.Thread.run(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_60, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 384113168 bytes (366 MB) / 662700032 bytes (632 MB) up to 1398276096 bytes (1333 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1516 4 mods loaded, 4 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8-11.14.3.1516.jar) UCHIJAAAA Forge{11.14.3.1516} [Minecraft Forge] (forgeSrc-1.8-11.14.3.1516.jar) UCHIJAAAA newgui{1.0} [newgui] (bin) Loaded coremods (and transformers): GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread. Profiler Position: N/A (disabled) Player Count: 1 / 8; [EntityPlayerMP['Player12'/142, l='New World', x=881,61, y=5,00, z=1215,05]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' [23:31:32] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:-1]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-10-04_23.31.32-server.txt -
So i'm still trying to replace the default container GUI for some blocks, now when i open the GUI the game crashes and it gives me a NullPointerException. I've uploaded all the code to a github repository, i'm really desperate with this Any kind of help will be really appreciated, here is the github link https://github.com/JimiIT92/NewGUI
-
I've uploaded all the mod code to a Github, so who want to help me can works better Here is the link https://github.com/JimiIT92/NewGUI Also with the actual code the behavior of the GUI itself is changed, here's what it does right now https://www.youtube.com/watch?v=9Y0rU3I4rpE I really really really need help with this
-
This three things are handled by the container constructor, using the addSlotToContainer method. Infact in the constructor i have this this.addSlotToContainer(new SlotCrafting(playerInventory.player, this.craftMatrix, this.craftResult, 0, 124, 35)); //ADDED THE CRAFTING RESULT SLOT (SLOT #0) ... /** * SLOT 0-8 * CRAFTING MATRIX */ for (i = 0; i < 3; ++i) { for (j = 0; j < 3; ++j) { this.addSlotToContainer(new Slot(this.craftMatrix, j + i * 3, 30 + j * 18, 17 + i * 18)); } } /** * SLOT 9-35 * PLAYER INVENTORY */ for (i = 0; i < 3; ++i) { for (j = 0; j < 9; ++j) { this.addSlotToContainer(new Slot(playerInventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18)); } } /** * SLOT 36-44 * HOTBAR */ for (i = 0; i < 9; ++i) { this.addSlotToContainer(new Slot(playerInventory, i, 8 + i * 18, 142)); } /** * 45-48 * EXTRA ARMOR SLOTS */ for(i = 0; i < 4; i++) { final int k = i; this.addSlotToContainer(new Slot(playerInventory, playerInventory.getSizeInventory() - 1 - i, 8 + 9 * 18, 64) { /** * Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit(), but 1 * in the case of armor slots) */ public int getSlotStackLimit() { return 1; } /** * Check if the stack is a valid item for this slot. Always true beside for the armor slots. */ public boolean isItemValid(ItemStack stack) { if (stack == null) return false; return stack.getItem().isValidArmor(stack, k, playerInventory.player); } @SideOnly(Side.CLIENT) public String getSlotTexture() { return ItemArmor.EMPTY_SLOT_NAMES[k]; } }); } And if i print the whole inventory dimension for the container it returns 50 as expected Also i've done another test. I've changed the position of the 4 slots under the crafting result slot (because the click mode taken when i click on that slot before was 4 (drop)), doing this stil gets the array out of bound but at least i can take and put items in that slots (but they drop from there when i close the GUI and also duplicates the original item)
-
Done a quick test Overriding this function @Override public ItemStack slotClick(int slotId, int clickedButton, int mode, EntityPlayer playerIn) { System.out.println(this.inventorySlots.size()); return super.slotClick(slotId, clickedButton, mode, playerIn); } to see its behavior when i click it returns 50 as inventorySlots size (wich is correct) and then going into the vanilla method it takes the player inventory (wich printing out it's size returns 40). So i think i should "extend" the player inventory?
-
Thanks for your answer I'll try defining a new array for the 4 slots, however the original array passed was the player inventory
-
And how to open it on server side? Where am i wrong in my code that i've posted above? I've followed all the steps of the tutorial you linked before
-
I was trying to figure out what happens when i click on one of the additional 4 slots, and this reminds to this discussion http://www.minecraftforge.net/forum/index.php/topic,34172.0.html The array list that goes out of bounds is the inventory slots
-
That part of code is called from a vanilla event handler (i guess), since in my Container class for my custom GUI there is no method to handle the click (there's only the transferStackToSlot, wich handle the shift-click event)
-
Wich part of this is hard to understand? On stack overflow they say to check line numbers, wich they are in my project, as you can see here but the error is still there. For the mc-related error, sorry if i want to understand what vanilla code does on that part and try to figure out by myself, since the only help received was a google search
-
I was debugging the Container class, so i've set a breakpoint in that class then launch the game. When it was supposed to break at the breakpoint Eclipse give me this error So basically i can't debug that class to see what happens when i open my custom GUI and why it gives an ArrayOutOfBounds exception (Link to related post) http://www.minecraftforge.net/forum/index.php/topic,34084.new.html I've looked on stackOverflow to see how to solve but the solution purposed there hasn't worked
-
Any help?
-
I'm wondering if there are any italian modder in this forum, maybe for some italian mod project
-
Ops, sorry, mu bad Anyway i got this right now (the only thing changed in this class is the check (if on client side)), all the rest was the same then before. The proxy variable used before was a common proxy instance, then all the gui related stuff was done in the client proxy (as you can see). Should i do this in the Common proxy instead? public class BL { @SidedProxy(clientSide = "blaze.proxy.ClientProxy", serverSide = "blaze.proxy.CommonProxy") public static CommonProxy proxy; @Instance("blaze") public static BL instance; public static final String MODID = "blaze"; public static final String VERSION = "1.0"; public static SimpleNetworkWrapper network; @EventHandler public void preInit(FMLPreInitializationEvent event) { network = NetworkRegistry.INSTANCE.newSimpleChannel("BL_Channel"); network.registerMessage(NetworkMessage.Handler.class, NetworkMessage.class, 0, Side.SERVER); } @EventHandler public void init(FMLInitializationEvent event) { proxy.registerRenderThings(); } } CommonProxy class public class CommonProxy{ public void registerRenderThings(RenderItem renderItem){ } public int addArmor(String armorName) { return 0; } } ClientProxy class public class ClientProxy extends CommonProxy { public void registerRenderThings(){ BL.network.sendToServer(new NetworkMessage("craftingTable")); MinecraftForge.EVENT_BUS.register(new EventReceiver()); } public int addArmor(String armorname) { return 0; } } EventReceiver class public class EventReceiver { @SubscribeEvent public void onEvent(GuiOpenEvent event) { if(event.gui instanceof GuiCrafting) { event.gui = new GUINewWorkbench(Minecraft.getMinecraft().thePlayer.inventory, Minecraft.getMinecraft().theWorld); } } } As i said before, should i do some operations in the CommonProxy instead of ClientProxy?