illusivesoulworks / veinmining

Minecraft Mod: A lightweight, highly configurable Vein Mining enchantment for tools.
Other
30 stars 16 forks source link

[Bug]: Ticking entity crash #127

Closed Landros23 closed 5 months ago

Landros23 commented 5 months ago

Minecraft Version

1.20.6

What happened?

Was fooling around in a creative world and spawned in a few pillagers at random to go against a Wither as part of some modpack testing. The game crashed soon after and logs noted that it was due to a ticking entity, and specified said entity being a pillager. At first I thought it was a bugged interaction between the Wither and pillagers, but it turns out this is solely a problem with pillagers charging crossbows; see the steps provided to reproduce this. I'm not sure if there are other mobs affected. Seems like an odd issue to be attributed to this mod, but I think this is the right place to submit this issue based on this log snippet (full log also provided):

Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.class_1657.method_5667()" because "player" is null at com.illusivesoulworks.veinmining.common.veinmining.VeinMiningPlayers.isVeinMining(VeinMiningPlayers.java:64) ~[veinmining-fabric-4.0.0 1.20.6.jar:?] at com.illusivesoulworks.veinmining.mixin.VeinMiningMixinHooks.shouldCancelItemDamage(VeinMiningMixinHooks.java:17) ~[veinmining-fabric-4.0.0 1.20.6.jar:?] at ...

How do you trigger this bug?

  1. Create a new creative world
  2. Spawn pillagers using their spawn egg
  3. Change gamemode to survival
  4. Aggro pillagers, wait for them to charge their crossbows
  5. When they are about to shoot, the game should crash

Loader

Fabric

Loader Version

Fabric Loader 0.15.10

API Version

Fabric API 0.98.0+1.20.6

Mod Version

Vein Mining 4.0.0+1.20.6

Relevant Log Outputs

https://mclo.gs/uiDg88H