Minecraft crashes when I put items in my modded gui slots.

Published by 0xyg0n on
Issue description

I am making a mod that adds a block. The block has a gui that opens when you click on it. Inside the gui is an input slot and an output slot. If I put anything in the input slot the game immediately crashes. The only procedure used (besides the one that just opens the gui when you click on it) is one that checks what you put in the input slot. If what you put in the input slot is a coal block, iron block, or 5 gold ingots then it puts an item inside of the output slot, but if it is any other item it just clears the output slot. As soon as I put any item in the input slot is when it crashes. Here is a screenshot of my procedure that activates when an item is inserted into the input slot: A screenshot of my procedure.

Issue comments

---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 5/18/19 12:33 PM
Description: Updating screen events

java.lang.NullPointerException: Updating screen events
    at mod.mcreator.mcreator_oreConverterGUIItemPlacedInSlot.executeProcedure(mcreator_oreConverterGUIItemPlacedInSlot.java:30)
    at mod.mcreator.mcreator_oreConverterGUI$GuiContainerMod$2.onSlotChanged(mcreator_oreConverterGUI.java:67)
    at net.minecraft.inventory.Slot.putStack(Slot.java:98)
    at net.minecraft.inventory.Container.slotClick(Container.java:220)
    at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:610)
    at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:693)
    at net.minecraft.client.gui.inventory.GuiContainer.mouseReleased(GuiContainer.java:632)
    at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:621)
    at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:576)
    at net.minecraft.client.Minecraft.runTick(Minecraft.java:1885)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1187)
    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 mod.mcreator.mcreator_oreConverterGUIItemPlacedInSlot.executeProcedure(mcreator_oreConverterGUIItemPlacedInSlot.java:30)
    at mod.mcreator.mcreator_oreConverterGUI$GuiContainerMod$2.onSlotChanged(mcreator_oreConverterGUI.java:67)
    at net.minecraft.inventory.Slot.putStack(Slot.java:98)
    at net.minecraft.inventory.Container.slotClick(Container.java:220)
    at net.minecraft.client.multiplayer.PlayerControllerMP.windowClick(PlayerControllerMP.java:610)
    at net.minecraft.client.gui.inventory.GuiContainer.handleMouseClick(GuiContainer.java:693)
    at net.minecraft.client.gui.inventory.GuiContainer.mouseReleased(GuiContainer.java:632)
    at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:621)
    at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:576)

-- Affected screen --
Details:
    Screen name: mod.mcreator.mcreator_oreConverterGUI.GuiWindow

