Skip to content

Commit

Permalink
fix: fix some stupid error again
Browse files Browse the repository at this point in the history
  • Loading branch information
MC-XiaoHei committed Dec 27, 2024
1 parent 1f1222c commit 1921229
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
22 changes: 12 additions & 10 deletions patches/server/0004-Command-API-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Command API support

diff --git a/src/main/java/dev/jorel/commandapi/CommandAPIVersionHandler.java b/src/main/java/dev/jorel/commandapi/CommandAPIVersionHandler.java
new file mode 100644
index 0000000000000000000000000000000000000000..2a21b6da2609cd433cb229f1026bb79ebf79c7e0
index 0000000000000000000000000000000000000000..cc91910e601390becc24a77b7d48640064e02fcf
--- /dev/null
+++ b/src/main/java/dev/jorel/commandapi/CommandAPIVersionHandler.java
@@ -0,0 +1,57 @@
Expand All @@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..2a21b6da2609cd433cb229f1026bb79e
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+// Copy from https://github.com/JorelAli/CommandAPI
+// Copy from https://github.com/CommandAPI/CommandAPI
+package dev.jorel.commandapi;
+
+import dev.jorel.commandapi.nms.*;
Expand All @@ -54,16 +54,16 @@ index 0000000000000000000000000000000000000000..2a21b6da2609cd433cb229f1026bb79e
+ * depends on CommandListenerWrapper and then our main NMS_VERSION class extends
+ * that.
+ */
+public interface CommandAPIVersionHandler {
+public abstract class CommandAPIVersionHandler {
+
+ /**
+ * Returns an instance of the current running version's implementation of the Bukkit NMS.
+ *
+ * @return an instance of NMS which can run on the specified Minecraft version
+ */
+ static CommandAPIPlatform<?, ?, ?> getPlatform() {
+ Logger.getLogger("CommandAPIVersionHandler").info("Command API is using NMS version 1_20_R4");
+ return new NMS_1_21_R3();
+ static LoadContext getPlatform() {
+ Logger.getLogger("CommandAPIVersionHandler").info("Command API is using NMS version 1_21_R3");
+ return new LoadContext(new NMS_1_21_R3());
+ }
+
+}
Expand Down Expand Up @@ -242,10 +242,10 @@ index 0000000000000000000000000000000000000000..003a869e730000c498e0546e9ce692af
+}
diff --git a/src/main/java/dev/jorel/commandapi/nms/NMS_1_21_R3.java b/src/main/java/dev/jorel/commandapi/nms/NMS_1_21_R3.java
new file mode 100644
index 0000000000000000000000000000000000000000..9c824a1937cbbd787d690c8483a622c47d52775e
index 0000000000000000000000000000000000000000..046c70b6508f7a9174652fd72d3ff860d38a72fa
--- /dev/null
+++ b/src/main/java/dev/jorel/commandapi/nms/NMS_1_21_R3.java
@@ -0,0 +1,1055 @@
@@ -0,0 +1,1056 @@
+/*******************************************************************************
+ * Copyright 2024 Jorel Ali (Skepter) - MIT License
+ *
Expand All @@ -266,6 +266,7 @@ index 0000000000000000000000000000000000000000..9c824a1937cbbd787d690c8483a622c4
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+// Copy from https://github.com/CommandAPI/CommandAPI
+package dev.jorel.commandapi.nms;
+
+import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -1304,10 +1305,10 @@ index 0000000000000000000000000000000000000000..9c824a1937cbbd787d690c8483a622c4
\ No newline at end of file
diff --git a/src/main/java/dev/jorel/commandapi/nms/NMS_Common.java b/src/main/java/dev/jorel/commandapi/nms/NMS_Common.java
new file mode 100644
index 0000000000000000000000000000000000000000..216ef38a930b762fb88c3d76a3315d0382fb8b36
index 0000000000000000000000000000000000000000..e3e92477794ab2f285ddf05e7221a056a14a286e
--- /dev/null
+++ b/src/main/java/dev/jorel/commandapi/nms/NMS_Common.java
@@ -0,0 +1,604 @@
@@ -0,0 +1,605 @@
+/*******************************************************************************
+ * Copyright 2018, 2021 Jorel Ali (Skepter) - MIT License
+ *
Expand All @@ -1328,6 +1329,7 @@ index 0000000000000000000000000000000000000000..216ef38a930b762fb88c3d76a3315d03
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *******************************************************************************/
+// Copy from https://github.com/CommandAPI/CommandAPI
+package dev.jorel.commandapi.nms;
+
+import com.mojang.brigadier.CommandDispatcher;
Expand Down
13 changes: 13 additions & 0 deletions patches/server/0006-Luminol-Linear-v2-region-format-support.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1151,3 +1151,16 @@ index e40665cead218502b44dd49051a53326ed94f061..912e99d71c5221e853a120ec3ab4bdc6
try {
regionFile.flush();
} catch (final IOException ex) {
diff --git a/src/main/java/org/leavesmc/lumina/config/modules/misc/RegionFormatConfig.java b/src/main/java/org/leavesmc/lumina/config/modules/misc/RegionFormatConfig.java
index a77ee98609c33e47a36ceb28628bd3ffd49f7614..51338fae13814eadcc83d480abe1b17a9d65817c 100644
--- a/src/main/java/org/leavesmc/lumina/config/modules/misc/RegionFormatConfig.java
+++ b/src/main/java/org/leavesmc/lumina/config/modules/misc/RegionFormatConfig.java
@@ -8,7 +8,7 @@ import org.spongepowered.configurate.objectmapping.meta.PostProcess;

@ConfigSerializable
public class RegionFormatConfig {
- public EnumRegionFormat regionFormat;
+ public EnumRegionFormat regionFormat = EnumRegionFormat.MCA;
public int linearCompressionLevel = 1;
public int linearIoThreadCount = 6;
public int linearIoFlushDelayMs = 100;

0 comments on commit 1921229

Please sign in to comment.