mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-02-16 20:32:32 +01:00
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: 0514fc4e2 Add missing effects 8f5d9effd Add getMainThreadExecutor to BukkitScheduler 313b5020b Allow adding items to BlockDropItemEvent (#5093) 9a556d9da [CI-SKIP] [Auto] Rebuild Patches 72b2768ad Inline shift fields in EnumDirection (#5082) ffff53fa7 added option to disable pathfinding updates on block changes (#5123) b67081fd7 add DragonEggFormEvent (fixes #5110) (#5112) 3eefafbaf Fix javadoc build 0081ed1c4 Add javadoc step to GH Actions 01082503e Add dropLeash variable to EntityUnleashEvent (#5130) 31f9f869a [CI-SKIP] Fix YourKit links in readme, fixes #5091 8ac27aa38 [Auto] Updated Upstream (CraftBukkit) c4d9cc831 [Auto] Updated Upstream (Bukkit/CraftBukkit) d0477d326 [Auto] Updated Upstream (CraftBukkit) d9f5f7018 EntityMoveEvent (#4614) Purpur Changes: e581a73 Updated Upstream (Paper) AirplaneLite Changes: 10c5810 Updated Upstream (Tuinity) Origami Changes: 45d89cc Update Paper 578ef16 Automatically disable online-mode if bungeecord is enabled de51baa Update Paper 5986aef Import Purpur patch to not send useless entity packets
32 lines
1.6 KiB
Diff
32 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ivan Pekov <ivan@mrivanplays.com>
|
|
Date: Thu, 10 Sep 2020 21:02:26 +0300
|
|
Subject: [PATCH] Fix LightEngineThreaded memory leak
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/LightEngineThreaded.java b/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
|
index 3c4c3e43b5b947f7332f2dd6d1f1dae4be7708ab..be4193a1c1f4d7bb62d42b786f33f636863a3dfb 100644
|
|
--- a/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
|
+++ b/src/main/java/net/minecraft/server/LightEngineThreaded.java
|
|
@@ -110,6 +110,8 @@ public class LightEngineThreaded extends LightEngine implements AutoCloseable {
|
|
}
|
|
}
|
|
|
|
+ public final void remove(long chunkId) { pendingTasks.removeIf(task -> task.chunkId == chunkId); queueUpdate(); } // Yatopia
|
|
+
|
|
public final boolean isEmpty() {
|
|
return this.size == 0 && this.pendingTasks.isEmpty();
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
|
index af9a28daeaddfa0ba3104bbb01a2b6f29a97c06d..a9669bf5b52580c745f747e69c0c6aae273a6bca 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
|
@@ -1792,6 +1792,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
|
}
|
|
// Paper end
|
|
|
|
+ chunkProvider.getLightEngine().queue.remove(chunk.getPos().pair()); // Yatopia - unregister from light queue
|
|
}
|
|
|
|
public void unregisterEntity(Entity entity) {
|