Yatopia/patches/server/0019-Optimize-TileEntity-load-unload.patch
Simon Gardling c18ae50aab
Updated Upstream and Sidestream(s) (Paper/Tuinity/Purpur/Airplane/Empirecraft) (#412)
Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
0ea308381 Updated Upstream (Bukkit/CraftBukkit)

Tuinity Changes:
a539774 Fix off-by-one for BasicEntityList
0763cd1 Updated Upstream (Paper)
ad35543 Various optimisations
2006b9b Discord vanity URL

Purpur Changes:
4086888 [ci-skip] Fix formatting issue in previous commit
70ec0e2 Updated Upstream (Paper & Tuinity)
d7d72b3 Remove unused event from api
6ec1ed7 [ci-skip] hmm

Airplane Changes:
7dc1546 Updated Upstream (Tuinity)
04fd4dc Updated Upstream (Tuinity)

Empirecraft Changes:
586aef63 Prevent grindstones from overstacking items
4cf96630 Updated Paper
2021-02-19 14:39:10 -05:00

22 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Wed, 5 Aug 2020 08:08:44 -0500
Subject: [PATCH] Optimize TileEntity load/unload
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 4ffaf36b40b32be25bd1944d8b8ddbc342256947..64195edf7c277d581be4d726675b09bd4a263793 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -42,8 +42,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
public static final ResourceKey<World> THE_END = ResourceKey.a(IRegistry.L, new MinecraftKey("the_end"));
private static final EnumDirection[] a = EnumDirection.values();
//public final List<TileEntity> tileEntityList = Lists.newArrayList(); // Paper - remove unused list
- public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
- protected final List<TileEntity> tileEntityListPending = Lists.newArrayList();
+ public final List<TileEntity> tileEntityListTick = me.jellysquid.mods.lithium.common.util.collections.HashedList.wrapper(Lists.newArrayList()); // Yatopia
+ protected final List<TileEntity> tileEntityListPending = me.jellysquid.mods.lithium.common.util.collections.HashedList.wrapper(Lists.newArrayList()); // Yatopia
protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet();
public final Thread serverThread;
private final boolean debugWorld;