Crash after a golem is given a hoe
No3371 opened this issue ยท 1 comments
[13:38:01] [Server thread/ERROR] () net.minecraft.util.crash.CrashException: Ticking entity
at net.minecraft.server.MinecraftServer.tickWorlds(MinecraftServer.java:879)
at MC//net.minecraft.server.dedicated.MinecraftDedicatedServer.tickWorlds(MinecraftDedicatedServer.java:289)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:819)
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:665)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257)
at [email protected]/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.entity.player.PlayerEntity.getPitch()" because "$$1" is null
at MC//net.minecraft.item.Item.raycast(Item.java:388)
at MC//net.minecraft.item.HoeItem.handler$dao000$decorative_blocks$whenUsed(HoeItem.java:1540)
at MC//net.minecraft.item.HoeItem.useOnBlock(HoeItem.java)
at MC//net.minecraft.item.ItemStack.useOnBlock(ItemStack.java:264)
at com.sollace.coppergolem.entity.ai.UseItemInteraction.perform(UseItemInteraction.java:69)
at com.sollace.coppergolem.entity.ai.PressButtonGoal.lambda$tick$1(PressButtonGoal.java:106)
at [email protected]/java.util.Optional.ifPresentOrElse(Optional.java:196)
at com.sollace.coppergolem.entity.ai.PressButtonGoal.lambda$tick$3(PressButtonGoal.java:98)
at [email protected]/java.util.Optional.ifPresent(Optional.java:178)
at com.sollace.coppergolem.entity.ai.PressButtonGoal.tick(PressButtonGoal.java:97)
at MC//net.minecraft.entity.ai.goal.PrioritizedGoal.tick(PrioritizedGoal.java:65)
at MC//net.minecraft.entity.ai.goal.GoalSelector.tickGoals(GoalSelector.java:119)
at MC//net.minecraft.entity.ai.goal.GoalSelector.tick(GoalSelector.java:110)
at MC//net.minecraft.entity.mob.MobEntity.tickNewAi(MobEntity.java:753)
at MC//net.minecraft.entity.LivingEntity.tickMovement(LivingEntity.java:2641)
at MC//net.minecraft.entity.mob.MobEntity.tickMovement(MobEntity.java:553)
at com.sollace.coppergolem.entity.CopperGolemEntity.tickMovement(CopperGolemEntity.java:353)
at MC//net.minecraft.entity.LivingEntity.tick(LivingEntity.java:2385)
at MC//net.minecraft.entity.mob.MobEntity.tick(MobEntity.java:353)
at com.sollace.coppergolem.entity.CopperGolemEntity.tick(CopperGolemEntity.java:346)
at MC//net.minecraft.server.world.ServerWorld.tickEntity(ServerWorld.java:712)
at MC//net.minecraft.world.World.tickEntity(World.java:466)
at MC//net.minecraft.server.world.ServerWorld.method_31420(ServerWorld.java:371)
at MC//net.minecraft.world.EntityList.forEach(EntityList.java:54)
at MC//net.minecraft.server.world.ServerWorld.tick(ServerWorld.java:339)
at net.minecraft.server.MinecraftServer.tickWorlds(MinecraftServer.java:875)
... 5 more
Sorry for the delay in checking this!
It looks like an issue with another mod you have installed which is assuming hoes are only used by players. (ItemUsageContext.getPlayer() is nullable). They should check if the player is null and not do anything, or do something different.
Best I can do is prevent a crash when it happens.