3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00

[DataConverter] Fix generator options parsing

Dieser Commit ist enthalten in:
Joseph Burton 2022-06-05 22:49:42 +01:00 committet von Shane Freeder
Ursprung b3deb2589e
Commit d8ef841114
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C

Datei anzeigen

@ -10527,7 +10527,7 @@ index 0000000000000000000000000000000000000000..7db79b279a047ec5907a3fb2c6e1a75b
+} +}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1506.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1506.java diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1506.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1506.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..d67a44b7154825efd3e3fd50e0e708ef839866f7 index 0000000000000000000000000000000000000000..ef679762aec326e5e1310390bca46971b548e7cd
--- /dev/null --- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1506.java +++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V1506.java
@@ -0,0 +1,219 @@ @@ -0,0 +1,219 @@
@ -10652,7 +10652,7 @@ index 0000000000000000000000000000000000000000..d67a44b7154825efd3e3fd50e0e708ef
+ if ("flat".equalsIgnoreCase(generatorName)) { + if ("flat".equalsIgnoreCase(generatorName)) {
+ data.setMap("generatorOptions", V1506.convert(generatorOptions == null ? "" : generatorOptions)); + data.setMap("generatorOptions", V1506.convert(generatorOptions == null ? "" : generatorOptions));
+ } else if ("buffet".equalsIgnoreCase(generatorName) && generatorOptions != null) { + } else if ("buffet".equalsIgnoreCase(generatorName) && generatorOptions != null) {
+ data.setMap("generatorOptions", JsonTypeUtil.convertJsonToNBT(new JsonMapType(GsonHelper.parse(generatorName, true), false))); + data.setMap("generatorOptions", JsonTypeUtil.convertJsonToNBT(new JsonMapType(GsonHelper.parse(generatorOptions, true), false)));
+ } + }
+ return null; + return null;
+ } + }