9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-30 12:29:13 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0190-Avoid-useless-deque-clear-on-LevelTicks-cleanupAfter.patch
hayanesuru 23b7b02eee optimize chunk map (#438)
* rebase

* optimize LivingEntity#travel

* cleanup

* Replace fluid height map

* reuse array list in Entity#collide

* cleanup

* fix fire and liquid collision shape

* fix checkInside

* inline betweenClosed

* cleanup

* optimize getOnPos

* optimize equals in getOnPos

* update mainSupportingBlockPos on dirty

* cleanup

* rename

* merge same patch

* rebase and remove properly

* [ci skip] cleanup

* rebase and rebuild

* fix async locator

* remove async locator

* cleanup

* rebase

---------

Co-authored-by: Taiyou06 <kaandindar21@gmail.com>
2025-08-19 20:48:26 +02:00

20 lines
987 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MachineBreaker <saltspigotpp@gmail.com>
Date: Wed, 16 Oct 2024 03:39:24 -0400
Subject: [PATCH] Avoid useless deque clear on LevelTicks#cleanupAfterTick
diff --git a/net/minecraft/world/ticks/LevelTicks.java b/net/minecraft/world/ticks/LevelTicks.java
index 9dc03a8fff08111b6a68aa94d658f1e965ef0d25..0f3848bf82f35fa3988267c7bfa18e1b34d97b66 100644
--- a/net/minecraft/world/ticks/LevelTicks.java
+++ b/net/minecraft/world/ticks/LevelTicks.java
@@ -182,7 +182,7 @@ public class LevelTicks<T> implements LevelTickAccess<T> {
}
private void cleanupAfterTick() {
- this.toRunThisTick.clear();
+ //this.toRunThisTick.clear(); // Leaf - Avoid useless deque clear on LevelTicks#cleanupAfterTick - This method runs after toRunThisTick is polled so this is always empty
this.containersToTick.clear();
this.alreadyRunThisTick.clear();
this.toRunThisTickSet.clear();