Fix server deadlock when loading some chunks (#2647)
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 CraftBukkit Changes: 7554e08e Add UUID support to CraftProfileBanList 3fe37460 SPIGOT-5378: Fix TileEntity fixer deadlock 12386dd4 SPIGOT-5375: Add spaces to coordinates from tile fixer 606c19e2 SPIGOT-5373: Simultaneous left+right click in creative mode does not work 13caf848 SPIGOT-5370: Fix Block#rayTrace considering other blocks.
This commit is contained in:
@@ -7,16 +7,16 @@ ray tracing into an unloaded chunk should be treated as a miss
|
||||
this saves a ton of lag for when AI tries to raytrace near unloaded chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
index 577b227758..c5586e44d4 100644
|
||||
index 0dff023529..29cdc00875 100644
|
||||
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
@@ -0,0 +0,0 @@ public interface IBlockAccess {
|
||||
|
||||
default MovingObjectPositionBlock rayTrace(RayTrace raytrace) {
|
||||
return (MovingObjectPositionBlock) a(raytrace, (raytrace1, blockposition) -> {
|
||||
// CraftBukkit start - moved block handling into separate method for use by Block#rayTrace
|
||||
default MovingObjectPositionBlock rayTraceBlock(RayTrace raytrace1, BlockPosition blockposition) {
|
||||
- IBlockData iblockdata = this.getType(blockposition);
|
||||
+ // Paper start - Prevent raytrace from loading chunks
|
||||
+ IBlockData iblockdata = ((World)this).getTypeIfLoaded(blockposition);
|
||||
+ IBlockData iblockdata = this.getTypeIfLoaded(blockposition);
|
||||
+ if (iblockdata == null) {
|
||||
+ // copied the last function parameter (listed below)
|
||||
+ Vec3D vec3d = raytrace1.b().d(raytrace1.a());
|
||||
|
||||
Reference in New Issue
Block a user