geforkt von Mirrors/Paper
43 Zeilen
2.4 KiB
Diff
43 Zeilen
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: chickeneer <emcchickeneer@gmail.com>
|
|
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/world/entity/animal/EntityBee.java b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java
|
|
index 7ce8eaeb9af3547869f467910b6a458118c63c1f..1d1f71a995a99b2101891a7a5bda7bec5d67f118 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java
|
|
@@ -358,6 +358,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB
|
|
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();
|
|
@@ -390,6 +391,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB
|
|
}
|
|
|
|
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;
|
|
@@ -632,6 +634,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB
|
|
@Override
|
|
public boolean g() {
|
|
if (EntityBee.this.hasHivePos() && EntityBee.this.fd() && 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) {
|
|
@@ -655,6 +658,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB
|
|
|
|
@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) {
|