3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00

Improve entity.getCurrentChunk() and use it for entity.isChunkLoaded()

Dieser Commit ist enthalten in:
Aikar 2020-04-02 00:43:11 -04:00
Ursprung 52cf890602
Commit 017297cdba
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
16 geänderte Dateien mit 95 neuen und 95 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From dae2dd0f30fa7917420fe3ee0d590b1ce1efc551 Mon Sep 17 00:00:00 2001 From 883a5600646deb5a98c33313a92d02625f07d30c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 4 Jul 2018 02:10:36 -0400 Date: Wed, 4 Jul 2018 02:10:36 -0400
Subject: [PATCH] Store reference to current Chunk for Entity and Block Subject: [PATCH] Store reference to current Chunk for Entity and Block
@ -89,7 +89,7 @@ index af10c18d44..02b142fe8b 100644
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 7899fd6d88..d2cfc65513 100644 index 7899fd6d88..2890e8121d 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -134,7 +134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -134,7 +134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -101,7 +101,16 @@ index 7899fd6d88..d2cfc65513 100644
public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER
public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER
@@ -1708,6 +1708,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -178,7 +178,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public boolean isChunkLoaded() {
- return world.isChunkLoaded((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4);
+ return getCurrentChunk() != null;
}
// CraftBukkit end
@@ -1708,6 +1708,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
// Paper start // Paper start
@ -115,23 +124,27 @@ index 7899fd6d88..d2cfc65513 100644
+ */ + */
+ public Chunk getCurrentChunk() { + public Chunk getCurrentChunk() {
+ final Chunk chunk = currentChunk != null ? currentChunk.get() : null; + final Chunk chunk = currentChunk != null ? currentChunk.get() : null;
+ return chunk != null && chunk.isLoaded() ? chunk : (isAddedToChunk() ? world.getChunkIfLoaded(getChunkX(), getChunkZ()) : null); + if (chunk != null && chunk.isLoaded()) {
+ return chunk;
+ }
+
+ return !isAddedToChunk() ? null : ((ChunkProviderServer) world.chunkProvider).getChunkAtIfLoadedMainThreadNoCache(getChunkX(), getChunkZ());
+ } + }
+
+ /** + /**
+ * Returns the chunk at the location, using the entities local cache if avail + * Returns the chunk at the location, using the entities local cache if avail
+ * Will only return null if the location specified is not loaded + * Will only return null if the location specified is not loaded
+ */ + */
+ public Chunk getCurrentChunkAt(int x, int z) { + public Chunk getCurrentChunkAt(int x, int z) {
+ if (getChunkX() == x && getChunkZ() == z) { + Chunk chunk = getCurrentChunk();
+ Chunk chunk = getCurrentChunk(); + if (chunk != null && getChunkX() == chunk.getPos().x && getChunkZ() == chunk.getPos().z) {
+ if (chunk != null) { + return chunk;
+ return chunk;
+ }
+ } + }
+ return world.getChunkIfLoaded(x, z); + return ((ChunkProviderServer) world.chunkProvider).getChunkAtIfLoadedMainThreadNoCache(getChunkX(), getChunkZ());
+ } + }
+ /** + /**
+ * Returns the chunk at the entities current location, using the entities local cache if avail + * Returns the chunk at the entities current location, using the entities local cache if avail
+ * Ideally this is always the same as getCurrentChunk, but only becomes different in registration issues.
+ * Will only return null if the location specified is not loaded + * Will only return null if the location specified is not loaded
+ */ + */
+ public Chunk getChunkAtLocation() { + public Chunk getChunkAtLocation() {
@ -187,5 +200,5 @@ index 63ecbcd47a..c82c213260 100644
/** /**
* Order is *EXTREMELY* important -- keep it right! =D * Order is *EXTREMELY* important -- keep it right! =D
-- --
2.25.0 2.25.1

Datei anzeigen

@ -1,4 +1,4 @@
From 29bf2090d4841235a60c315f94a35c3fe2172998 Mon Sep 17 00:00:00 2001 From 0b5aede220e3c3085be9adb8ea747714ea5bbbcd Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 14:14:15 -0600 Date: Tue, 1 Mar 2016 14:14:15 -0600
Subject: [PATCH] Drop falling block and tnt entities at the specified height Subject: [PATCH] Drop falling block and tnt entities at the specified height
@ -24,10 +24,10 @@ index 8ee2b9bb1b..d59b82b7bb 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b109f5ae2c..b8792bb6f1 100644 index 957330b673..7d4badd974 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1814,6 +1814,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1818,6 +1818,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.a(itemstack, 0.0F); return this.a(itemstack, 0.0F);
} }
@ -86,5 +86,5 @@ index 1094190fd9..35dbed40df 100644
Validate.isTrue(newValue >= 0, "Value must be greater than or equal to 0"); Validate.isTrue(newValue >= 0, "Value must be greater than or equal to 0");
Validate.isTrue(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter"); Validate.isTrue(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter");
-- --
2.25.0 2.25.1

Datei anzeigen

@ -1,11 +1,11 @@
From eb19fb35a1fda6531c127beafb36cb5098174202 Mon Sep 17 00:00:00 2001 From 3e658fa51f422bcca75d0aef058fc6c3e96899a3 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Tue, 1 Mar 2016 23:45:08 -0600 Date: Tue, 1 Mar 2016 23:45:08 -0600
Subject: [PATCH] Entity Origin API Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b8792bb6f1..1b2edca722 100644 index 7d4badd974..18236504e4 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -167,6 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -167,6 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -42,7 +42,7 @@ index b8792bb6f1..1b2edca722 100644
} catch (Throwable throwable) { } catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
@@ -1771,6 +1784,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1775,6 +1788,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
protected abstract void b(NBTTagCompound nbttagcompound); protected abstract void b(NBTTagCompound nbttagcompound);
@ -134,5 +134,5 @@ index c82c213260..a296936748 100644
+ // Paper end + // Paper end
} }
-- --
2.25.2 2.25.1

Datei anzeigen

@ -1,4 +1,4 @@
From 686cdb916272e2534b102708935d7e1e4133b89d Mon Sep 17 00:00:00 2001 From b113387904be5b1c2908e34c86851c78f00d5caa Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io> From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:46:17 -0600 Date: Thu, 3 Mar 2016 02:46:17 -0600
Subject: [PATCH] Add configurable portal search radius Subject: [PATCH] Add configurable portal search radius
@ -21,10 +21,10 @@ index 62e793b71b..cd47a4ca06 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 251087ec20..514315604e 100644 index 826202f437..fd708f2f6c 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2574,7 +2574,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2578,7 +2578,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
blockposition = new BlockPosition(d0, this.locY(), d1); blockposition = new BlockPosition(d0, this.locY(), d1);
// CraftBukkit start // CraftBukkit start
@ -71,5 +71,5 @@ index 19c54f1dde..f84dd6d9be 100644
return villageplacetype == VillagePlaceType.u; return villageplacetype == VillagePlaceType.u;
}, blockposition, searchRadius, VillagePlace.Occupancy.ANY).collect(Collectors.toList()); // CraftBukkit - searchRadius }, blockposition, searchRadius, VillagePlace.Occupancy.ANY).collect(Collectors.toList()); // CraftBukkit - searchRadius
-- --
2.25.0 2.25.1

Datei anzeigen

@ -1,4 +1,4 @@
From 6d41fcca29dcbe9747892fe9fe63f149cf38a238 Mon Sep 17 00:00:00 2001 From 5a208c0c6591b2176760aede2ac3c3a22b0f1276 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 8 Mar 2016 23:25:45 -0500 Date: Tue, 8 Mar 2016 23:25:45 -0500
Subject: [PATCH] Disable Scoreboards for non players by default Subject: [PATCH] Disable Scoreboards for non players by default
@ -25,10 +25,10 @@ index abbf59bb91..04430aae52 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 514315604e..d95d9c7203 100644 index fd708f2f6c..46c227b7f0 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2265,6 +2265,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2269,6 +2269,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@Nullable @Nullable
public ScoreboardTeamBase getScoreboardTeam() { public ScoreboardTeamBase getScoreboardTeam() {
@ -49,5 +49,5 @@ index 9bd6737007..cd9c49747d 100644
if (!flag) { if (!flag) {
-- --
2.25.0 2.25.1

Datei anzeigen

@ -1,4 +1,4 @@
From 857bcd25e8fefef7ed6d333e6150bdaa47c6b2e9 Mon Sep 17 00:00:00 2001 From 93f7f9414406e2d8224158f030941cf06e413433 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 22 May 2016 20:20:55 -0500 Date: Sun, 22 May 2016 20:20:55 -0500
Subject: [PATCH] Optional TNT doesn't move in water Subject: [PATCH] Optional TNT doesn't move in water
@ -32,10 +32,10 @@ index 6db1312035..8cf3076f4e 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index fffb3c0bba..5bbd2c98a5 100644 index 4fd0e54de7..7e552f985a 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2713,6 +2713,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2717,6 +2717,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
public boolean bM() { public boolean bM() {
@ -107,5 +107,5 @@ index a13fd9b340..3ff7a7b4a8 100644
private java.util.Map<EntityPlayer, Boolean> trackedPlayerMap = null; private java.util.Map<EntityPlayer, Boolean> trackedPlayerMap = null;
-- --
2.25.0 2.25.1

Datei anzeigen

@ -1,14 +1,14 @@
From 47db2f72df0c321d5a3fba2afb32d74739421a1e Mon Sep 17 00:00:00 2001 From 7b05afa5b801b6e5a69ac0017d8c829f3e2c27ae Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com> From: Alfie Cleveland <alfeh@me.com>
Date: Sun, 8 Jan 2017 04:31:36 +0000 Date: Sun, 8 Jan 2017 04:31:36 +0000
Subject: [PATCH] Don't allow entities to ride themselves - #572 Subject: [PATCH] Don't allow entities to ride themselves - #572
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index cfa7bc59f2..59cf0d1017 100644 index 2ab877c87b..1c8958d15d 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2025,6 +2025,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2029,6 +2029,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
protected boolean addPassenger(Entity entity) { // CraftBukkit protected boolean addPassenger(Entity entity) { // CraftBukkit
@ -17,5 +17,5 @@ index cfa7bc59f2..59cf0d1017 100644
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)"); throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
} else { } else {
-- --
2.25.0 2.25.1

Datei anzeigen

@ -1,4 +1,4 @@
From 82dec6a475fc31b39a9a1934131e02c1dde08dfa Mon Sep 17 00:00:00 2001 From 57d3e523f39ce4e5e2481c56340dcb707c4b23fe Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:13:28 -0400 Date: Thu, 19 Jul 2018 01:13:28 -0400
Subject: [PATCH] add more information to Entity.toString() Subject: [PATCH] add more information to Entity.toString()
@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 64dc37c70..ec59ffc2e 100644 index 1de1a10cf0..dce1e2af62 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2499,7 +2499,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2503,7 +2503,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
public String toString() { public String toString() {

Datei anzeigen

@ -1,4 +1,4 @@
From 0926eb667c99b565347b26b71f797d2b2eadeadc Mon Sep 17 00:00:00 2001 From 622f34981a35d0d5b89d14afd0289cc6e50ecb00 Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv> From: Phoenix616 <mail@moep.tv>
Date: Tue, 21 Aug 2018 01:39:35 +0100 Date: Tue, 21 Aug 2018 01:39:35 +0100
Subject: [PATCH] Improve death events Subject: [PATCH] Improve death events
@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
internal code. internal code.
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
index 6daa400d2..38fe29f8a 100644 index 6daa400d27..38fe29f8a2 100644
--- a/src/main/java/net/minecraft/server/CombatTracker.java --- a/src/main/java/net/minecraft/server/CombatTracker.java
+++ b/src/main/java/net/minecraft/server/CombatTracker.java +++ b/src/main/java/net/minecraft/server/CombatTracker.java
@@ -175,6 +175,7 @@ public class CombatTracker { @@ -175,6 +175,7 @@ public class CombatTracker {
@ -27,7 +27,7 @@ index 6daa400d2..38fe29f8a 100644
int i = this.f ? 300 : 100; int i = this.f ? 300 : 100;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 02aa493f1..e8b70a5ca 100644 index f54fc61aa5..fd78f647eb 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1503,6 +1503,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1503,6 +1503,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -38,7 +38,7 @@ index 02aa493f1..e8b70a5ca 100644
public void a(Entity entity, int i, DamageSource damagesource) { public void a(Entity entity, int i, DamageSource damagesource) {
if (entity instanceof EntityPlayer) { if (entity instanceof EntityPlayer) {
CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource);
@@ -2413,6 +2414,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2417,6 +2418,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.fallDistance = 0.0F; this.fallDistance = 0.0F;
} }
@ -47,7 +47,7 @@ index 02aa493f1..e8b70a5ca 100644
protected void k(double d0, double d1, double d2) { protected void k(double d0, double d1, double d2) {
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 42b9a339e..8ad131e4f 100644 index 42b9a339e9..8ad131e4fc 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java --- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -701,7 +701,8 @@ public class EntityArmorStand extends EntityLiving { @@ -701,7 +701,8 @@ public class EntityArmorStand extends EntityLiving {
@ -61,7 +61,7 @@ index 42b9a339e..8ad131e4f 100644
} }
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
index 2be6c7bde..82a32d5db 100644 index 2be6c7bde9..82a32d5dbf 100644
--- a/src/main/java/net/minecraft/server/EntityFox.java --- a/src/main/java/net/minecraft/server/EntityFox.java
+++ b/src/main/java/net/minecraft/server/EntityFox.java +++ b/src/main/java/net/minecraft/server/EntityFox.java
@@ -571,15 +571,25 @@ public class EntityFox extends EntityAnimal { @@ -571,15 +571,25 @@ public class EntityFox extends EntityAnimal {
@ -94,7 +94,7 @@ index 2be6c7bde..82a32d5db 100644
public static boolean a(EntityFox entityfox, EntityLiving entityliving) { public static boolean a(EntityFox entityfox, EntityLiving entityliving) {
diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
index 80717ad9a..53aac5bcc 100644 index 80717ad9ac..53aac5bccd 100644
--- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java --- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java +++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
@@ -55,11 +55,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract { @@ -55,11 +55,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract {
@ -119,7 +119,7 @@ index 80717ad9a..53aac5bcc 100644
public void b(NBTTagCompound nbttagcompound) { public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound); super.b(nbttagcompound);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index fa097e055..eed3e7c58 100644 index fa097e0551..eed3e7c58e 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -89,7 +89,7 @@ public abstract class EntityLiving extends Entity { @@ -89,7 +89,7 @@ public abstract class EntityLiving extends Entity {
@ -279,7 +279,7 @@ index fa097e055..eed3e7c58 100644
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index f849dba21..4b40ffa97 100644 index f849dba215..4b40ffa978 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -76,6 +76,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -76,6 +76,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -330,7 +330,7 @@ index f849dba21..4b40ffa97 100644
} }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
index 90fdf89c8..b761a41dc 100644 index 90fdf89c81..b761a41dcd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java --- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
@@ -821,6 +821,22 @@ public enum CraftSound { @@ -821,6 +821,22 @@ public enum CraftSound {
@ -357,7 +357,7 @@ index 90fdf89c8..b761a41dc 100644
this.minecraftKey = minecraftKey; this.minecraftKey = minecraftKey;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d584c76ec..878287cf0 100644 index d584c76ecd..878287cf0d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1733,7 +1733,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1733,7 +1733,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -378,7 +378,7 @@ index d584c76ec..878287cf0 100644
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) { public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index f006b441a..39ce40bd5 100644 index f006b441ad..39ce40bd58 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -749,9 +749,16 @@ public class CraftEventFactory { @@ -749,9 +749,16 @@ public class CraftEventFactory {

Datei anzeigen

@ -1,14 +1,14 @@
From 7b22e6668240d850db0689d1e7f525260f776d80 Mon Sep 17 00:00:00 2001 From 814b9be864728d180bfab9b681c5695eeb1c9dd8 Mon Sep 17 00:00:00 2001
From: GreenMeanie <GreenMeanieMC@gmail.com> From: GreenMeanie <GreenMeanieMC@gmail.com>
Date: Sat, 20 Oct 2018 22:34:02 -0400 Date: Sat, 20 Oct 2018 22:34:02 -0400
Subject: [PATCH] Reset players airTicks on respawn Subject: [PATCH] Reset players airTicks on respawn
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 9a2338060..ecd038762 100644 index 1e3e541c8b..641492c7ca 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2326,6 +2326,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2330,6 +2330,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
@ -17,7 +17,7 @@ index 9a2338060..ecd038762 100644
return 300; return 300;
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index bf21fb69a..e91938b54 100644 index bf21fb69a5..e91938b54c 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1867,6 +1867,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1867,6 +1867,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

Datei anzeigen

@ -1,4 +1,4 @@
From 663b60042f1326b9b598dc64ba18123066086c8a Mon Sep 17 00:00:00 2001 From 1bef7be72cadbd264426f8d9da06bbe630741efb Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 15 Nov 2018 13:38:37 +0000 Date: Thu, 15 Nov 2018 13:38:37 +0000
Subject: [PATCH] force entity dismount during teleportation Subject: [PATCH] force entity dismount during teleportation
@ -20,10 +20,10 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome! Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ecd038762..f900c1a2a 100644 index 641492c7ca..ffeee60a86 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2027,12 +2027,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2031,12 +2031,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
@ -41,7 +41,7 @@ index ecd038762..f900c1a2a 100644
} }
} }
@@ -2083,7 +2086,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2087,7 +2090,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return true; // CraftBukkit return true; // CraftBukkit
} }
@ -53,7 +53,7 @@ index ecd038762..f900c1a2a 100644
if (entity.getVehicle() == this) { if (entity.getVehicle() == this) {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else { } else {
@@ -2093,7 +2099,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2097,7 +2103,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
VehicleExitEvent event = new VehicleExitEvent( VehicleExitEvent event = new VehicleExitEvent(
(Vehicle) getBukkitEntity(), (Vehicle) getBukkitEntity(),
@ -62,7 +62,7 @@ index ecd038762..f900c1a2a 100644
); );
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle(); CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle();
@@ -2104,7 +2110,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2108,7 +2114,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
// CraftBukkit end // CraftBukkit end
// Spigot start // Spigot start
@ -72,7 +72,7 @@ index ecd038762..f900c1a2a 100644
if (event.isCancelled()) { if (event.isCancelled()) {
return false; return false;
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 308ac18f7..584166f22 100644 index 308ac18f7e..584166f225 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -968,9 +968,11 @@ public abstract class EntityHuman extends EntityLiving { @@ -968,9 +968,11 @@ public abstract class EntityHuman extends EntityLiving {
@ -91,7 +91,7 @@ index 308ac18f7..584166f22 100644
} }
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index eed3e7c58..4e64a80a8 100644 index eed3e7c58e..4e64a80a8a 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2735,11 +2735,13 @@ public abstract class EntityLiving extends Entity { @@ -2735,11 +2735,13 @@ public abstract class EntityLiving extends Entity {
@ -112,7 +112,7 @@ index eed3e7c58..4e64a80a8 100644
this.a(entity); this.a(entity);
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index e91938b54..35ea47601 100644 index e91938b54c..35ea476014 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1021,11 +1021,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1021,11 +1021,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {

Datei anzeigen

@ -1,11 +1,11 @@
From 2b4e9b58255aad87d79212eda12aa1087efcf570 Mon Sep 17 00:00:00 2001 From 939338ec61ac52ca1724350d9cc7b59a1b3cbd84 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 22 Sep 2018 00:33:08 -0500 Date: Sat, 22 Sep 2018 00:33:08 -0500
Subject: [PATCH] Add LivingEntity#getTargetEntity Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java
index 4f60b931a..c950139c0 100644 index 4f60b931a1..c950139c0f 100644
--- a/src/main/java/net/minecraft/server/AxisAlignedBB.java --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java
+++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java
@@ -108,6 +108,7 @@ public class AxisAlignedBB { @@ -108,6 +108,7 @@ public class AxisAlignedBB {
@ -46,7 +46,7 @@ index 4f60b931a..c950139c0 100644
double[] adouble = new double[]{1.0D}; double[] adouble = new double[]{1.0D};
double d0 = vec3d1.x - vec3d.x; double d0 = vec3d1.x - vec3d.x;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index f900c1a2a..5b7cdd66e 100644 index ffeee60a86..69bc9dae0d 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1475,6 +1475,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1475,6 +1475,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -57,7 +57,7 @@ index f900c1a2a..5b7cdd66e 100644
public final Vec3D j(float f) { public final Vec3D j(float f) {
if (f == 1.0F) { if (f == 1.0F) {
return new Vec3D(this.locX(), this.getHeadY(), this.locZ()); return new Vec3D(this.locX(), this.getHeadY(), this.locZ());
@@ -2126,6 +2127,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2130,6 +2131,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return this.getPassengers().size() < 1; return this.getPassengers().size() < 1;
} }
@ -66,7 +66,7 @@ index f900c1a2a..5b7cdd66e 100644
return 0.0F; return 0.0F;
} }
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 4e64a80a8..af79b6e37 100644 index 4e64a80a8a..af79b6e378 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3307,6 +3307,37 @@ public abstract class EntityLiving extends Entity { @@ -3307,6 +3307,37 @@ public abstract class EntityLiving extends Entity {
@ -108,7 +108,7 @@ index 4e64a80a8..af79b6e37 100644
public int getShieldBlockingDelay() { public int getShieldBlockingDelay() {
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
index c1f462d9d..498f38109 100644 index c1f462d9d3..498f381099 100644
--- a/src/main/java/net/minecraft/server/IEntitySelector.java --- a/src/main/java/net/minecraft/server/IEntitySelector.java
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java +++ b/src/main/java/net/minecraft/server/IEntitySelector.java
@@ -18,6 +18,7 @@ public final class IEntitySelector { @@ -18,6 +18,7 @@ public final class IEntitySelector {
@ -120,7 +120,7 @@ index c1f462d9d..498f38109 100644
return !entity.isSpectator(); return !entity.isSpectator();
}; };
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index d197094f5..6de01e4f0 100644 index d197094f54..6de01e4f0e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -216,6 +216,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -216,6 +216,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

Datei anzeigen

@ -1,4 +1,4 @@
From 5c5e8a509be83b9cfa96f7bf7c17729a34ae2093 Mon Sep 17 00:00:00 2001 From eb61a8fb753ca85c13d9082018a8581b00bcbc2f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 14:27:34 -0400 Date: Sat, 21 Jul 2018 14:27:34 -0400
Subject: [PATCH] Duplicate UUID Resolve Option Subject: [PATCH] Duplicate UUID Resolve Option
@ -93,10 +93,10 @@ index c464d69623..3882e5b2a6 100644
int k = MathHelper.floor(entity.locY() / 16.0D); int k = MathHelper.floor(entity.locY() / 16.0D);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b45afbcde2..4021bb5b88 100644 index 1a20f105b5..d522d7238d 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2743,6 +2743,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2747,6 +2747,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}); });
} }

Datei anzeigen

@ -1,4 +1,4 @@
From e853c9a81e2edbb4750c52f7121b71fa7d1d1862 Mon Sep 17 00:00:00 2001 From 29199995fd17dcc6ce4757218ccbf95ad9f0478d Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com> From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 8 Jul 2019 00:13:36 -0700 Date: Mon, 8 Jul 2019 00:13:36 -0700
Subject: [PATCH] Use getChunkIfLoadedImmediately in places Subject: [PATCH] Use getChunkIfLoadedImmediately in places
@ -7,21 +7,8 @@ This prevents us from hitting chunk loads for chunks at or less-than
ticket level 33 (yes getChunkIfLoaded will actually perform a chunk ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
load in that case). load in that case).
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 4021bb5b8..2c8603e2f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -203,7 +203,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public boolean isChunkLoaded() {
- return world.isChunkLoaded((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4);
+ return world.getChunkIfLoadedImmediately((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4) != null; // Paper
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 691331217..f88bcb29d 100644 index 691331217b..f88bcb29db 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -989,7 +989,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -989,7 +989,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -34,7 +21,7 @@ index 691331217..f88bcb29d 100644
return; return;
} }
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 75829b4de..61829b3bf 100644 index 75829b4de5..61829b3bf9 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -116,8 +116,16 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -116,8 +116,16 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -73,7 +60,7 @@ index 75829b4de..61829b3bf 100644
return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity); return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity);
} }
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index f86404f83..92601c581 100644 index f86404f83a..92601c581c 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java --- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -143,9 +143,10 @@ public class ActivationRange @@ -143,9 +143,10 @@ public class ActivationRange

Datei anzeigen

@ -1,4 +1,4 @@
From 1a7d91f6e4660e9769d17df8db4da4c6652318e0 Mon Sep 17 00:00:00 2001 From 8a8e8f20be1b35c67eba16a82ea42c05c450ac4e Mon Sep 17 00:00:00 2001
From: AJMFactsheets <AJMFactsheets@gmail.com> From: AJMFactsheets <AJMFactsheets@gmail.com>
Date: Wed, 22 Jan 2020 19:52:28 -0600 Date: Wed, 22 Jan 2020 19:52:28 -0600
Subject: [PATCH] Fix items vanishing through end portal Subject: [PATCH] Fix items vanishing through end portal
@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the
heightmap resolves the issue without having to load all spawn chunks. heightmap resolves the issue without having to load all spawn chunks.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e10740a65c..c4e85b86d9 100644 index 2648acb8bf..d8b9dbf24e 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2600,6 +2600,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2604,6 +2604,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
if (blockposition == null) { // CraftBukkit if (blockposition == null) { // CraftBukkit
if (dimensionmanager1.getType() == DimensionManager.THE_END && dimensionmanager == DimensionManager.OVERWORLD) { // CraftBukkit if (dimensionmanager1.getType() == DimensionManager.THE_END && dimensionmanager == DimensionManager.OVERWORLD) { // CraftBukkit

Datei anzeigen

@ -1,5 +1,5 @@
From 880f989fa0cdb7071024ab894fe6964ac5ce5a6a Mon Sep 17 00:00:00 2001 From c7e8b30ec94f125f4b652d386717063c3d99e6bd Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com> From: chickeneer <Paperchickeneer@gmail.com>
Date: Tue, 17 Mar 2020 14:18:50 -0500 Date: Tue, 17 Mar 2020 14:18:50 -0500
Subject: [PATCH] Do not allow bees to load chunks for beehives Subject: [PATCH] Do not allow bees to load chunks for beehives