Skip to content

Commit

Permalink
Updated Upstream (Luminol)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Luminol Changes:
LuminolMC/Luminol@58d45e3 Fix java CP
LuminolMC/Luminol@2e52016 Correct wrong name "SMID" to SIMD
LuminolMC/Luminol@d0d9ce0 Correct java version checks in SIMD optimization
LuminolMC/Luminol@14de6bf Correct wrong name "SMID" to SIMD
  • Loading branch information
404Setup committed Aug 6, 2024
1 parent fb1f6be commit 1a3cccb
Show file tree
Hide file tree
Showing 25 changed files with 7 additions and 166 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
group = one.tranic.bukkit
version = 1.21-R0.1-SNAPSHOT

luminolCommit = 892dfcd2a00a9034bb0f9cc4f7017afe8edf9c2a
luminolCommit = 14de6bf8c791512d426905ea5ea42a9abb924724

org.gradle.caching = true
org.gradle.parallel = true
Expand Down
115 changes: 0 additions & 115 deletions patches/api/0001-Pufferfish-Add-SIMD-utilities.patch

This file was deleted.

File renamed without changes.
6 changes: 3 additions & 3 deletions patches/server/0001-Fix-build.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Fix-build
and add kotlin support

diff --git a/build.gradle.kts b/build.gradle.kts
index c2d3d699edfd60d773af96116c5663c812c691e9..524404ce77a6f48f35bd618b020db6bb9ad0587d 100644
index 1049681dfa7e48b4b6c29f4b1a09c689ac918500..fdaac794f89cb18fc63105082aa53047f777a14d 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,6 +4,9 @@ import java.time.Instant
Expand Down Expand Up @@ -43,7 +43,7 @@ index c2d3d699edfd60d773af96116c5663c812c691e9..524404ce77a6f48f35bd618b020db6bb
}

paperweight {
@@ -89,14 +100,14 @@ tasks.jar {
@@ -97,14 +108,14 @@ tasks.jar {
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
Expand All @@ -63,7 +63,7 @@ index c2d3d699edfd60d773af96116c5663c812c691e9..524404ce77a6f48f35bd618b020db6bb
"Build-Number" to (build ?: ""),
"Build-Time" to Instant.now().toString(),
"Git-Branch" to gitBranch, // Paper
@@ -109,6 +120,17 @@ tasks.jar {
@@ -117,6 +128,17 @@ tasks.jar {
}
}

Expand Down
24 changes: 2 additions & 22 deletions patches/server/0003-LevelBukkit-Config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,12 @@ index 0000000000000000000000000000000000000000..5ca0b7470839835e526e9681b2396a70
\ No newline at end of file
diff --git a/src/main/kotlin/one/tranic/bukkit/config/LevelBukkitConfig.kt b/src/main/kotlin/one/tranic/bukkit/config/LevelBukkitConfig.kt
new file mode 100644
index 0000000000000000000000000000000000000000..40568ec05743462686878e63abe039ee864b7a85
index 0000000000000000000000000000000000000000..9aa435caf682705e79c6dbe17aa26e187e01e2a2
--- /dev/null
+++ b/src/main/kotlin/one/tranic/bukkit/config/LevelBukkitConfig.kt
@@ -0,0 +1,265 @@
@@ -0,0 +1,245 @@
+package one.tranic.bukkit.config
+
+import gg.pufferfish.pufferfish.simd.SIMDDetection
+import net.minecraft.server.MinecraftServer
+import one.tranic.bukkit.commands.ConfigCommand
+import org.bukkit.Bukkit
Expand All @@ -115,25 +114,6 @@ index 0000000000000000000000000000000000000000..40568ec05743462686878e63abe039ee
+ fun load() {
+ reload()
+ reload()
+ // Pufferfish start
+ // Attempt to detect vectorization
+ runCatching {
+ SIMDDetection.isEnabled = SIMDDetection.canEnable(logger)
+ SIMDDetection.versionLimited = SIMDDetection.getJavaVersion() < 17
+ }.getOrElse {
+ it.printStackTrace()
+ }
+
+ if (SIMDDetection.isEnabled) {
+ logger.info("SIMD operations detected as functional. Will replace some operations with faster versions.")
+ } else if (SIMDDetection.versionLimited) {
+ logger.warn("Will not enable SIMD! These optimizations are only safely supported on Java 17+.")
+ } else {
+ logger.warn("SIMD operations are available for your server, but are not configured!")
+ logger.warn("To enable additional optimizations, add \"--add-modules=jdk.incubator.vector\" to your startup flags, BEFORE the \"-jar\".")
+ logger.warn("If you have already added this flag, then SIMD operations are not supported on your JVM or CPU.")
+ logger.warn("Debug: Java: " + System.getProperty("java.version") + ", test run: " + SIMDDetection.testRun)
+ }
+ }
+
+ private fun addDefault(configFile: File) {
Expand Down
24 changes: 0 additions & 24 deletions patches/server/0013-Pufferfish-Add-SIMD-utilities.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ try fix: https://github.com/PaperMC/Folia/issues/217
This fix may work, but its implementation is not elegant, so it will not be submitted upstream

diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index 65582bd070b1a5a963abca1e91ff05bf177942c0..fd7535d602eec49ba3234e87e25ca4dbaf409537 100644
index 77ff2a526a1d2b9307dfc696f9862bfda7407475..4b05325efbb5473543e078ad9bca85dc7379c95a 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -1,7 +1,6 @@
Expand Down

0 comments on commit 1a3cccb

Please sign in to comment.