Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
java.lang.NullPointerException: null
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.getTabsFromItem(GuiSkyrimPlayerInventory.java:84) ~[GuiSkyrimPlayerInventory.class:?]
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.updateInventory(GuiSkyrimPlayerInventory.java:93) ~[GuiSkyrimPlayerInventory.class:?]
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.<init>(GuiSkyrimPlayerInventory.java:28) ~[GuiSkyrimPlayerInventory.class:?]
at com.ryankshah.skyrimcraft.client.gui.event.OpenGuiHandler.onGuiOpen(OpenGuiHandler.java:27) ~[OpenGuiHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_8_OpenGuiHandler_onGuiOpen_GuiOpenEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:1062) [Minecraft.class:?]
at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2300) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1933) [Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1186) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
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_172]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:25) [start/:?]
[16:28:49] [main/ERROR] [FML]: Index: 1 Listeners:
[16:28:49] [main/ERROR] [FML]: 0: NORMAL
[16:28:49] [main/ERROR] [FML]: 1: ASM: class com.ryankshah.skyrimcraft.client.gui.event.OpenGuiHandler onGuiOpen(Lnet/minecraftforge/client/event/GuiOpenEvent;)V
[16:28:50] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Stopping server
[16:28:50] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving players
[16:28:50] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving worlds
[16:28:50] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: Saving chunks for level 'New World'/overworld
[16:28:50] [Server thread/INFO] [FML]: Unloading dimension 0
[16:28:50] [Server thread/INFO] [FML]: Applying holder lookups
[16:28:50] [Server thread/INFO] [FML]: Holder lookups applied
[16:28:51] [main/FATAL] [net.minecraft.client.Minecraft]: Unreported exception thrown!
java.lang.NullPointerException: null
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.getTabsFromItem(GuiSkyrimPlayerInventory.java:84) ~[GuiSkyrimPlayerInventory.class:?]
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.updateInventory(GuiSkyrimPlayerInventory.java:93) ~[GuiSkyrimPlayerInventory.class:?]
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.<init>(GuiSkyrimPlayerInventory.java:28) ~[GuiSkyrimPlayerInventory.class:?]
at com.ryankshah.skyrimcraft.client.gui.event.OpenGuiHandler.onGuiOpen(OpenGuiHandler.java:27) ~[OpenGuiHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_8_OpenGuiHandler_onGuiOpen_GuiOpenEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?]
at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:1062) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2300) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1933) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1186) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
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_172]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
at GradleStart.main(GradleStart.java:25) [start/:?]
[16:28:51] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ----
// I blame Dinnerbone.
Time: 6/23/18 4:28 PM
Description: Unexpected error
java.lang.NullPointerException: Unexpected error
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.getTabsFromItem(GuiSkyrimPlayerInventory.java:84)
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.updateInventory(GuiSkyrimPlayerInventory.java:93)
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.<init>(GuiSkyrimPlayerInventory.java:28)
at com.ryankshah.skyrimcraft.client.gui.event.OpenGuiHandler.onGuiOpen(OpenGuiHandler.java:27)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_8_OpenGuiHandler_onGuiOpen_GuiOpenEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:1062)
at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2300)
at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1933)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1186)
at net.minecraft.client.Minecraft.run(Minecraft.java:441)
at net.minecraft.client.main.Main.main(Main.java:118)
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:498)
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:498)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:25)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Thread: Client thread
Stacktrace:
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.getTabsFromItem(GuiSkyrimPlayerInventory.java:84)
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.updateInventory(GuiSkyrimPlayerInventory.java:93)
at com.ryankshah.skyrimcraft.client.gui.GuiSkyrimPlayerInventory.<init>(GuiSkyrimPlayerInventory.java:28)
at com.ryankshah.skyrimcraft.client.gui.event.OpenGuiHandler.onGuiOpen(OpenGuiHandler.java:27)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_8_OpenGuiHandler_onGuiOpen_GuiOpenEvent.invoke(.dynamic)
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
at net.minecraft.client.Minecraft.displayGuiScreen(Minecraft.java:1062)
at net.minecraft.client.Minecraft.processKeyBinds(Minecraft.java:2300)
at net.minecraft.client.Minecraft.runTickKeyboard(Minecraft.java:2145)
-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player736'/338, l='MpServer', x=-42.77, y=69.00, z=255.86]]
Chunk stats: MultiplayerChunkCache: 598, 598
Level seed: 0
Level generator: ID 00 - default, ver 1. Features enabled: false
Level generator options:
Level spawn location: World: (8,64,256), Chunk: (at 8,4,0 in 0,16; contains blocks 0,0,256 to 15,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
Level time: 27007 game time, 12993 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: survival (ID 0). Hardcore: false. Cheats: false
Forced entities: 96 total; [EntityBat['Bat'/129, l='MpServer', x=-45.07, y=19.08, z=186.87], EntitySheep['Sheep'/130, l='MpServer', x=-47.76, y=71.00, z=203.37], EntitySkeleton['Skeleton'/131, l='MpServer', x=-46.50, y=54.00, z=266.76], EntitySheep['Sheep'/132, l='MpServer', x=-35.25, y=68.00, z=308.54], EntitySheep['Sheep'/133, l='MpServer', x=-51.32, y=68.00, z=317.70], EntityZombie['Zombie'/136, l='MpServer', x=-26.42, y=18.00, z=248.80], EntityZombie['Zombie'/137, l='MpServer', x=-12.56, y=21.00, z=256.75], EntityCreeper['Creeper'/138, l='MpServer', x=-10.84, y=23.00, z=296.81], EntityZombie['Zombie'/139, l='MpServer', x=-16.20, y=16.00, z=309.52], EntityBat['Bat'/149, l='MpServer', x=-12.25, y=25.10, z=193.25], EntityCreeper['Creeper'/150, l='MpServer', x=-1.50, y=50.00, z=227.50], EntityZombie['Zombie'/151, l='MpServer', x=-0.48, y=50.00, z=229.86], EntityBat['Bat'/152, l='MpServer', x=-24.52, y=15.30, z=258.00], EntityCreeper['Creeper'/153, l='MpServer', x=-1.22, y=40.00, z=278.58], EntityCreeper['Creeper'/154, l='MpServer', x=-2.49, y=51.00, z=285.77], EntitySpider['Spider'/155, l='MpServer', x=-1.29, y=25.10, z=289.70], EntityZombieVillager['Zombie Villager'/156, l='MpServer', x=-7.39, y=55.00, z=288.83], EntityZombie['Zombie'/157, l='MpServer', x=-4.51, y=52.00, z=289.19], EntitySkeleton['Skeleton'/158, l='MpServer', x=-9.50, y=15.00, z=315.50], EntitySkeleton['Skeleton'/159, l='MpServer', x=-8.50, y=15.00, z=316.50], EntitySkeleton['Skeleton'/160, l='MpServer', x=-15.09, y=15.00, z=310.50], EntityWolf['Wolf'/161, l='MpServer', x=-1.70, y=68.00, z=335.47], EntitySheep['Sheep'/176, l='MpServer', x=13.33, y=66.00, z=179.67], EntitySkeleton['Skeleton'/177, l='MpServer', x=4.50, y=52.00, z=218.50], EntitySkeleton['Skeleton'/178, l='MpServer', x=4.51, y=51.00, z=223.12], EntitySkeleton['Skeleton'/179, l='MpServer', x=0.50, y=17.00, z=239.50], EntityWolf['Wolf'/51, l='MpServer', x=-120.64, y=72.00, z=302.50], EntityCreeper['Creeper'/180, l='MpServer', x=1.50, y=40.00, z=278.50], EntitySkeleton['Skeleton'/52, l='MpServer', x=-118.50, y=56.00, z=305.50], EntitySkeleton['Skeleton'/53, l='MpServer', x=-113.49, y=56.00, z=307.70], EntityWitch['Witch'/59, l='MpServer', x=-96.50, y=43.00, z=206.23], EntitySkeleton['Skeleton'/60, l='MpServer', x=-100.50, y=31.00, z=237.50], EntitySheep['Sheep'/61, l='MpServer', x=-98.46, y=70.00, z=255.22], EntitySheep['Sheep'/62, l='MpServer', x=-108.44, y=70.00, z=245.77], EntitySkeleton['Skeleton'/190, l='MpServer', x=29.66, y=17.00, z=189.52], EntityBat['Bat'/63, l='MpServer', x=-113.56, y=34.69, z=262.83], EntityZombie['Zombie'/191, l='MpServer', x=23.50, y=54.00, z=185.50], EntityZombie['Zombie'/192, l='MpServer', x=28.43, y=50.00, z=178.78], EntitySkeleton['Skeleton'/193, l='MpServer', x=21.49, y=54.00, z=187.68], EntityCreeper['Creeper'/194, l='MpServer', x=23.50, y=40.00, z=214.81], EntityCreeper['Creeper'/195, l='MpServer', x=24.50, y=40.00, z=217.50], EntityZombie['Zombie'/196, l='MpServer', x=12.75, y=20.00, z=283.50], EntityZombie['Zombie'/197, l='MpServer', x=25.51, y=20.00, z=285.80], EntityWitch['Witch'/69, l='MpServer', x=-97.27, y=44.00, z=203.51], EntityWitch['Witch'/70, l='MpServer', x=-94.50, y=43.00, z=202.50], EntityCreeper['Creeper'/198, l='MpServer', x=25.50, y=20.00, z=292.50], EntityCreeper['Creeper'/71, l='MpServer', x=-92.50, y=40.00, z=193.50], EntitySheep['Sheep'/199, l='MpServer', x=31.33, y=68.00, z=307.24], EntitySquid['Squid'/72, l='MpServer', x=-81.40, y=62.43, z=200.58], EntitySheep['Sheep'/200, l='MpServer', x=20.29, y=68.00, z=325.19], EntitySquid['Squid'/73, l='MpServer', x=-86.26, y=61.81, z=199.86], EntityPig['Pig'/201, l='MpServer', x=24.24, y=68.00, z=325.23], EntitySquid['Squid'/74, l='MpServer', x=-93.14, y=62.24, z=198.54], EntitySheep['Sheep'/202, l='MpServer', x=28.55, y=69.00, z=335.41], EntitySquid['Squid'/75, l='MpServer', x=-88.59, y=61.99, z=204.58], EntityEnderman['Enderman'/76, l='MpServer', x=-87.73, y=31.00, z=218.49], EntitySheep['Sheep'/77, l='MpServer', x=-93.24, y=69.00, z=231.82], EntitySheep['Sheep'/78, l='MpServer', x=-94.22, y=69.00, z=245.36], EntityItem['item.item.arrow'/79, l='MpServer', x=-80.18, y=56.00, z=286.24], EntitySkeleton['Skeleton'/80, l='MpServer', x=-77.71, y=56.00, z=286.51], EntitySkeleton['Skeleton'/81, l='MpServer', x=-88.50, y=56.00, z=285.50], EntitySkeleton['Skeleton'/82, l='MpServer', x=-85.50, y=56.00, z=287.50], EntitySpider['Spider'/83, l='MpServer', x=-81.50, y=52.00, z=296.50], EntityBat['Bat'/84, l='MpServer', x=-82.91, y=54.18, z=297.58], EntityBat['Bat'/90, l='MpServer', x=-77.63, y=17.06, z=187.86], EntityCreeper['Creeper'/91, l='MpServer', x=-64.85, y=19.00, z=181.66], EntityZombie['Zombie'/92, l='MpServer', x=-74.50, y=30.00, z=177.50], EntityZombie['Zombie'/93, l='MpServer', x=-74.50, y=30.00, z=176.50], EntityZombie['Zombie'/94, l='MpServer', x=-65.46, y=23.00, z=189.28], EntityBat['Bat'/95, l='MpServer', x=-81.25, y=18.10, z=176.25], EntitySkeleton['Skeleton'/223, l='MpServer', x=32.50, y=18.00, z=187.50], EntitySkeleton['Skeleton'/96, l='MpServer', x=-67.50, y=43.00, z=192.50], EntityBat['Bat'/224, l='MpServer', x=27.30, y=17.24, z=200.14], EntityZombie['Zombie'/97, l='MpServer', x=-68.54, y=43.00, z=199.25], EntityCreeper['Creeper'/98, l='MpServer', x=-70.66, y=43.00, z=198.70], EntitySkeleton['Skeleton'/482, l='MpServer', x=0.00, y=0.00, z=0.00], EntitySkeleton['Skeleton'/99, l='MpServer', x=-78.50, y=52.00, z=295.50], EntityItem['item.item.dyePowder.black'/484, l='MpServer', x=-60.94, y=49.00, z=286.56], EntityPig['Pig'/229, l='MpServer', x=28.52, y=68.00, z=326.75], EntityBat['Bat'/109, l='MpServer', x=-54.21, y=14.75, z=184.13], EntityCreeper['Creeper'/110, l='MpServer', x=-51.50, y=20.00, z=181.50], EntityZombie['Zombie'/111, l='MpServer', x=-61.37, y=23.00, z=188.30], EntityBat['Bat'/112, l='MpServer', x=-47.15, y=18.80, z=174.60], EntitySkeleton['Skeleton'/113, l='MpServer', x=-65.51, y=43.00, z=184.71], EntityCreeper['Creeper'/114, l='MpServer', x=-52.78, y=41.00, z=187.56], EntitySpider['Spider'/115, l='MpServer', x=-52.40, y=41.00, z=186.40], EntityBat['Bat'/116, l='MpServer', x=-63.48, y=44.10, z=185.25], EntitySheep['Sheep'/117, l='MpServer', x=-61.21, y=70.00, z=185.51], EntitySheep['Sheep'/118, l='MpServer', x=-51.54, y=69.00, z=190.21], EntitySkeleton['Skeleton'/119, l='MpServer', x=-48.70, y=42.00, z=192.30], EntityPlayerSP['Player736'/338, l='MpServer', x=-42.77, y=69.00, z=255.86], EntityCreeper['Creeper'/120, l='MpServer', x=-61.50, y=43.00, z=196.21], EntityCreeper['Creeper'/122, l='MpServer', x=-59.50, y=50.00, z=287.50], EntityCreeper['Creeper'/123, l='MpServer', x=-56.50, y=52.00, z=284.50], EntitySpider['Spider'/124, l='MpServer', x=-53.70, y=52.84, z=279.30], EntityItem['item.item.dyePowder.black'/126, l='MpServer', x=-60.05, y=49.00, z=286.44]]
Retry entities: 1 total; [EntitySkeleton['Skeleton'/482, l='MpServer', x=0.00, y=0.00, z=0.00]]
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2886)
at net.minecraft.client.Minecraft.run(Minecraft.java:470)
at net.minecraft.client.main.Main.main(Main.java:118)
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:498)
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:498)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
at GradleStart.main(GradleStart.java:25)
-- System Details --
Details:
Minecraft Version: 1.12.2
Operating System: Mac OS X (x86_64) version 10.13.4
Java Version: 1.8.0_172, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 143435248 bytes (136 MB) / 1566048256 bytes (1493 MB) up to 3817865216 bytes (3641 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
FML: MCP 9.42 Powered by Forge 14.23.4.2707 5 mods loaded, 5 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
| State | ID | Version | Source | Signature |
|:--------- |:----------- |:------------ |:-------------------------------- |:--------- |
| UCHIJAAAA | minecraft | 1.12.2 | minecraft.jar | None |
| UCHIJAAAA | mcp | 9.42 | minecraft.jar | None |
| UCHIJAAAA | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.4.2707.jar | None |
| UCHIJAAAA | forge | 14.23.4.2707 | forgeSrc-1.12.2-14.23.4.2707.jar | None |
| UCHIJAAAA | skyrimcraft | 0.1 | skyrimcraft_main | None |
Loaded coremods (and transformers):
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '2.1 ATI-1.66.31' Renderer: 'AMD Radeon Pro 555 OpenGL Engine'
Launched Version: 1.12.2
LWJGL: 2.9.2
OpenGL: AMD Radeon Pro 555 OpenGL Engine GL version 2.1 ATI-1.66.31, ATI Technologies Inc.
GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because ARB_framebuffer_object 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: Yes
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)
CPU: 8x Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
[16:28:51] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# /Users/ryankshah/Documents/GitHub/skyrimcraft/run/./crash-reports/crash-2018-06-23_16.28.51-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed
Process finished with exit code 255
package com.ryankshah.skyrimcraft.client.gui;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import org.lwjgl.input.Keyboard;
import java.io.IOException;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static java.util.stream.Collectors.groupingBy;
import static java.util.stream.Collectors.toList;
// TODO: Fix inventory...
public class GuiSkyrimPlayerInventory extends GuiScreen
{
private List<ItemStack> allItems;
private Map<String, List<ItemStack>> inventory;
private EntityPlayer player;
public GuiSkyrimPlayerInventory(EntityPlayer player) {
this.player = player;
inventory = new HashMap<>();
updateInventory();
System.out.println(allItems);
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
super.drawScreen(mouseX, mouseY, partialTicks);
drawDefaultBackground();
// Draw Categories "panel"
drawRect(10, 0, 110, height, 0xAA000000); // Panel background
drawRect(12, 0, 13, height, 0xAAFFFFFF); // Panel right border
drawRect(107, 0, 108, height, 0xAAFFFFFF); // Panel left border
// Draw Items "panel"
drawRect(130, 0, 230, height, 0xAA000000); // Panel background
drawRect(132, 0, 133, height, 0xAAFFFFFF); // Panel right border
drawRect(227, 0, 228, height, 0xAAFFFFFF); // Panel left border
// Write categories
int y = 0;
for(String key : inventory.keySet()) {
drawString(fontRenderer, key, 20, height / 2 + y, 0xAAFFFFFF);
y += 20;
}
}
@Override
protected void keyTyped(char typedChar, int keyCode) throws IOException {
super.keyTyped(typedChar, keyCode);
// If press ESC or E, exit inventory
if (keyCode == 1 || this.mc.gameSettings.keyBindInventory.isActiveAndMatches(keyCode))
this.mc.player.closeScreen();
if (keyCode == Keyboard.KEY_C) {
System.out.println(inventory);
}
}
@Override
public void updateScreen() {
super.updateScreen();
updateInventory(); // Update the inventory to check new items etc. coming into or leaving the inventory
}
@Override
public boolean doesGuiPauseGame() {
return false;
}
private List<String> getTabsFromItem(ItemStack stack) {
List<String> tabs = new ArrayList<>();
for(CreativeTabs tab : stack.getItem().getCreativeTabs())
tabs.add(tab.getTranslatedTabLabel());
return tabs;
}
private void updateInventory() {
allItems = Stream.of(player.inventory.mainInventory, player.inventory.offHandInventory, player.inventory.armorInventory).flatMap(Collection::stream).collect(toList());
inventory.put("ALL", allItems);
for (ItemStack stack : allItems) {
List<String> tabs = getTabsFromItem(stack);
for(String tab : tabs) {
inventory.computeIfAbsent(tab, k -> new ArrayList<>()).add(stack);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment