Skip to content

Commit

Permalink
Updated upstream (Plazma)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaKR93 committed May 9, 2024
1 parent 96ad2c6 commit 4058dfd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ plazmaRef = dev/1.20.6
jdkVersion = 21

# Volt - Use ./gradlew updateUpstream to update this value
plazmaCommit = 930ef33a619ef46c73689708eb0a327fc1d2f006
plazmaCommit = 4a3d274bda9b85fa19bd55ea9887d6d2e8ab72d0
33 changes: 15 additions & 18 deletions patches/server/0003-Volt-Configurations.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ index 4635d67ed906886f533b6d5911d99a163810ea11..eb57523eb25a70cf3d45e91bf42b326f

private void readScoreboard(DimensionDataStorage persistentStateManager) {
diff --git a/src/main/java/net/minecraft/server/Services.java b/src/main/java/net/minecraft/server/Services.java
index fbe39a996773c0a6ac2f74b3c7342724f8d2d842..1c7e39caec631c6abf665a547c38fb9b85f0cb21 100644
index 44821067c590809e4c76665474cee92ef50191e8..40384c4528bed6912baf8c8551960018b32ef248 100644
--- a/src/main/java/net/minecraft/server/Services.java
+++ b/src/main/java/net/minecraft/server/Services.java
@@ -19,6 +19,7 @@ public record Services(
Expand All @@ -36,9 +36,9 @@ index fbe39a996773c0a6ac2f74b3c7342724f8d2d842..1c7e39caec631c6abf665a547c38fb9b
// Plazma end - Configurable Plazma
) {
// Paper start - add paper configuration files
@@ -31,9 +32,17 @@ public record Services(
@@ -41,9 +42,17 @@ public record Services(
profileCache,
null,
paperConfigurations,
null
+ ,null // Volt - Add Example Configurations patch
);
Expand All @@ -54,19 +54,14 @@ index fbe39a996773c0a6ac2f74b3c7342724f8d2d842..1c7e39caec631c6abf665a547c38fb9b
@Override
public org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations() {
return java.util.Objects.requireNonNull(this.plazmaConfigurations);
@@ -58,7 +67,11 @@ public record Services(
// Plazma start - Configurable Plazma
final java.nio.file.Path plazmaConfigDirPath = ((File) optionSet.valueOf("plazma-settings-directory")).toPath();
org.plazmamc.plazma.configurations.PlazmaConfigurations plazmaConfigurations = new org.plazmamc.plazma.configurations.PlazmaConfigurations(plazmaConfigDirPath);
- return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache, paperConfigurations, plazmaConfigurations);
+ // Volt start - Add Example Configurations patch
+ final java.nio.file.Path voltConfigDirPath = ((File) optionSet.valueOf("volt-settings-directory")).toPath();
+ org.plazmamc.volt.configurations.VoltConfigurations voltConfigurations = new org.plazmamc.volt.configurations.VoltConfigurations(voltConfigDirPath);
+ return new Services(minecraftSessionService, authenticationService.getServicesKeySet(), gameProfileRepository, gameProfileCache, paperConfigurations, plazmaConfigurations, voltConfigurations);
+ // Volt end - Add Example Configurations patch
@@ -73,6 +82,7 @@ public record Services(
gameProfileCache,
paperConfigurations,
new org.plazmamc.plazma.configurations.PlazmaConfigurations(optionSet)
+ ,new org.plazmamc.volt.configurations.VoltConfigurations(optionSet) // Volt - Add Example Configurations patch
);
// Plazma end
// Paper end - load paper config files from cli options
}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index e7d2ad60694c1bac6d2c5f7d35ecc42790cdb42e..6935fc22bcf22601fc6c55e42508733f271f1eee 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
Expand Down Expand Up @@ -476,15 +471,16 @@ index 0000000000000000000000000000000000000000..4dd948fe3c71675e6bbe95f412d265af
+}
diff --git a/src/main/java/org/plazmamc/volt/configurations/VoltConfigurations.java b/src/main/java/org/plazmamc/volt/configurations/VoltConfigurations.java
new file mode 100644
index 0000000000000000000000000000000000000000..f580c8cbe6d6e009fb7ac767e50b56fbafd40e72
index 0000000000000000000000000000000000000000..74a23cf94c761318c9abe85c84663a250ce996a4
--- /dev/null
+++ b/src/main/java/org/plazmamc/volt/configurations/VoltConfigurations.java
@@ -0,0 +1,206 @@
@@ -0,0 +1,208 @@
+package org.plazmamc.volt.configurations;
+
+import com.mojang.logging.LogUtils;
+import io.papermc.paper.configuration.ConfigurationPart;
+import io.papermc.paper.configuration.Configurations;
+import joptsimple.OptionSet;
+import net.minecraft.core.RegistryAccess;
+import net.minecraft.server.level.ServerLevel;
+import org.checkerframework.framework.qual.DefaultQualifier;
Expand All @@ -499,6 +495,7 @@ index 0000000000000000000000000000000000000000..f580c8cbe6d6e009fb7ac767e50b56fb
+import org.spongepowered.configurate.objectmapping.ObjectMapper;
+import org.spongepowered.configurate.NodePath;
+
+import java.io.File;
+import java.nio.file.Path;
+import java.util.function.Function;
+
Expand Down Expand Up @@ -584,8 +581,8 @@ index 0000000000000000000000000000000000000000..f580c8cbe6d6e009fb7ac767e50b56fb
+ map.require(WORLD_NAME), map.require(WORLD_KEY), WORLD_CONFIG_FILE_NAME
+ );
+
+ public VoltConfigurations(final Path globalFolder) {
+ super(globalFolder);
+ public VoltConfigurations(final OptionSet optionSet) {
+ super(((File) optionSet.valueOf("volt-settings-directory")).toPath());
+ }
+
+ @Override
Expand Down

0 comments on commit 4058dfd

Please sign in to comment.