Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKR93 committed Dec 25, 2024
1 parent 379451f commit 0c58a0b
Show file tree
Hide file tree
Showing 55 changed files with 49 additions and 53 deletions.
File renamed without changes.
31 changes: 0 additions & 31 deletions patches/server/0011-Always-agree-EULA-on-development-mode.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ index 24763d3d270c29c95e0b3e85111145234f660a62..80ddc627e02e3c749e6b074afa93d357
}

diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 05e760162ebbf3475129001b4e9de951e0e142d4..363ef48b096281132cea61aff405a50d7b51c4d4 100644
index fc378b08c10c7f670be93d52937c7642b986ed0d..9a436132faa04efbf25d8be9d5488e13f2111dac 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -166,7 +166,7 @@ public class Main {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: AlphaKR93 <[email protected]>
Date: Mon, 6 May 2024 12:25:59 +0900
Subject: [PATCH] Use Akair's flag when running the test server with gradle


diff --git a/build.gradle.kts b/build.gradle.kts
index a40dc8b2560b8cd124d961f3dfd5865efd2a3b9e..e4dfd79840913e776a84bacda776329cb32e2be9 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -164,7 +164,7 @@ fun TaskContainer.registerRunTask(
languageVersion.set(JavaLanguageVersion.of(21))
vendor.set(JvmVendorSpec.JETBRAINS)
})
- jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods")
+ jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods", "--add-modules=jdk.incubator.vector", "-XX:+UseG1GC", "-XX:+ParallelRefProcEnabled", "-XX:MaxGCPauseMillis=200", "-XX:+UnlockExperimentalVMOptions", "-XX:+DisableExplicitGC", "-XX:+AlwaysPreTouch", "-XX:G1HeapWastePercent=5", "-XX:G1MixedGCCountTarget=4", "-XX:InitiatingHeapOccupancyPercent=15", "-XX:G1MixedGCLiveThresholdPercent=90", "-XX:G1RSetUpdatingPauseTimePercent=5", "-XX:SurvivorRatio=32", "-XX:+PerfDisableSharedMem", "-XX:MaxTenuringThreshold=1", "-Dusing.aikars.flags=https://mcflags.emc.gs", "-Daikars.new.flags=true", "-XX:G1NewSizePercent=40", "-XX:G1MaxNewSizePercent=50", "-XX:G1HeapRegionSize=16M", "-XX:G1ReservePercent=15") // Plazma - Always agree EULA on development mode; Use Akair's flag when running the test server with gradle

if (rootProject.childProjects["test-plugin"] != null) {
val testPluginJar = rootProject.project(":test-plugin").tasks.jar.flatMap { it.archiveFile }

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,33 @@ index d5d09bf63f4b7fba73188f75d5fe9599b8da2844..8ab6df63d9a22ac76b2ba14bc8fef318
this.server = server;
this.registries = registryManager;
this.maxPlayers = maxPlayers;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 15527e902484496a6804c879d1de589bed3f8713..b2f924d0236683dc0a994350efe9a9db54b2ab98 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -276,12 +276,12 @@ public final class CraftServer implements Server {
private final ServicesManager servicesManager = new SimpleServicesManager();
private final CraftScheduler scheduler = new CraftScheduler();
private final CraftCommandMap commandMap; // Paper - Move down
- private final SimpleHelpMap helpMap = new SimpleHelpMap(this);
+ private final SimpleHelpMap helpMap;
private final StandardMessenger messenger = new StandardMessenger();
private final SimplePluginManager pluginManager; // Paper - Move down
public final io.papermc.paper.plugin.manager.PaperPluginManagerImpl paperPluginManager; // Paper
private final StructureManager structureManager;
- protected final DedicatedServer console;
+ public final DedicatedServer console; // Plazma - AT (protected -> public)
protected final DedicatedPlayerList playerList;
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
// private final Map<Class<?>, Registry<?>> registries = new HashMap<>(); // Paper - replace with RegistryAccess
@@ -421,6 +421,7 @@ public final class CraftServer implements Server {

Bukkit.setServer(this);
// Paper start
+ this.helpMap = new SimpleHelpMap(this); // Plazma - Add options to modify the configuration files
this.commandMap = new CraftCommandMap(this);
this.pluginManager = new SimplePluginManager(this, commandMap);
this.paperPluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(this, this.commandMap, pluginManager);
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index a75f3328ba32466b6ceeddb0069c856524f19c0a..913213c77fa2cf8038768a34b38bb59d698e714b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
Expand Down Expand Up @@ -222,15 +249,15 @@ index a75f3328ba32466b6ceeddb0069c856524f19c0a..913213c77fa2cf8038768a34b38bb59d
};

diff --git a/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java b/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java
index 5923d3c17756c489fcb392044c0679fe52e2d58f..a433d691831c620112a1c824f8f26cb50cfa8dbd 100644
index 5923d3c17756c489fcb392044c0679fe52e2d58f..3ec5cf874dfd9d2e016daa9f7c7aee2646e67861 100644
--- a/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java
+++ b/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java
@@ -25,7 +25,7 @@ public class HelpYamlReader {
public HelpYamlReader(Server server) {
this.server = server;

- File helpYamlFile = new File("help.yml");
+ File helpYamlFile = (File) ((org.bukkit.craftbukkit.CraftServer) server).getHandle().getServer().options.valueOf("help"); // Plazma - Add options to modify the configuration files
+ File helpYamlFile = (File) ((org.bukkit.craftbukkit.CraftServer) server).console.options.valueOf("help"); // Plazma - Add options to modify the configuration files
YamlConfiguration defaultConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("configurations/help.yml"), Charsets.UTF_8));

try {
File renamed without changes.

0 comments on commit 0c58a0b

Please sign in to comment.