diff options
Diffstat (limited to 'patches/server/0980-Reset-mainSupportingBlockPos-on-some-teleport-calls.patch')
-rw-r--r-- | patches/server/0980-Reset-mainSupportingBlockPos-on-some-teleport-calls.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/patches/server/0980-Reset-mainSupportingBlockPos-on-some-teleport-calls.patch b/patches/server/0980-Reset-mainSupportingBlockPos-on-some-teleport-calls.patch index e2d9cd36cb..c5fcfdf0ed 100644 --- a/patches/server/0980-Reset-mainSupportingBlockPos-on-some-teleport-calls.patch +++ b/patches/server/0980-Reset-mainSupportingBlockPos-on-some-teleport-calls.patch @@ -22,6 +22,19 @@ index b777547cb9f8edf4e7b3c2cfb894f8cd1b1a35a5..5330840a44e1a4eb39554ac7d59f355d } public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper +diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java +index 3ffb92a82e17af467afb18c81accc482a93d6a6f..305b43071aa1cf8feee75fae757bb7734ae33771 100644 +--- a/src/main/java/net/minecraft/world/entity/Entity.java ++++ b/src/main/java/net/minecraft/world/entity/Entity.java +@@ -1369,7 +1369,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { + } + + protected BlockPos getOnPos(float offset) { +- if (this.mainSupportingBlockPos.isPresent()) { ++ if (this.mainSupportingBlockPos.isPresent() && this.level().getChunkIfLoadedImmediately(this.mainSupportingBlockPos.get()) != null) { // Paper - ensure no loads + BlockPos blockposition = (BlockPos) this.mainSupportingBlockPos.get(); + + if (offset <= 1.0E-5F) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 5b201d2c21f04e0223970035e0631f8f92ea0d3a..318a57f34d304fe00670eb207968138c1fe9d1fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java |