mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-26 18:39:23 +00:00
Cleanup PWT (#533)
* Unify comment format * More configurable * Remove one extra execute mid-tick task call in level tick when PWT is disabled This may cause extremely rare, weird, strange, magic, mysterious issues with plugins, or potentially more. One example is that it may cause boss mob duplication issue when `ONE MOB ONLY` was enabled in plugin SupremeBosses
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] Micro optimizations for random tick
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index cd1fdd297601efde282899715903ef9ca542d376..59f6fe6fbac2da1ae2485cb7a50ca59f9389cb43 100644
|
||||
index ecd36d743bb9a0d9794eaac67692804c00f1bb67..209d18228aa28b063f8f3e60df6a3e2c5aa770fc 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1042,7 +1042,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1052,7 +1052,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
// Paper start - optimise random ticking
|
||||
private void optimiseRandomTick(final LevelChunk chunk, final int tickSpeed) {
|
||||
final LevelChunkSection[] sections = chunk.getSections();
|
||||
@@ -17,7 +17,7 @@ index cd1fdd297601efde282899715903ef9ca542d376..59f6fe6fbac2da1ae2485cb7a50ca59f
|
||||
final net.minecraft.world.level.levelgen.BitRandomSource simpleRandom = this.simpleRandom; // Leaf - Faster random generator - upcasting
|
||||
final boolean doubleTickFluids = !ca.spottedleaf.moonrise.common.PlatformHooks.get().configFixMC224294();
|
||||
|
||||
@@ -1051,41 +1051,41 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1061,41 +1061,41 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
final int offsetZ = cpos.z << 4;
|
||||
|
||||
for (int sectionIndex = 0, sectionsLen = sections.length; sectionIndex < sectionsLen; sectionIndex++) {
|
||||
|
||||
Reference in New Issue
Block a user