Fix Bee flower NPE

This commit is contained in:
Jake Potrebic 2022-07-06 14:59:38 -07:00
parent ce5660a8e9
commit 4be7165c83

View File

@ -140,6 +140,15 @@
}
}
@@ -934,7 +974,7 @@
Bee.this.dropFlower();
this.pollinating = false;
Bee.this.remainingCooldownBeforeLocatingNewFlower = 200;
- } else {
+ } else if (Bee.this.savedFlowerPos != null) { // Paper - add null check since API can manipulate this
Vec3 vec3d = Vec3.atBottomCenterOf(Bee.this.savedFlowerPos).add(0.0D, 0.6000000238418579D, 0.0D);
if (vec3d.distanceTo(Bee.this.position()) > 1.0D) {
@@ -1082,7 +1122,7 @@
BeeGoToHiveGoal() {