Player update tick crashing the game and help with advancements

Started by JCLICKER on

Topic category: Help with modding (Java Edition)

Last seen on 00:37, 13. Nov 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Player update tick crashing the game and help with advancements
Sat, 02/22/2020 - 00:29 (edited)

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.

 

Here is the crash log:

Time: 2/21/20 6:06 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.MCreatorLstart.executeProcedure(MCreatorLstart.java:37)
    at net.mcreator.jclicker_test.MCreatorLstart.onPlayerTick(MCreatorLstart.java:64)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_144_MCreatorLstart_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:279)
    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.MCreatorLstart.executeProcedure(MCreatorLstart.java:37)
    at net.mcreator.jclicker_test.MCreatorLstart.onPlayerTick(MCreatorLstart.java:64)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_144_MCreatorLstart_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: 2879
    Entity Name: Real_JCLICKER
    Entity's Exact location: 181.60, 67.00, 295.62
    Entity's Block location: World: (181,67,295), Chunk: (at 5,4,7 in 11,18; contains blocks 176,0,288 to 191,255,303), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,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@23b38ae7
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:279)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
    at java.lang.Thread.run(Thread.java:745)

 

 

 

 

 

And these are some photos of the code:

 

Advancement

This is another piece of the mod that uses player ticks

The second one is what I have been struggling with for a long time that also uses player ticks, and it is supposed to give buffs if the player wears OP armor and also a different advancement (see picture 3).

this is the second advancement

 

Can anybody tell me what's going on and how I can fix it?

Thanks!

 

Edited by JCLICKER on Sat, 02/22/2020 - 00:29
Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In the newest mcreator…
Sat, 02/22/2020 - 01:52

In the newest mcreator version, there is a bug with advancedments which changed how they’re made.

You need to deselect all advancement procedure blocks and reselect them

Last seen on 00:37, 13. Nov 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, but how will that fix…
Sat, 02/22/2020 - 02:31

Ok, but how will that fix the player ticks?

Last seen on 00:37, 13. Nov 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I did that, and it may be…
Sat, 02/22/2020 - 02:48

I did that, and it may be unrelated but my game crashed immediately (for the ticking player reason it said) instead of when I got the trigger item (an ore drop)

Last seen on 00:37, 13. Nov 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I tried again and it said it…
Sat, 02/22/2020 - 02:56

I tried again and it said it crashed due to server tick loop as soon as I made a new world. I don't know if this helps, I'm just trying to give all the info. Thanks for helping

Last seen on 03:10, 19. Feb 2022
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
then open a ticket on the…
Sat, 02/22/2020 - 03:30

then open a ticket on the issue tracker I think

Last seen on 00:37, 13. Nov 2020
Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
OK
Sat, 02/22/2020 - 03:32

OK