Advancements Crashing Game

Published by JCLICKER on
Issue description

 

So, I'm working on a mod that is just for fun and I want it so that if you get an item you should get an advancement. This should be really easy, but the game crashes whenever I should get the advancement, saying something about Player Ticks. Somebody suggested that I try to unselect and deselect the advancement in the procedures, but after that and a few other minor changes, it crashed saying something about a server tick loop. After that, I tried one more time and it just crashed whenever I tried to load a world.

Here is the crash report:

---- Minecraft Crash Report ----
// Sorry :(

Time: 2/23/20 2:05 PM
Description: Ticking player

java.lang.NullPointerException: Ticking player
	at net.minecraft.advancements.PlayerAdvancements.func_192743_a(PlayerAdvancements.java:379)
	at net.minecraft.advancements.PlayerAdvancements.func_192747_a(PlayerAdvancements.java:371)
	at net.mcreator.jclicker_test.MCreatorDarkAcheivment.executeProcedure(MCreatorDarkAcheivment.java:45)
	at net.mcreator.jclicker_test.MCreatorDarkAcheivment.onPlayerTick(MCreatorDarkAcheivment.java:106)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_22_MCreatorDarkAcheivment_onPlayerTick_PlayerTickEvent.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.minecraftforge.fml.common.FMLCommonHandler.onPlayerPostTick(FMLCommonHandler.java:370)
	at net.minecraft.entity.player.EntityPlayer.func_184808_cD(EntityPlayer.java:378)
	at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:288)
	at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:382)
	at net.minecraft.network.NetHandlerPlayServer.func_73660_a(NetHandlerPlayServer.java:173)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:209)
	at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:285)
	at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:180)
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:790)
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
	at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
	at java.lang.Thread.run(Thread.java:745)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server thread
Stacktrace:
	at net.minecraft.advancements.PlayerAdvancements.func_192743_a(PlayerAdvancements.java:379)
	at net.minecraft.advancements.PlayerAdvancements.func_192747_a(PlayerAdvancements.java:371)
	at net.mcreator.jclicker_test.MCreatorDarkAcheivment.executeProcedure(MCreatorDarkAcheivment.java:45)
	at net.mcreator.jclicker_test.MCreatorDarkAcheivment.onPlayerTick(MCreatorDarkAcheivment.java:106)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_22_MCreatorDarkAcheivment_onPlayerTick_PlayerTickEvent.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.minecraftforge.fml.common.FMLCommonHandler.onPlayerPostTick(FMLCommonHandler.java:370)
	at net.minecraft.entity.player.EntityPlayer.func_184808_cD(EntityPlayer.java:378)
	at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:288)

-- Player being ticked --
Details:
	Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
	Entity ID: 277
	Entity Name: Real_JCLICKER
	Entity's Exact location: -238.50, 68.00, 70.50
	Entity's Block location: World: (-239,68,70), Chunk: (at 1,4,6 in -15,4; contains blocks -240,0,64 to -225,255,79), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
	Entity's Momentum: 0.00, -0.08, 0.00
	Entity's Passengers: []
	Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
	at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:382)
	at net.minecraft.network.NetHandlerPlayServer.func_73660_a(NetHandlerPlayServer.java:173)
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:209)
	at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:285)

-- Ticking connection --
Details:
	Connection: net.minecraft.network.NetworkManager@2b7ec84a
Stacktrace:
	at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:180)
	at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:790)
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668)
	at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
	at java.lang.Thread.run(Thread.java:745)

-- System Details --
Details:
	Minecraft Version: 1.12.2
	Operating System: Mac OS X (x86_64) version 10.15.3
	Java Version: 1.8.0_74, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 260558400 bytes (248 MB) / 536870912 bytes (512 MB) up to 2147483648 bytes (2048 MB)
	JVM Flags: 7 total; -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
	IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
	FML: MCP 9.42 Powered by Forge 14.23.5.2838 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                                |
	|:------ |:------------- |:------------ |:----------------------------- |:---------------------------------------- |
	| LCHIJA | minecraft     | 1.12.2       | minecraft.jar                 | None                                     |
	| LCHIJA | mcp           | 9.42         | minecraft.jar                 | None                                     |
	| LCHIJA | FML           | 8.0.99.99    | forge-1.12.2-14.23.5.2838.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
	| LCHIJA | forge         | 14.23.5.2838 | forge-1.12.2-14.23.5.2838.jar | e3c3d50c7c986df74c645c0ac54639741c90a557 |
	| LCHIJA | jclicker_test | 1.0.0        | LightningMod 4.5.jar          | None                                     |

	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['Real_JCLICKER'/277, l='Zap!', x=-238.50, y=68.00, z=70.50]]
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fml,forge'

I think it may be something to do with 1.12.2 not accepting player ticks or the advancement system currently. To get to the bug, all I did was go into 1.12.2 and join a game.

Here is my forum post: https://mcreator.net/forum/57381/player-update-tick-crashing-game

 

 

Issue comments

When possible, attach your MCreator workspace (or even better a minimal example workspace required to reproduce the bug), game crash logs (full logs, do not crop them, in text format, not screenshots of logs) from the Console tab or terminal and steps to reproduce the bug in your workspace.

Export the workspace using the File menu in MCreator.

Ok, but I have changed some of the things in the workspace so it might be different, but I will add that in.

I need a workspace to reproduce the error and steps to do it, otherwise there is no point in sharing the workspace.

com.google.gson.JsonSyntaxException: Expected item to be an item, was unknown string 'minecraft:end_portal'

Based on this, it seems that MC does not support end_portal as advancement icon.

IT WORKS! Thanks so much (I get the Dark master achievement when I join, but I can sort that out myself I think)