mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
835bc39b03
Updated Upstream (Bukkit/CraftBukkit/Spigot) Bukkit Changes: 2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields e0fc6572 SPIGOT-4309: Add "forced" display of particles efeeab2f Add index to README.md for easier navigation f502bc6f Update to Minecraft 1.13.1 CraftBukkit Changes:d0bb0a1d
Fix some tests randomly failing997d378d
Fix client stall in specific teleportation scenariosb3dc2366
SPIGOT-4307: Fix hacky API for banners on shields2a271162
SPIGOT-4301: Fix more invalid enchants5d0d83bb
SPIGOT-4309: Add "forced" display of particlesa6772578
Add additional tests for CraftBlockDatace1af0c3
Update to Minecraft 1.13.1 Spigot Changes: 2440e189 Rebuild patches 4ecffced Update to Minecraft 1.13.1
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From 5d6a52b580d179bcd59043c97967d4e500819a61 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Thu, 16 Aug 2018 17:36:41 -0400
|
|
Subject: [PATCH] Ensure chunks are always loaded on hard position sets
|
|
|
|
Player Movement, Entity Creation and Teleportation move
|
|
entities with a very "You are here, no debate" change, making
|
|
the server register them as there, regardless if that chunk was
|
|
loaded or not.
|
|
|
|
It appears possible that with hack clients and lag, a player
|
|
may be able to move fast enough to move into an unloaded
|
|
chunk and get into a buggy state.
|
|
|
|
To prevent this, we will ensure a chunk is always loaded,
|
|
guaranteeing that the entity will be properly registered
|
|
into its new home comfortably.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
|
index 7b07fe1990..de34a70e9b 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -1364,6 +1364,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
this.lastYaw -= 360.0F;
|
|
}
|
|
|
|
+ world.getChunkAt((int) Math.floor(this.locX) >> 4, (int) Math.floor(this.locZ) >> 4); // Paper - ensure chunk is always loaded
|
|
this.setPosition(this.locX, this.locY, this.locZ);
|
|
this.setYawPitch(f, f1);
|
|
}
|
|
--
|
|
2.18.0
|
|
|