Skip to content

Commit

Permalink
work
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKR93 committed Dec 14, 2024
1 parent 22bcf63 commit 0e7b7a9
Show file tree
Hide file tree
Showing 45 changed files with 925 additions and 1,122 deletions.
9 changes: 2 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,8 @@ paperweight {
remapRepo = "https://repo.papermc.io/repository/maven-public/"
decompileRepo = "https://repo.papermc.io/repository/maven-public/"

useStandardUpstream("paper") {
url = github("PaperMC", "Paper-archive")
ref = providers.gradleProperty("paperCommit")

withStandardPatcher {
baseName("Paper")

usePaperUpstream(providers.gradleProperty("paperCommit")) {
withPaperPatcher {
apiPatchDir.set(projectDir.resolve("patches/api"))
apiOutputDir.set(projectDir.resolve("$brandName-API"))

Expand Down
14 changes: 7 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ brandName = Plazma
providerName = PlazmaMC
providerRepo = PlazmaMC/PlazmaBukkit

version = 1.21.3-R0.1-SNAPSHOT
mcVersion = 1.21.3
version = 1.21.4-R0.1-SNAPSHOT
mcVersion = 1.21.4
jdkVersion = 21

paperRepo = https://github.com/PaperMC/Paper-archive
paperBranch = ver/1.21.3
paperRepo = https://github.com/PaperMC/Paper
paperBranch = master
purpurRepo = https://github.com/PurpurMC/Purpur
purpurBranch = ver/1.21.3
purpurBranch = ver/1.21.4
pufferfishRepo = https://github.com/pufferfish-gg/Pufferfish
pufferfishBranch = ver/1.21
usePufferfish = false

paperCommit = da7138233f6392e791d790d1c3407414c855f9c2
purpurCommit = 16ce24aa7eb08232030e4570e027f7baefa5f3f9
paperCommit = b746d9df0b6b7765478b2a72c2d963b6e668fa35
purpurCommit = 4a204f1bd7cde4bd1a99673bf46f2373d3bcb7e5
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
shadow = "8.3.5"
remapper = "0.10.3"
paperclip = "3.0.3"
paperweight = "1.7.4"
paperweight = "1.7.7"
decompiler = "1.10.1"

[libraries]
Expand Down
2 changes: 1 addition & 1 deletion libs/api.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bungeechat = "1.20-R0.2-deprecated+build.19"
joml = "1.10.8"
json-simple = "1.1.1"

fastutil = "8.5.6"
fastutil = "8.5.15"
# adventure
# log4j
slf4j-api = "2.0.9"
Expand Down
2 changes: 1 addition & 1 deletion libs/common.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
adventure = "4.17.0"
log4j = "2.19.0"
log4j = "2.24.1"
asm = "9.7.1"

mvn = "3.9.6"
Expand Down
7 changes: 6 additions & 1 deletion libs/server.versions.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[versions]
concurrentutil = "0.0.2"

jline = "3.27.1"
tca = "1.3.0"
# adventure
Expand All @@ -7,7 +9,7 @@ netty = "4.1.97.Final"
# asm
configurate = "4.2.0-SNAPSHOT"
# commons2
sqlite = "3.46.1.3"
sqlite = "3.47.0.0"
mysql = "9.1.0"
disruptor = "3.4.4"
velocity = "3.3.0-SNAPSHOT"
Expand All @@ -31,6 +33,8 @@ spark = "1.10.119-SNAPSHOT"


[libraries]
concurrentutil = { group = "ca.spottedleaf", name = "concurrentutil", version.ref = "concurrentutil" }

jline-ffm = { group = "org.jline", name = "jline-terminal-ffm", version.ref = "jline" }
jline-jni = { group = "org.jline", name = "jline-terminal-jni", version.ref = "jline" }
tca = { group = "net.minecrell", name = "terminalconsoleappender", version.ref="tca" }
Expand Down Expand Up @@ -70,6 +74,7 @@ runtime = [ "sqlite", "mysql", "disruptor" ]
test = [ "classgraph" ]

implementation = [
"concurrentutil",
"jline-ffm",
"jline-jni",
"tca",
Expand Down
16 changes: 8 additions & 8 deletions patches/api/0001-Purpur-API-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: granny <[email protected]>
Date: Fri, 13 Dec 2024 07:03:22 +0900
Date: Sat, 14 Dec 2024 20:26:32 +0900
Subject: [PATCH] Purpur API Changes

PurpurMC
Expand All @@ -25,18 +25,18 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

diff --git a/build.gradle.kts b/build.gradle.kts
index e29e5024fa693baae469d47fe77b57118f14627c..b0fd6c1804844f09428051952e3ac4e58f8c859c 100644
index 571534b42cd9c33d6a7bb6fe3bf3a28e33f8e5de..49546dfbb4dd006b5a2419908890ba4c2a0e207a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -64,6 +64,7 @@ dependencies {
@@ -66,6 +66,7 @@ dependencies {
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("org.slf4j:slf4j-api:$slf4jVersion")
+ api("io.sentry:sentry:5.4.0") // Pufferfish

implementation("org.ow2.asm:asm:9.7.1")
implementation("org.ow2.asm:asm-commons:9.7.1")
@@ -148,6 +149,13 @@ val generateApiVersioningFile by tasks.registering {
@@ -150,6 +151,13 @@ val generateApiVersioningFile by tasks.registering {
}
}

Expand All @@ -50,7 +50,7 @@ index e29e5024fa693baae469d47fe77b57118f14627c..b0fd6c1804844f09428051952e3ac4e5
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
@@ -160,6 +168,8 @@ tasks.jar {
@@ -162,6 +170,8 @@ tasks.jar {
}

tasks.withType<Javadoc> {
Expand Down Expand Up @@ -781,10 +781,10 @@ index 918a045165cdcde264bc24082b7afebb407271de..e98d6321c5f2cdde91b54f8a74cbcc04
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 028ac35df6c4d044d07b3869751736d418c1eb0e..95c1f331f364c5fafa100860f3c9674f18888714 100644
index e89edabd36a6755912694d8a8700da4ebe5c5829..ba2eff0f2ecffbea4b42d5c6e4485ee0087dc981 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -5840,4 +5840,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
@@ -5811,4 +5811,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
return this.asItemType().getDefaultDataTypes();
}
// Paper end - data component API
Expand Down Expand Up @@ -4305,7 +4305,7 @@ index 12946bd55fcf7c40d39081779a7fa30049ee6165..9c2d605c50cbf9aefa56ec209df9f6ce

}
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
index f9e4b16a21d6cc6c9cbbe06d20c8af25e72e3ddb..4028b230e7fe1c78520f227a377a2a61e8381ecc 100644
index 5b0d26c68f6c30fd3a9125e96012a7d162afb402..c92dc62e16aec026f32c5a4739ac041e5c88ed03 100644
--- a/src/test/java/org/bukkit/AnnotationTest.java
+++ b/src/test/java/org/bukkit/AnnotationTest.java
@@ -47,6 +47,10 @@ public class AnnotationTest {
Expand Down
24 changes: 13 additions & 11 deletions patches/api/0002-Use-Gradle-Version-Catalogs.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Use Gradle Version Catalogs


diff --git a/build.gradle.kts b/build.gradle.kts
index b0fd6c1804844f09428051952e3ac4e58f8c859c..2b668f8a5c245d024e03c94b7d8872448f1929cf 100644
index 49546dfbb4dd006b5a2419908890ba4c2a0e207a..6963a76b9040c01dc60d0f24c9eef4738e93f753 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,11 +9,13 @@ java {
Expand All @@ -22,26 +22,28 @@ index b0fd6c1804844f09428051952e3ac4e58f8c859c..2b668f8a5c245d024e03c94b7d887244
val apiAndDocs: Configuration by configurations.creating {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
@@ -39,58 +41,30 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
@@ -39,60 +41,30 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
// Paper end - configure mockito agent that is needed in newer java versions

dependencies {
- api("com.mojang:brigadier:1.2.9") // Paper - Brigadier command api
- // api dependencies are listed transitively to API consumers
- api("com.google.guava:guava:32.1.2-jre")
- api("com.google.code.gson:gson:2.10.1")
- api("com.google.guava:guava:33.3.1-jre")
- api("com.google.code.gson:gson:2.11.0")
- // Paper start - adventure
- api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.18") {
- api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.19") {
- exclude("com.google.guava", "guava")
- }
- // Paper - adventure
- api("org.yaml:snakeyaml:2.2")
- api("org.joml:joml:1.10.5")
- api("org.joml:joml:1.10.8") {
- isTransitive = false // https://github.com/JOML-CI/JOML/issues/352
- }
- // Paper start
- api("com.googlecode.json-simple:json-simple:1.1.1") {
- isTransitive = false // includes junit
- }
- api("it.unimi.dsi:fastutil:8.5.6")
- api("it.unimi.dsi:fastutil:8.5.15")
- apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
- apiAndDocs("net.kyori:adventure-api")
- apiAndDocs("net.kyori:adventure-text-minimessage")
Expand Down Expand Up @@ -105,17 +107,17 @@ index b0fd6c1804844f09428051952e3ac4e58f8c859c..2b668f8a5c245d024e03c94b7d887244
}

// Paper start
@@ -175,27 +149,25 @@ tasks.withType<Javadoc> {
@@ -177,27 +149,25 @@ tasks.withType<Javadoc> {
options.use()
options.isDocFilesSubDirs = true
options.links(
- "https://guava.dev/releases/32.1.2-jre/api/docs/",
- "https://guava.dev/releases/33.3.1-jre/api/docs/",
- "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/",
- "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations
- // "https://javadoc.io/doc/net.md-5/bungeecord-chat/$bungeeCordChatVersion/", // Paper - don't link to bungee chat
- // Paper start - add missing javadoc links
- "https://javadoc.io/doc/org.joml/joml/1.10.5/index.html",
- "https://www.javadoc.io/doc/com.google.code.gson/gson/2.10.1",
- "https://javadoc.io/doc/org.joml/joml/1.10.8/index.html",
- "https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
- "https://jspecify.dev/docs/api/",
- // Paper end
- // Paper start
Expand Down
4 changes: 2 additions & 2 deletions patches/api/0005-Various-API-Tweaks.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Various API Tweaks


diff --git a/src/main/java/com/destroystokyo/paper/MaterialTags.java b/src/main/java/com/destroystokyo/paper/MaterialTags.java
index 41eaa8159f8c028faa118300e95f6a0fb9cfe989..76a5381a959ae4e153dba291a362f3d58aeceac9 100644
index 679f78e07a3a2de745fa237165d0a8db5e086f29..ac24a288fda957546e2832f375bd1c958db8852b 100644
--- a/src/main/java/com/destroystokyo/paper/MaterialTags.java
+++ b/src/main/java/com/destroystokyo/paper/MaterialTags.java
@@ -584,6 +584,15 @@ public class MaterialTags {
@@ -591,6 +591,15 @@ public class MaterialTags {
.add(material -> material.name().startsWith("DEEPSLATE_") && material.name().endsWith("_ORE"))
.ensureSize("DEEPSLATE_ORES", 8).lock();

Expand Down
6 changes: 3 additions & 3 deletions patches/api/0007-Reduce-allocations.patch
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ index 521f035409ee61a9ad73d39bec938f2938892570..6e53135579426cb677bf34a0813db826
}
}
diff --git a/src/main/java/org/bukkit/block/Biome.java b/src/main/java/org/bukkit/block/Biome.java
index 464f8f81ba907a61588e4ab869e4f8269830195a..6d50664e76e6e7ed98ca7b311fdb368886ab65a8 100644
index 20fc2b30fdcdedb012dfe129e746d0b9e162fc36..ca97debfd1a204d15bf5f6c176612cccc2596537 100644
--- a/src/main/java/org/bukkit/block/Biome.java
+++ b/src/main/java/org/bukkit/block/Biome.java
@@ -23,6 +23,7 @@ import org.jetbrains.annotations.NotNull;
@@ -21,6 +21,7 @@ import org.jetbrains.annotations.NotNull;
* which can be accessed via {@link Registry#BIOME}.
*/
public interface Biome extends OldEnum<Biome>, Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations
+ Biome[] EMPTY_ARRAY = new Biome[0]; // Plazma - Reduce allocations

Biome OCEAN = getBiome("ocean");
Biome PLAINS = getBiome("plains");
@@ -129,7 +130,7 @@ public interface Biome extends OldEnum<Biome>, Keyed, net.kyori.adventure.transl
@@ -125,7 +126,7 @@ public interface Biome extends OldEnum<Biome>, Keyed, net.kyori.adventure.transl
@NotNull
@Deprecated(since = "1.21.3", forRemoval = true) @org.jetbrains.annotations.ApiStatus.ScheduledForRemoval(inVersion = "1.22") // Paper - will be removed via asm-utils
static Biome[] values() {
Expand Down
Loading

0 comments on commit 0e7b7a9

Please sign in to comment.