aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0298-Prevent-bees-loading-chunks-checking-hive-position.patch
diff options
context:
space:
mode:
authorSpottedleaf <[email protected]>2024-11-28 17:39:40 -0800
committerSpottedleaf <[email protected]>2024-11-28 18:27:59 -0800
commitda9d110d5bf8ffb090d63cd6a443b22ef1ab9d64 (patch)
tree9dbb88d122e6c21827c230041f0b7c93d5a03bf0 /patches/server/0298-Prevent-bees-loading-chunks-checking-hive-position.patch
parent0cc7bd485760dd0abd387f64d193ffef7aa019ee (diff)
downloadPaper-da9d110d5bf8ffb090d63cd6a443b22ef1ab9d64.tar.gz
Paper-da9d110d5bf8ffb090d63cd6a443b22ef1ab9d64.zip
Remove chunk save reattempt patch
This patch does not appear to be doing anything useful, and may hide errors. Currently, the save logic does not run through this path either so it did not do anything. Additionally, properly implement support for handling RegionFileSizeException in Moonrise.
Diffstat (limited to 'patches/server/0298-Prevent-bees-loading-chunks-checking-hive-position.patch')
-rw-r--r--patches/server/0298-Prevent-bees-loading-chunks-checking-hive-position.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0298-Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/0298-Prevent-bees-loading-chunks-checking-hive-position.patch
new file mode 100644
index 0000000000..ce7ab4dd4d
--- /dev/null
+++ b/patches/server/0298-Prevent-bees-loading-chunks-checking-hive-position.patch
@@ -0,0 +1,24 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: William Blake Galbreath <[email protected]>
+Date: Sun, 5 Jan 2020 17:24:34 -0600
+Subject: [PATCH] Prevent bees loading chunks checking hive position
+
+
+diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
+index b1a72ed404f4bc31f32dd771dd320b7c783c9651..310a2aa23365f9a8a8b7b6fa2323aed792f95adb 100644
+--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
++++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
+@@ -514,7 +514,12 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+
+ @Nullable
+ BeehiveBlockEntity getBeehiveBlockEntity() {
+- return this.hivePos == null ? null : (this.isTooFarAway(this.hivePos) ? null : (BeehiveBlockEntity) this.level().getBlockEntity(this.hivePos, BlockEntityType.BEEHIVE).orElse(null)); // CraftBukkit - decompile error
++ // Paper start - move over logic to accommodate isTooFarAway with chunk load check
++ if (this.hivePos != null && !this.isTooFarAway(this.hivePos) && this.level().getChunkIfLoadedImmediately(this.hivePos.getX() >> 4, this.hivePos.getZ() >> 4) != null) {
++ return (BeehiveBlockEntity) this.level().getBlockEntity(this.hivePos, BlockEntityType.BEEHIVE).orElse(null);
++ }
++ return null;
++ // Paper end
+ }
+
+ boolean isHiveValid() {