aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0050-Change-implementation-of-tile-entity-removal-list.patch
blob: 2862e90353673fc858ec2d103137b505e35551ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From 0000000000000000000000000000000000000000 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 a2574722e0893d63a4d4878febd02b0184c60ac7..b44240960f4416356b1e9cd1994d676c48ee71d1 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -37,7 +37,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
     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();
     public final Thread serverThread;
     private final boolean debugWorld;
     private int d;