Skip to content

Commit

Permalink
[ci skip] Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Feb 14, 2024
1 parent 0873107 commit 9db4ca9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
17 changes: 3 additions & 14 deletions patches/server/0091-Async-Pathfinding.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,10 @@ This patch was ported downstream from the Petal fork.
Makes most pathfinding-related work happen asynchronously

diff --git a/src/main/java/dev/etil/mirai/MiraiConfig.java b/src/main/java/dev/etil/mirai/MiraiConfig.java
index be6d2fd0890119a4f6a6c97379fa5f48a066a6f7..eb675d42362292712c306548a3c84ece4694cb15 100644
index be6d2fd0890119a4f6a6c97379fa5f48a066a6f7..398fa24099544db743cb0776757e07e41f22f87b 100644
--- a/src/main/java/dev/etil/mirai/MiraiConfig.java
+++ b/src/main/java/dev/etil/mirai/MiraiConfig.java
@@ -5,8 +5,10 @@ import java.io.IOException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.List;
+import java.util.logging.Level;

import net.minecraft.server.MinecraftServer;
+import org.bukkit.Bukkit;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.MemoryConfiguration;
import org.jetbrains.annotations.Nullable;
@@ -260,4 +262,21 @@ public class MiraiConfig {
@@ -260,4 +260,21 @@ public class MiraiConfig {
"Whether or not zombies from spawners should be able to",
"pick up items on the ground.");
}
Expand All @@ -47,7 +36,7 @@ index be6d2fd0890119a4f6a6c97379fa5f48a066a6f7..eb675d42362292712c306548a3c84ece
+ if (!asyncPathfinding)
+ asyncPathfindingMaxThreads = 0;
+ else
+ Bukkit.getLogger().log(Level.INFO, "Using " + asyncPathfindingMaxThreads + " threads for Async Pathfinding");
+ MinecraftServer.LOGGER.info("Using {} threads for Async Pathfinding", asyncPathfindingMaxThreads);
+ }
}
diff --git a/src/main/java/dev/etil/mirai/path/AsyncPath.java b/src/main/java/dev/etil/mirai/path/AsyncPath.java
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0092-Multithreaded-Tracker.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ Some things are too unsafe to run off the main thread so we don't attempt to do
that. This multithreaded tracker remains accurate, non-breaking and fast.

diff --git a/src/main/java/dev/etil/mirai/MiraiConfig.java b/src/main/java/dev/etil/mirai/MiraiConfig.java
index eb675d42362292712c306548a3c84ece4694cb15..741b6af45cee2b63162f419ba93458a1591b2b35 100644
index 398fa24099544db743cb0776757e07e41f22f87b..1cdab691bef60250fb4f3ff35d270caa99e3af6b 100644
--- a/src/main/java/dev/etil/mirai/MiraiConfig.java
+++ b/src/main/java/dev/etil/mirai/MiraiConfig.java
@@ -279,4 +279,16 @@ public class MiraiConfig {
@@ -277,4 +277,16 @@ public class MiraiConfig {
else
Bukkit.getLogger().log(Level.INFO, "Using " + asyncPathfindingMaxThreads + " threads for Async Pathfinding");
MinecraftServer.LOGGER.info("Using {} threads for Async Pathfinding", asyncPathfindingMaxThreads);
}
+
+ public static boolean enableAsyncEntityTracker;
Expand Down
5 changes: 2 additions & 3 deletions patches/server/0093-Sync-event-calls-on-async-threads.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ Subject: [PATCH] Sync event calls on async threads


diff --git a/src/main/java/dev/etil/mirai/MiraiConfig.java b/src/main/java/dev/etil/mirai/MiraiConfig.java
index 741b6af45cee2b63162f419ba93458a1591b2b35..26d0c9fee5e01a2bfc89e5857e37b4804cf490cd 100644
index 1cdab691bef60250fb4f3ff35d270caa99e3af6b..5d1dc477e1ac07a1fefdc182bbb9ee0c2dde828f 100644
--- a/src/main/java/dev/etil/mirai/MiraiConfig.java
+++ b/src/main/java/dev/etil/mirai/MiraiConfig.java
@@ -291,4 +291,17 @@ public class MiraiConfig {
@@ -289,4 +289,16 @@ public class MiraiConfig {
enableAsyncEntityTracker = temp;
}
}
+
+ public static boolean enableSyncEventCallsOnAsyncThreads;
+ public static boolean enableSyncEventCallsOnAsyncThreadsInitialized;
+
+ private static void syncEventCallsOnAsyncThreads() {
+ boolean temp = getBoolean("enable-sync-event-calls-on-async-threads", true,
+ "Whether or not sync event calls on async threads should be enabled. (If async entity tracker is enabled, this is enabled.)",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Thu, 28 Dec 2023 04:00:37 -0500
Subject: [PATCH] Mirai: Add Higher Java Versions Support for SIMD
Subject: [PATCH] Add Higher Java Versions Support for SIMD


diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
index d8e4ac55c6f72e9f92b683d18b5538088996378d..99ec26c76109818891e0a07021ce2113948eca93 100644
index 14e98404514971162ac93e13415b0011c6800a01..5ed739e83786595616b221c4a10c25f06e62d726 100644
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
@@ -94,7 +94,7 @@ public class PufferfishConfig {
Expand Down

0 comments on commit 9db4ca9

Please sign in to comment.