perromercenary00 Posted December 25, 2015 Posted December 25, 2015 good days i have this custom gui to manage the inventory in mi armours and backPacks and the briefcase the gui works i can store items on, when reopen all the items are in place i can move, split items in the slots but if i try shiftClick on an slot minecraft crashes in this video all the features works, it crash at the end when i Shift + LeftClick the potato in the briefcase [10:01:34] [Client thread/FATAL]: Unreported exception thrown! java.lang.NullPointerException at net.minecraft.crash.CrashReportCategory.firstTwoElementsOfStackTraceMatch(Unknown Source) ~[CrashReportCategory.class:?] i dunnot have the les idea what this could be [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1191]: writeToNBTitem [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1200]: bolsillos=9 [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[5]=item.chalecoTacticoS [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[9]=item.potato [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[10]=cargadorFM9X_Largo [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[12]=AidSpray [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1191]: writeToNBTitem [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1200]: bolsillos=9 [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[5]=item.chalecoTacticoS [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[9]=item.potato [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[10]=cargadorFM9X_Largo [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[12]=AidSpray [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1191]: writeToNBTitem [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1200]: bolsillos=9 [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[5]=item.chalecoTacticoS [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[9]=item.potato [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[10]=cargadorFM9X_Largo [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[12]=AidSpray [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1191]: writeToNBTitem [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1200]: bolsillos=9 [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[5]=item.chalecoTacticoS [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[9]=item.potato [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[10]=cargadorFM9X_Largo [10:22:59] [Client thread/INFO] [sTDOUT]: [mercenarymod.utilidades.util:writeToNBTitem:1220]: Escribir en Item slot[12]=AidSpray [10:23:03] [server thread/INFO]: Stopping server [10:23:03] [server thread/INFO]: Saving players [10:23:03] [server thread/INFO]: Saving worlds [10:23:03] [server thread/INFO]: Saving chunks for level 'New World'/Overworld [10:23:03] [server thread/INFO]: Saving chunks for level 'New World'/Nether [10:23:03] [server thread/INFO]: Saving chunks for level 'New World'/The End [10:23:03] [server thread/INFO] [FML]: Unloading dimension 0 [10:23:03] [server thread/INFO] [FML]: Unloading dimension -1 [10:23:03] [server thread/INFO] [FML]: Unloading dimension 1 [10:23:03] [server thread/INFO] [FML]: Applying holder lookups [10:23:03] [server thread/INFO] [FML]: Holder lookups applied [10:23:05] [Client thread/FATAL]: Unreported exception thrown! 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.crash.CrashReport.makeCategory(Unknown Source) ~[CrashReport.class:?] at net.minecraft.client.Minecraft.runTick(Unknown Source) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Unknown Source) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Unknown Source) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Unknown Source) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_65] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_65] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_65] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_65] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_65] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_65] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_65] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_65] at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?] at GradleStart.main(Unknown Source) [start/:?] [10:23:05] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:-1]: ---- Minecraft Crash Report ---- // Who set us up the TNT? Time: 25/12/15 10:23 AM Description: Unexpected error java.lang.NullPointerException: Unexpected error at net.minecraft.crash.CrashReportCategory.firstTwoElementsOfStackTraceMatch(Unknown Source) at net.minecraft.crash.CrashReport.makeCategoryDepth(Unknown Source) at net.minecraft.crash.CrashReport.makeCategory(Unknown Source) at net.minecraft.client.Minecraft.runTick(Unknown Source) at net.minecraft.client.Minecraft.runGameLoop(Unknown Source) at net.minecraft.client.Minecraft.run(Unknown Source) at net.minecraft.client.main.Main.main(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.crash.CrashReportCategory.firstTwoElementsOfStackTraceMatch(Unknown Source) at net.minecraft.crash.CrashReport.makeCategoryDepth(Unknown Source) at net.minecraft.crash.CrashReport.makeCategory(Unknown Source) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player850'/171, l='MpServer', x=-941,61, y=4,00, z=232,66]] Chunk stats: MultiplayerChunkCache: 81, 81 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: -942,00,4,00,239,00 - World: (-942,4,239), Chunk: (at 2,0,15 in -59,14; contains blocks -944,0,224 to -929,255,239), Region: (-2,0; contains chunks -64,0 to -33,31, blocks -1024,0,0 to -513,255,511) Level time: 546158 game time, 2216 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: 58 total; [EntityCow['Cow'/129, l='MpServer', x=-898,09, y=4,00, z=257,97], EntityChicken['Chicken'/130, l='MpServer', x=-904,66, y=4,00, z=249,59], EntityChicken['Chicken'/131, l='MpServer', x=-898,16, y=4,00, z=261,19], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/748173, l='MpServer', x=-941,18, y=4,05, z=233,09], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/734979, l='MpServer', x=-940,85, y=4,04, z=231,71], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/724481, l='MpServer', x=-942,65, y=4,03, z=229,67], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/737537, l='MpServer', x=-941,67, y=4,04, z=231,48], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/723975, l='MpServer', x=-942,83, y=4,03, z=229,69], EntityCow['Cow'/142, l='MpServer', x=-895,63, y=4,00, z=287,56], EntityRabbit['Rabbit'/143, l='MpServer', x=-891,25, y=4,00, z=292,41], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/730782, l='MpServer', x=-942,43, y=4,03, z=231,22], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/726807, l='MpServer', x=-943,15, y=4,02, z=230,24], EntityItem['item.item.arrow'/441368, l='MpServer', x=-918,53, y=4,00, z=291,59], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/745620, l='MpServer', x=-942,00, y=4,05, z=232,23], EntityRabbit['Rabbit'/35, l='MpServer', x=-1000,13, y=4,00, z=206,91], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/737839, l='MpServer', x=-941,79, y=4,04, z=231,47], EntityRabbit['Rabbit'/37, l='MpServer', x=-1005,50, y=4,00, z=245,38], EntityRabbit['Rabbit'/38, l='MpServer', x=-1007,16, y=4,00, z=277,75], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/748451, l='MpServer', x=-941,17, y=4,05, z=233,23], EntityPig['Pig'/42, l='MpServer', x=-975,94, y=4,00, z=204,69], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/742049, l='MpServer', x=-942,10, y=4,05, z=231,72], EntityRabbit['Rabbit'/43, l='MpServer', x=-992,25, y=4,00, z=291,19], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/745255, l='MpServer', x=-942,02, y=4,05, z=232,30], EntityPlayerSP['Player850'/171, l='MpServer', x=-941,61, y=4,00, z=232,66], EntityPig['Pig'/46, l='MpServer', x=-962,78, y=4,00, z=192,47], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/724133, l='MpServer', x=-942,73, y=4,03, z=229,63], EntityItem['item.item.arrow'/442678, l='MpServer', x=-913,88, y=4,00, z=289,25], EntityItem['item.item.bone'/442679, l='MpServer', x=-912,81, y=4,00, z=289,25], EntityItem['item.item.arrow'/442677, l='MpServer', x=-912,97, y=4,00, z=289,09], EntityItem['item.item.rottenFlesh'/480561, l='MpServer', x=-969,38, y=4,00, z=242,28], EntityPig['Pig'/57, l='MpServer', x=-973,03, y=4,00, z=303,03], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/748855, l='MpServer', x=-941,18, y=4,05, z=233,33], EntityRabbit['Rabbit'/64, l='MpServer', x=-954,34, y=4,00, z=174,00], EntitySheep['Sheep'/66, l='MpServer', x=-958,03, y=4,00, z=185,06], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/734797, l='MpServer', x=-940,87, y=4,04, z=231,73], EntitySheep['Sheep'/72, l='MpServer', x=-971,16, y=4,00, z=219,16], EntityPig['Pig'/74, l='MpServer', x=-944,03, y=4,00, z=196,88], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/719558, l='MpServer', x=-942,93, y=4,03, z=230,50], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/727365, l='MpServer', x=-943,18, y=4,02, z=230,51], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/742468, l='MpServer', x=-942,09, y=4,05, z=231,69], EntityChicken['Chicken'/82, l='MpServer', x=-947,31, y=4,00, z=285,53], EntityItem['item.item.egg'/660825, l='MpServer', x=-905,53, y=4,00, z=250,19], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/731228, l='MpServer', x=-942,38, y=4,03, z=231,31], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/731602, l='MpServer', x=-942,31, y=4,03, z=231,32], EntityXPOrb['Experience Orb'/510939, l='MpServer', x=-941,29, y=3,00, z=239,25], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/727255, l='MpServer', x=-942,94, y=4,03, z=230,48], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/744917, l='MpServer', x=-942,02, y=4,05, z=232,25], EntityRabbit['Rabbit'/102, l='MpServer', x=-930,25, y=4,00, z=292,03], EntityItem['item.item.egg'/103, l='MpServer', x=-933,38, y=4,00, z=292,59], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/734310, l='MpServer', x=-940,79, y=4,04, z=231,73], EntityPig['Pig'/113, l='MpServer', x=-907,94, y=4,00, z=260,00], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/737146, l='MpServer', x=-941,59, y=4,04, z=231,52], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/742782, l='MpServer', x=-942,07, y=4,05, z=231,75], EntityPig['Pig'/118, l='MpServer', x=-922,91, y=4,00, z=297,16], EntityRabbit['Rabbit'/124, l='MpServer', x=-902,59, y=4,00, z=187,78], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/720118, l='MpServer', x=-942,88, y=4,03, z=230,42], EntityRabbit['Rabbit'/125, l='MpServer', x=-897,84, y=4,00, z=201,91], bala9mm_entity['entity.modmercenario.bala9mm_entity.name'/719863, l='MpServer', x=-942,93, y=4,03, z=230,54]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(Unknown Source) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Unknown Source) at net.minecraft.client.Minecraft.run(Unknown Source) at net.minecraft.client.main.Main.main(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) at GradleStart.main(Unknown Source) -- System Details -- Details: Minecraft Version: 1.8 Operating System: Linux (amd64) version 3.16.0-4-amd64 Java Version: 1.8.0_65, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 490812576 bytes (468 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1520 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.1520.jar) UCHIJAAAA Forge{11.14.3.1520} [Minecraft Forge] (forgeSrc-1.8-11.14.3.1520.jar) UCHIJAAAA modmercenario{1.8} [modmercenario] (bin) Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.4.0 NVIDIA 340.93' Renderer: 'GeForce GT 520/PCIe/SSE2' Launched Version: 1.8 LWJGL: 2.9.1 OpenGL: GeForce GT 520/PCIe/SSE2 GL version 4.4.0 NVIDIA 340.93, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No 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) [10:23:05] [Client thread/INFO] [sTDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:-1]: #@!@# Game crashed! Crash report saved to: #@!@# /home/usuario/Modding/forge-1.8-1520-modmercenario/run/./crash-reports/crash-2015-12-25_10.23.05-client.txt AL lib: (EE) alc_cleanup: 1 device not closed thanks for reading Quote
coolAlias Posted December 25, 2015 Posted December 25, 2015 That means you did not correctly implement #transferStackInSlot. Perhaps this explanation will help you, specifically the very last spoiler. Quote http://i.imgur.com/NdrFdld.png[/img]
perromercenary00 Posted December 25, 2015 Author Posted December 25, 2015 yea that was i fucket up whith the numbers in the transfer its fixed now // ############################################################################################################################################## @Override public ItemStack transferStackInSlot(EntityPlayer playerIn, int fromSlot) { ItemStack previous = null; Slot slot = (Slot) this.inventorySlots.get(fromSlot); //0 - 8 briefcase slots //9 - 36 //37 - 45 //36 inventario de player if (slot != null && slot.getHasStack()) { ItemStack current = slot.getStack(); previous = current.copy(); //0 int x = 0; int y = 0; int z = 0; switch (bolsillos) { case 0: { //5 //0 x = 4; y = 5; z = 41; };break; case 3: { //0 x = 2; y = 3; z = 39; };break; case 6: { //0 x = 5; y = 6; z = 42; };break; case 7: { //12 //0 x = 11; y = 12; z = 47; };break; case 9: { //0 x = 8; y = 9; z = 45; };break; case 16: { //0 x = 15; y = 16; z = 53; };break; case 17: { //22 //0 x = 21; y = 22; z = 57; };break; case 23: { //28 //0 x = 27; y = 28; z = 63; };break; } if (fromSlot < 9) { // From TE Inventory to Player Inventory if (!this.mergeItemStack(current, y, z, true)) return null; } else { // From Player Inventory to TE Inventory if (!this.mergeItemStack(current, 0, x, false)) return null; } if (current.stackSize == 0) slot.putStack((ItemStack) null); else slot.onSlotChanged(); if (current.stackSize == previous.stackSize) return null; slot.onPickupFromSlot(playerIn, current); } return previous; } // ############################################################################################################################################## Quote
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.