2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-04-29 08:14:47 +00:00
|
|
|
From: chickeneer <emcchickeneer@gmail.com>
|
2020-03-31 07:54:42 +00: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-11-03 02:22:15 +00:00
|
|
|
index c14e07f3c3017e5a5355b1770b94ee4dcc8cc017..f73641ddb3e82bc653732105ef0a3d41a28e845f 100644
|
2020-03-31 07:54:42 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityBee.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityBee.java
|
2020-06-25 23:38:24 +00:00
|
|
|
@@ -284,6 +284,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB
|
2020-03-31 07:54:42 +00:00
|
|
|
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();
|
2020-06-25 23:38:24 +00:00
|
|
|
@@ -316,6 +317,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB
|
2020-03-31 07:54:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
2020-06-25 23:38:24 +00:00
|
|
|
@@ -558,6 +560,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB
|
2020-03-31 07:54:42 +00:00
|
|
|
@Override
|
|
|
|
public boolean g() {
|
2020-08-25 02:22:08 +00:00
|
|
|
if (EntityBee.this.hasHivePos() && EntityBee.this.fd() && EntityBee.this.hivePos.a((IPosition) EntityBee.this.getPositionVector(), 2.0D)) {
|
2020-03-31 07:54:42 +00:00
|
|
|
+ if (!EntityBee.this.world.isLoadedAndInBounds(EntityBee.this.hivePos)) return false; // Paper
|
|
|
|
TileEntity tileentity = EntityBee.this.world.getTileEntity(EntityBee.this.hivePos);
|
|
|
|
|
|
|
|
if (tileentity instanceof TileEntityBeehive) {
|
2020-06-25 23:38:24 +00:00
|
|
|
@@ -581,6 +584,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB
|
2020-03-31 07:54:42 +00:00
|
|
|
|
|
|
|
@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) {
|