mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
57dd397155
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: b999860d SPIGOT-2304: Add LootGenerateEvent CraftBukkit Changes:77fd87e4
SPIGOT-2304: Implement LootGenerateEventa1a705ee
SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent41712edd
SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
46 lines
2.3 KiB
Diff
46 lines
2.3 KiB
Diff
From 69d5b79f2d4fb9d153dba0484afc7f4325688594 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/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java
|
|
index c7d79efdf6..dd1d246aeb 100644
|
|
--- 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) {
|
|
--
|
|
2.26.2
|
|
|