Paper/Spigot-Server-Patches/0051-Change-implementation-of-tile-entity-removal-list.patch

21 lines
1.2 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2019-04-26 03:24:00 +02:00
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/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java
index 26d9388badb0328735abf0319a42bd633c90dc4b..33469b719d679c65d4bcb8366008e6e107eb3a0b 100644
--- a/src/main/java/net/minecraft/world/level/World.java
+++ b/src/main/java/net/minecraft/world/level/World.java
@@ -89,7 +89,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
2019-04-26 03:24:00 +02:00
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();
2019-12-11 01:56:03 +01:00
+ protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet();
public final Thread serverThread;
2020-06-25 11:27:25 +02:00
private final boolean debugWorld;
private int d;