From 4be7165c831edd1fa9f2407c82894b35a40a6df8 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 6 Jul 2022 14:59:38 -0700 Subject: [PATCH] Fix Bee flower NPE --- .../net/minecraft/world/entity/animal/Bee.java.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch index 7fb1521e10..8f3ad1f8c7 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch @@ -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() {