2020-04-22 00:06:30 +02:00
|
|
|
From 170e421a60923a30f605ff7e963da9a2e6a018dd Mon Sep 17 00:00:00 2001
|
2020-04-02 06:43:11 +02:00
|
|
|
From: chickeneer <Paperchickeneer@gmail.com>
|
2020-03-31 09:54:42 +02:00
|
|
|
Date: Tue, 17 Mar 2020 14:18:50 -0500
|
|
|
|
Subject: [PATCH] Do not allow bees to load chunks for beehives
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java
|
2020-04-22 00:06:30 +02:00
|
|
|
index c7d79efd..dd1d246a 100644
|
2020-03-31 09:54:42 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityBee.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityBee.java
|
|
|
|
@@ -315,6 +315,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
|
|
|
if (this.hivePos == null) {
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
+ if (!this.world.isLoadedAndInBounds(hivePos)) return false; // Paper
|
|
|
|
TileEntity tileentity = this.world.getTileEntity(this.hivePos);
|
|
|
|
|
|
|
|
return tileentity instanceof TileEntityBeehive && ((TileEntityBeehive) tileentity).d();
|
|
|
|
@@ -334,6 +335,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
|
|
|
}
|
|
|
|
|
|
|
|
private boolean i(BlockPosition blockposition) {
|
|
|
|
+ if (!this.world.isLoadedAndInBounds(blockposition)) return false; // Paper
|
|
|
|
TileEntity tileentity = this.world.getTileEntity(blockposition);
|
|
|
|
|
|
|
|
return tileentity instanceof TileEntityBeehive ? !((TileEntityBeehive) tileentity).isFull() : false;
|
|
|
|
@@ -593,6 +595,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
|
|
|
@Override
|
|
|
|
public boolean g() {
|
|
|
|
if (EntityBee.this.hasHivePos() && EntityBee.this.eI() && EntityBee.this.hivePos.a((IPosition) EntityBee.this.getPositionVector(), 2.0D)) {
|
|
|
|
+ if (!EntityBee.this.world.isLoadedAndInBounds(EntityBee.this.hivePos)) return false; // Paper
|
|
|
|
TileEntity tileentity = EntityBee.this.world.getTileEntity(EntityBee.this.hivePos);
|
|
|
|
|
|
|
|
if (tileentity instanceof TileEntityBeehive) {
|
|
|
|
@@ -616,6 +619,7 @@ public class EntityBee extends EntityAnimal implements EntityBird {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void c() {
|
|
|
|
+ if (!EntityBee.this.world.isLoadedAndInBounds(EntityBee.this.hivePos)) return; // Paper
|
|
|
|
TileEntity tileentity = EntityBee.this.world.getTileEntity(EntityBee.this.hivePos);
|
|
|
|
|
|
|
|
if (tileentity instanceof TileEntityBeehive) {
|
|
|
|
--
|
2020-04-22 00:06:30 +02:00
|
|
|
2.25.1.windows.1
|
2020-03-31 09:54:42 +02:00
|
|
|
|