Paper/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch
Spottedleaf df984898ac 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.
2019-10-20 10:03:39 +01:00

24 lines
1.1 KiB
Diff

From dd0db11122691ff1924e355426213c49f300506d Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:39:54 -0600
Subject: [PATCH] Change implementation of (tile)entity removal list
use sets for faster removal
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index da049cefe4..76704abda1 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -40,7 +40,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
public final List<TileEntity> tileEntityList = Lists.newArrayList();
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
protected final List<TileEntity> tileEntityListPending = Lists.newArrayList();
- protected final List<TileEntity> tileEntityListUnload = Lists.newArrayList();
+ protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper
private final long b = 16777215L;
final Thread serverThread; // CraftBukkit - package private
private int u;
--
2.22.1