Skip to content

Commit

Permalink
Update to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
lynxplay committed Jul 24, 2024
1 parent ea71957 commit a939d44
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 35 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repositories {
}

dependencies {
remapper("net.fabricmc:tiny-remapper:0.10.2:fat") // Must be kept in sync with upstream
remapper("net.fabricmc:tiny-remapper:0.10.3:fat") // Must be kept in sync with upstream
decompiler("org.vineflower:vineflower:1.10.1") // Must be kept in sync with upstream
paperclip("io.papermc:paperclip:3.0.3") // You probably want this to be kept in sync with upstream
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
group=com.example.paperfork
version=1.20.6-R0.1-SNAPSHOT
version=1.21-R0.1-SNAPSHOT

mcVersion=1.20.6
mcVersion=1.21

org.gradle.caching=true
org.gradle.parallel=true
Expand Down
77 changes: 46 additions & 31 deletions patches/server/0001-Build-changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Build changes


diff --git a/build.gradle.kts b/build.gradle.kts
index 87bb3fd9b97506f61734ae7f2e6860610ba794e7..7e2017f8fceeadc39f82c1559f3b78bf43e055d0 100644
index 421f6b3dc8890d63d2e7aa774d0bf8f7e15890ab..2e616a1bb34aebfa3999370ec3e5d7b0d61d6cef 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -12,7 +12,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
@@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
val alsoShade: Configuration by configurations.creating

dependencies {
Expand All @@ -17,16 +17,27 @@ index 87bb3fd9b97506f61734ae7f2e6860610ba794e7..7e2017f8fceeadc39f82c1559f3b78bf
// Paper start
implementation("org.jline:jline-terminal-jansi:3.21.0")
implementation("net.minecrell:terminalconsoleappender:1.3.0")
@@ -78,7 +78,7 @@ tasks.jar {
@@ -84,14 +84,14 @@ tasks.jar {
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
"Implementation-Title" to "CraftBukkit",
- "Implementation-Version" to "git-Paper-$implementationVersion",
+ "Implementation-Version" to "git-ForkTest-$implementationVersion", // ForkTest
- "Implementation-Title" to "Paper",
+ "Implementation-Title" to "ForkTest", // ForkTest - rename
"Implementation-Version" to implementationVersion,
"Implementation-Vendor" to date, // Paper
"Specification-Title" to "Bukkit",
- "Specification-Title" to "Paper",
+ "Specification-Title" to "ForkTest", // ForkTest - rename
"Specification-Version" to project.version,
@@ -137,7 +137,7 @@ fun TaskContainer.registerRunTask(
- "Specification-Vendor" to "Paper Team",
- "Brand-Id" to "papermc:paper",
- "Brand-Name" to "Paper",
+ "Specification-Vendor" to "ForkTest Team", // ForkTest - rename
+ "Brand-Id" to "forktestmc:forktest", // ForkTest - rename
+ "Brand-Name" to "ForkTest", // ForkTest - rename
"Build-Number" to (build ?: ""),
"Build-Time" to Instant.now().toString(),
"Git-Branch" to gitBranch, // Paper
@@ -148,7 +148,7 @@ fun TaskContainer.registerRunTask(
name: String,
block: JavaExec.() -> Unit
): TaskProvider<JavaExec> = register<JavaExec>(name) {
Expand All @@ -35,32 +46,36 @@ index 87bb3fd9b97506f61734ae7f2e6860610ba794e7..7e2017f8fceeadc39f82c1559f3b78bf
mainClass.set("org.bukkit.craftbukkit.Main")
standardInput = System.`in`
workingDir = rootProject.layout.projectDirectory
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 39303bb4e336732db0ab19dee0c1f8b609bbb134..55d308d092b2c7c0d02e46f0cb255aec59d28049 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1926,7 +1926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
index 790bad0494454ca12ee152e3de6da3da634d9b20..9d87cb3068124367cb2b8b5adad7a889ab5fd76c 100644
--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
+++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
@@ -31,6 +31,7 @@ public record ServerBuildInfoImpl(
private static final String ATTRIBUTE_GIT_COMMIT = "Git-Commit";

@DontObfuscate
public String getServerModName() {
- return "Paper"; // Paper
+ return "ForkTest"; // ForkTest - ForkTest > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
}
private static final String BRAND_PAPER_NAME = "Paper";
+ private static final String BRAND_FORKTEST_NAME = "ForkTest"; // ForkTest - rename

private static final String BUILD_DEV = "DEV";

public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index da1aed63af837b193900bb85393611edbd56c363..6acf6e1acbcc21444d015bdd49901d078736498b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -269,7 +269,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper
@@ -44,7 +45,7 @@ public record ServerBuildInfoImpl(
.map(Key::key)
.orElse(BRAND_PAPER_ID),
getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME)
- .orElse(BRAND_PAPER_NAME),
+ .orElse(BRAND_FORKTEST_NAME), // ForkTest - rename
SharedConstants.getCurrentVersion().getId(),
SharedConstants.getCurrentVersion().getName(),
getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER)
@@ -61,7 +62,7 @@ public record ServerBuildInfoImpl(

@Override
public boolean isBrandCompatible(final @NotNull Key brandId) {
- return brandId.equals(this.brandId);
+ return brandId.equals(this.brandId) || brandId.equals(BRAND_PAPER_ID); // ForkTest - rename - forktest supports both paper and forktest plugins.
}

public final class CraftServer implements Server {
- private final String serverName = "Paper"; // Paper
+ private final String serverName = "ForkTest"; // ForkTest // Paper
private final String serverVersion;
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 774556a62eb240da42e84db4502e2ed43495be17..21f39bd0c33ef2635249298e6a247afba8b05742 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
Expand Down
2 changes: 1 addition & 1 deletion work/Paper
Submodule Paper updated 2608 files

0 comments on commit a939d44

Please sign in to comment.