-- Affected level --
Details:
    Level name: MpServer
    All players: 1 total; [EntityPlayerSP['Player828'/302, l='MpServer', x=-237.34, y=71.00, z=232.42]]
    Chunk stats: MultiplayerChunkCache: 289, 289
    Level seed: 0
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options: 
    Level spawn location: World: (-220,64,236), Chunk: (at 4,4,12 in -14,14; contains blocks -224,0,224 to -209,255,239), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Level time: 2103 game time, 2103 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: 77 total; [EntitySkeleton['Skeleton'/132, l='MpServer', x=-206.50, y=28.00, z=155.50], EntitySheep['Sheep'/134, l='MpServer', x=-206.50, y=91.00, z=172.50], EntitySheep['Sheep'/135, l='MpServer', x=-205.50, y=89.00, z=173.50], EntitySheep['Sheep'/136, l='MpServer', x=-205.85, y=91.00, z=171.55], EntityCreeper['Creeper'/137, l='MpServer', x=-198.50, y=41.00, z=183.50], EntitySheep['Sheep'/138, l='MpServer', x=-207.27, y=78.00, z=178.54], EntitySheep['Sheep'/139, l='MpServer', x=-205.62, y=76.00, z=180.45], EntitySheep['Sheep'/140, l='MpServer', x=-206.78, y=73.00, z=181.45], EntitySheep['Sheep'/141, l='MpServer', x=-204.72, y=82.00, z=177.69], EntitySheep['Sheep'/142, l='MpServer', x=-207.80, y=64.00, z=307.49], EntityBat['Bat'/406, l='MpServer', x=-250.28, y=23.98, z=182.75], EntityBat['Bat'/22, l='MpServer', x=-318.29, y=14.45, z=227.18], EntityBat['Bat'/408, l='MpServer', x=-256.25, y=24.58, z=192.91], EntitySheep['Sheep'/155, l='MpServer', x=-181.27, y=74.00, z=158.54], EntitySheep['Sheep'/156, l='MpServer', x=-172.73, y=67.00, z=169.52], EntityWitch['Witch'/157, l='MpServer', x=-171.33, y=24.00, z=181.21], EntitySkeleton['Skeleton'/158, l='MpServer', x=-182.50, y=28.00, z=184.50], EntitySheep['Sheep'/159, l='MpServer', x=-183.50, y=65.00, z=178.50], EntitySheep['Sheep'/160, l='MpServer', x=-181.50, y=65.00, z=182.50], EntitySheep['Sheep'/161, l='MpServer', x=-183.27, y=68.00, z=167.49], EntitySheep['Sheep'/162, l='MpServer', x=-183.53, y=65.00, z=177.50], EntityWolf['Wolf'/36, l='MpServer', x=-316.62, y=73.00, z=263.48], EntitySpider['Spider'/171, l='MpServer', x=-168.50, y=22.00, z=175.50], EntitySheep['Sheep'/172, l='MpServer', x=-171.50, y=65.00, z=166.50], EntitySheep['Sheep'/173, l='MpServer', x=-175.50, y=67.00, z=162.50], EntityCreeper['Creeper'/174, l='MpServer', x=-173.30, y=65.00, z=168.59], EntitySkeleton['Skeleton'/175, l='MpServer', x=-175.52, y=53.00, z=200.27], EntityZombie['Zombie'/51, l='MpServer', x=-307.50, y=24.00, z=172.50], EntityZombie['Zombie'/52, l='MpServer', x=-311.50, y=24.00, z=173.50], EntityBat['Bat'/54, l='MpServer', x=-306.29, y=23.41, z=212.64], EntityZombie['Zombie'/55, l='MpServer', x=-305.20, y=12.00, z=227.50], EntityCreeper['Creeper'/58, l='MpServer', x=-296.50, y=25.00, z=179.50], EntityBat['Bat'/314, l='MpServer', x=-291.68, y=55.94, z=230.83], EntityPlayerSP['Player828'/302, l='MpServer', x=-237.34, y=71.00, z=232.42], EntityEnderman['Enderman'/59, l='MpServer', x=-289.72, y=31.00, z=208.52], EntityZombie['Zombie'/60, l='MpServer', x=-288.75, y=38.00, z=226.52], EntityCreeper['Creeper'/61, l='MpServer', x=-296.50, y=52.00, z=222.80], EntityCreeper['Creeper'/62, l='MpServer', x=-297.81, y=57.00, z=267.54], EntityCreeper['Creeper'/63, l='MpServer', x=-301.50, y=25.00, z=278.50], EntityZombie['Zombie'/68, l='MpServer', x=-286.24, y=22.00, z=190.48], EntityCreeper['Creeper'/69, l='MpServer', x=-283.50, y=21.00, z=189.50], EntityEnderman['Enderman'/70, l='MpServer', x=-283.32, y=30.00, z=198.50], EntitySkeleton['Skeleton'/71, l='MpServer', x=-286.23, y=29.00, z=200.65], EntitySquid['Squid'/72, l='MpServer', x=-268.23, y=62.12, z=234.53], EntityZombie['Zombie'/73, l='MpServer', x=-280.50, y=45.00, z=271.25], EntityZombie['Zombie'/74, l='MpServer', x=-282.99, y=46.00, z=265.50], EntitySkeleton['Skeleton'/75, l='MpServer', x=-282.50, y=46.00, z=266.50], EntitySkeleton['Skeleton'/76, l='MpServer', x=-283.70, y=46.00, z=265.50], EntityBat['Bat'/77, l='MpServer', x=-278.82, y=51.55, z=258.32], EntitySkeleton['Skeleton'/78, l='MpServer', x=-256.50, y=18.00, z=168.50], EntityCreeper['Creeper'/79, l='MpServer', x=-269.50, y=22.00, z=177.81], EntityCreeper['Creeper'/80, l='MpServer', x=-263.50, y=23.00, z=183.50], EntitySpider['Spider'/81, l='MpServer', x=-262.50, y=23.00, z=181.50], EntitySkeleton['Skeleton'/82, l='MpServer', x=-256.86, y=24.00, z=190.50], EntityBat['Bat'/83, l='MpServer', x=-265.78, y=23.04, z=177.35], EntityZombie['Zombie'/84, l='MpServer', x=-267.52, y=28.00, z=224.78], EntitySquid['Squid'/85, l='MpServer', x=-272.42, y=62.00, z=227.40], EntitySquid['Squid'/86, l='MpServer', x=-271.53, y=61.15, z=240.13], EntityCreeper['Creeper'/87, l='MpServer', x=-256.50, y=16.00, z=259.50], EntityCreeper['Creeper'/88, l='MpServer', x=-262.50, y=41.00, z=287.62], EntityBat['Bat'/89, l='MpServer', x=-263.23, y=44.39, z=286.48], EntityBat['Bat'/90, l='MpServer', x=-267.29, y=45.96, z=277.99], EntityCreeper['Creeper'/91, l='MpServer', x=-266.49, y=45.00, z=288.17], EntityBat['Bat'/92, l='MpServer', x=-263.25, y=40.10, z=300.25], EntitySkeleton['Skeleton'/98, l='MpServer', x=-252.57, y=20.00, z=165.76], EntityEnderman['Enderman'/99, l='MpServer', x=-252.30, y=19.00, z=167.36], EntityEnderman['Enderman'/100, l='MpServer', x=-253.50, y=20.00, z=161.50], EntitySkeleton['Skeleton'/101, l='MpServer', x=-250.50, y=24.00, z=184.50], EntitySquid['Squid'/102, l='MpServer', x=-260.60, y=62.00, z=228.40], EntityBat['Bat'/103, l='MpServer', x=-251.71, y=14.10, z=269.50], EntityBat['Bat'/104, l='MpServer', x=-241.67, y=23.87, z=270.39], EntitySkeleton['Skeleton'/105, l='MpServer', x=-255.26, y=28.00, z=273.47], EntityBat['Bat'/106, l='MpServer', x=-243.51, y=24.08, z=270.57], EntitySheep['Sheep'/113, l='MpServer', x=-226.46, y=74.00, z=300.74], EntitySheep['Sheep'/114, l='MpServer', x=-226.45, y=72.00, z=304.76], EntitySheep['Sheep'/122, l='MpServer', x=-208.50, y=83.00, z=174.50], EntitySheep['Sheep'/123, l='MpServer', x=-222.45, y=72.00, z=301.70]]
    Retry entities: 0 total; []
    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:2888)
    at net.minecraft.client.Minecraft.run(Minecraft.java:462)
    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: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_202, BellSoft
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), BellSoft
    Memory: 344825136 bytes (328 MB) / 934281216 bytes (891 MB) up to 2837446656 bytes (2706 MB)
    JVM Flags: 0 total; 
    IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
    FML: MCP 9.42 Powered by Forge 14.23.5.2768 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.5.2768.jar | None      |
    | UCHIJAAAA | forge           | 14.23.5.2768 | forgeSrc-1.12.2-14.23.5.2768.jar | None      |
    | UCHIJAAAA | ore_transformer | 1.0.0        | modid-1.0.jar                    | None      |

    Loaded coremods (and transformers): 
    GL info: ' Vendor: 'Intel' Version: '4.5.0 - Build 23.20.16.4973' Renderer: 'Intel(R) UHD Graphics 620'
    Launched Version: 1.12.2
    LWJGL: 2.9.4
    OpenGL: Intel(R) UHD Graphics 620 GL version 4.5.0 - Build 23.20.16.4973, Intel
    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: 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-8550U CPU @ 1.80GHz

Could you attach the workspace to the ticket and tell me which block to check as I was not able to find the cause from the error log alone. Thanks!