Help Crash when spawning entity with NBT tags

Started by chromius on Thu, 05/19/2022 - 17:33

Topic category: Help with modding (Java Edition)

Last seen on 23:06, 24. May 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help Crash when spawning entity with NBT tags
Thu, 05/19/2022 - 17:33

Hi so I have an aging system, my issue is IF I make the baby spawn an adult and despawn it works. However I have a hunger system too, and If I make it so that the Baby spawns an adult, then sets the Adults NBT hunger tag to be the current babies NBT hunger tag, the game will sometimes crash however when I log back in the adult will have spawned in. What is the issue here? am I not supposed to transfer NBT tags? Is there a better way to give a mob a hunger system?

Last seen on 23:06, 24. May 2022
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Description: Ticking entity…
Thu, 05/19/2022 - 18:06

Description: Ticking entity

java.lang.NullPointerException: Ticking entity
    at net.mcreator.prehistoriczoo.procedures.BabyTOToddlerTestProcedure.executeProcedure(BabyTOToddlerTestProcedure.java:95) ~[main/:?] {re:classloading}
    at net.mcreator.prehistoriczoo.entity.TrexBabyMaleEntity$CustomEntity.baseTick(TrexBabyMaleEntity.java:182) ~[main/:?] {re:classloading}
    at net.minecraft.entity.Entity.tick(Entity.java:411) ~[forge-1.16.5-36.2.26_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B}