mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
[ci skip] cleanup
This commit is contained in:
@@ -43,7 +43,7 @@ You can find the latest successful build in [GitHub Action](https://github.com/W
|
||||
**Please note Java >= 21 is required.**
|
||||
|
||||
## 📄 Documentation
|
||||
Documentation on how to use/configure Leaf: [leafmc.one/docs/](https://www.leafmc.one/docs/)
|
||||
Documentation on how to use/configure Leaf: [www.leafmc.one/docs](https://www.leafmc.one/docs)
|
||||
|
||||
## 📦 Building
|
||||
Building a Paperclip JAR for distribution:
|
||||
|
||||
@@ -1776,7 +1776,7 @@ index 002d3c0d8b1107a275020d5c582c37e9a5c536ee..6fa0b8defbd1d06b3bf5d9b32ffd08f3
|
||||
// Gale start - Petal - reduce line of sight cache lookups - merge sets
|
||||
int cached = this.seen.get(id);
|
||||
diff --git a/net/minecraft/world/entity/animal/Fox.java b/net/minecraft/world/entity/animal/Fox.java
|
||||
index 90452f0945e761077608692877677f522d38bccd..5c0f0ae7bb1aa379487816b115e43140dd27aadc 100644
|
||||
index 90452f0945e761077608692877677f522d38bccd..54044ff16e0c2963b2220e4fb4932fe0802aa178 100644
|
||||
--- a/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -849,13 +849,18 @@ public class Fox extends Animal implements VariantHolder<Fox.Variant> {
|
||||
@@ -1795,7 +1795,7 @@ index 90452f0945e761077608692877677f522d38bccd..5c0f0ae7bb1aa379487816b115e43140
|
||||
this.trustedLastHurtBy = livingEntity.getLastHurtByMob();
|
||||
int lastHurtByMobTimestamp = livingEntity.getLastHurtByMobTimestamp();
|
||||
- return lastHurtByMobTimestamp != this.timestamp && this.canAttack(this.trustedLastHurtBy, this.targetConditions);
|
||||
+ return lastHurtByMobTimestamp != this.timestamp && this.canAttack(this.trustedLastHurtBy, this.getTargetConditions()); // Leaf - Async target finding - diff on change
|
||||
+ return lastHurtByMobTimestamp != this.timestamp && this.canAttack(this.trustedLastHurtBy, this.getTargetConditions()); // Leaf - Async target finding
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1987,18 +1987,18 @@ index ae4ee948971e931e4fdc4ec2187f5182195c626c..f4fa19c6352e44a624e81dc201b1d7d7
|
||||
|
||||
static class StriderPathNavigation extends GroundPathNavigation {
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index ac7729d1caa80155697bfe0e8646e4eda5d1780e..ae765e97b4dbd2a932de32c95fc1d8355841b04c 100644
|
||||
index ac7729d1caa80155697bfe0e8646e4eda5d1780e..2518ea7a9d2122ff55ab6546d21d7ed6cc933090 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -1548,6 +1548,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
this.moonrise$midTickTasks();
|
||||
@@ -1549,6 +1549,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
}
|
||||
// Leaf end - SparklyPaper - parallel world ticking (only run mid-tick at the end of each tick / fixes concurrency bugs related to executeMidTickTasks) - do not bother with condition work / make configurable
|
||||
+ ((ServerLevel) this).leafMidTickTasks(); // Leaf - Async target finding
|
||||
// Paper end - rewrite chunk system
|
||||
+ ((ServerLevel) this).leafMidTickTasks(); // Leaf - Async target finding
|
||||
}
|
||||
}
|
||||
@@ -1817,9 +1818,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
this.blockEntityTickers.removeMarkedEntries(); // SparklyPaper - optimize block entity removals
|
||||
@@ -1817,9 +1818,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities(@Nullable Entity entity, AABB boundingBox, Predicate<? super Entity> predicate) {
|
||||
@@ -2008,7 +2008,6 @@ index ac7729d1caa80155697bfe0e8646e4eda5d1780e..ae765e97b4dbd2a932de32c95fc1d835
|
||||
+ // Leaf start - Async target finding
|
||||
+ // if (org.dreeam.leaf.config.modules.async.SparklyPaperParallelWorldTicking.enabled) // Leaf start - SparklyPaper - parallel world ticking mod (make configurable)
|
||||
+ // ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread((ServerLevel)this, boundingBox, "Cannot getEntities asynchronously"); // SparklyPaper - parallel world ticking (additional concurrency issues logs)
|
||||
+
|
||||
+ // List<Entity> list = Lists.newArrayList(); // Leaf - Async target finding - unused
|
||||
+ // Leaf end - Async target finding
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package org.dreeam.leaf.util.map;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.*;
|
||||
import it.unimi.dsi.fastutil.longs.LongCollection;
|
||||
import it.unimi.dsi.fastutil.longs.LongIterator;
|
||||
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -147,7 +147,7 @@ public class LinearRegionFile implements IRegionFile {
|
||||
|
||||
private synchronized void save() throws IOException {
|
||||
if (MinecraftServer.getServer().hasStopped()) {
|
||||
// Crazy - save only once on shutdown
|
||||
// Save only once on shutdown
|
||||
if (!closed) return;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,6 @@ public class LinearRegionFile implements IRegionFile {
|
||||
LOGGER.error("Chunk write IOException {} {}", e, this.path);
|
||||
}
|
||||
|
||||
// Crazy: bruh
|
||||
if (TimeUnit.NANOSECONDS.toSeconds(System.nanoTime() - this.lastFlushed) >= (RegionFormatConfig.linearFlushFrequency)) {
|
||||
this.flushWrapper();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user