Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
74f507f4e3
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: e461dcfe #555: Item - add getters/setters for owner/thrower CraftBukkit Changes: 055870c4 #758: Item - add getters/setters for owner/thrower
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/server/EntityBee.java b/src/main/java/net/minecraft/server/EntityBee.java
|
|
index 0f44cbd3ce6e57f9693cd23b10d487e06aa62eeb..b1ff30fb1569ddf59f46240266ce32f0aa96da1a 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityBee.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityBee.java
|
|
@@ -284,6 +284,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();
|
|
@@ -316,6 +317,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;
|
|
@@ -558,6 +560,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) {
|
|
@@ -581,6 +584,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) {
|