The Bumblezone (Quilt/Fabric)

The Bumblezone (Quilt/Fabric)

12M Downloads

Crashing in thebumblezone_bzStringCurtainBlockingBees() mixin

noncom opened this issue · 8 comments

commented

Crashing when approaching a pillager outpost with

  • Improved mobs 1.11.0
  • Savage and Ravage 5.0.2
  • The Bumblezone 6.6.3

Log: https://gist.github.com/noncom/1d968db181f0250894a579026e1c84ce

If the mob is null when in https://github.com/TelepathicGrunt/Bumblezone/blob/latest-released-Forge/src/main/java/com/telepathicgrunt/the_bumblezone/mixin/entities/FlyNodeEvaluatorMixin.java#L24 the first condition this.mob instanceof Bee evaluates to false and the second one is tested, which causes the NPE.

commented

Just to point out something, this is a snippet of FlyNodeEvaluator vanilla code. Notice all the calls to this.mob. If the mob is null, vanilla code would also crash.
image

This looks more like a savage and ravage bug as node evaluators should never have null mobs. I can add a workaround but this should be put onto their github

commented

Bigger question, how the f does a node navigator have no mob at all?

commented

May be related. A different part of their mixin to the goal crashing due to null. team-abnormals/savage-and-ravage#120

commented

What may be happening is a mob is spawned and before the mob’s own pathfinding is ran, this ImprovedCrossbowGoal line below is ran. The mob’s pathfinding calls a pathfinding method in the node evaluator called prepare and in there, it sets this.mob to the mob that is doing the pathfinding. Savage and ravage should be calling the node’s prepare method themselves before they try to get the path block type to make sure this.mob is always set.

https://github.com/team-abnormals/savage-and-ravage/blob/655e075b4346b38f98e8ef737969e8e2d6d1a983/src/main/java/com/teamabnormals/savage_and_ravage/common/entity/ai/goal/ImprovedCrossbowGoal.java#L213

That will make it safe for anyone in that path block type method and ultimately stop the issue (hopefully) Forge is looking to add a method to pass in the mob into the method so more mods can change the pathing type of blocks based on what mob is doing the pathfinding. So savage and ravage should call prepare method to shield against crashing more mods when forge adds the change

commented

Yeah I agree, the mob being null there is the weird part. I had originally risen an issue for them: team-abnormals/savage-and-ravage#132 but after looking and their code for that thing I didn't find the problem...

However it is of course not a problem originally made by Bumblezone. It must be descending from somewhere else.

From the stack trace you've linked I can at least see that "Biome Makeover", "Faction Craft", "Bookshelf" and "Buzzier Bees", at least, are present in my case as well. It could be that in one of their mixins something happens with the mob.

commented

That actually sounds very much like it should be the source of the problem, and an important notice as well.
I will create another issue on Savage and Ravage, mentioning this, then.

commented

Released v6.6.4 with fix for 1.19.2 now

commented

fixed now in 6.6.3 releases for 1.19.3