aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0392-Prevent-bees-loading-chunks-checking-hive-position.patch
blob: 224000580dbd52730fdff4bf5518e4a4c681f46e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
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/EntityBee.java b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java
index 1554f1d1d35084c283b573b3e58e48c6747fe7d6..1ecf73f874f404f58a99316ae027f76db6b557db 100644
--- a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java
@@ -442,6 +442,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB
         if (!this.hasHivePos()) {
             return false;
         } else {
+            if (world.getChunkIfLoadedImmediately(hivePos.getX() >> 4, hivePos.getZ() >> 4) == null) return true; // Paper - just assume the hive is still there, no need to load the chunk(s)
             TileEntity tileentity = this.world.getTileEntity(this.hivePos);
 
             return tileentity != null && tileentity.getTileType() == TileEntityTypes.BEEHIVE;