Skip to content

Commit 86f78ba

Browse files
Merge pull request #1236 from VolmitSoftware/dev
3.9.1
2 parents 4e86d7d + c311585 commit 86f78ba

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

core/src/main/java/com/volmit/iris/core/nms/datapack/DataVersion.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.volmit.iris.core.nms.datapack.v1192.DataFixerV1192;
55
import com.volmit.iris.core.nms.datapack.v1206.DataFixerV1206;
66
import com.volmit.iris.core.nms.datapack.v1213.DataFixerV1213;
7+
import com.volmit.iris.core.nms.datapack.v1217.DataFixerV1217;
78
import com.volmit.iris.util.collection.KMap;
89
import lombok.AccessLevel;
910
import lombok.Getter;
@@ -17,7 +18,7 @@ public enum DataVersion {
1718
V1_19_2("1.19.2", 10, DataFixerV1192::new),
1819
V1_20_5("1.20.6", 41, DataFixerV1206::new),
1920
V1_21_3("1.21.3", 57, DataFixerV1213::new),
20-
V1_21_11("1.21.11", 75, DataFixerV1213::new);
21+
V1_21_11("1.21.11", 75, DataFixerV1217::new);
2122
private static final KMap<DataVersion, IDataFixer> cache = new KMap<>();
2223
@Getter(AccessLevel.NONE)
2324
private final Supplier<IDataFixer> constructor;

core/src/main/java/com/volmit/iris/core/nms/datapack/v1217/DataFixerV1217.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public JSONObject fixCustomBiome(IrisBiomeCustom biome, JSONObject json) {
100100
.put(particle.getJSONObject("options")
101101
.put("probability", particle.get("probability"))));
102102
}
103+
json.put("attributes", attributes);
103104

104105
return json;
105106
}
@@ -154,10 +155,10 @@ public void fixDimension(Dimension dimension, JSONObject json) {
154155

155156
private void merge(JSONObject base, JSONObject override) {
156157
for (String key : override.keySet()) {
157-
switch (base.get(key)) {
158-
case null -> base.put(key, override.get(key));
159-
case JSONObject base1 when override.get(key) instanceof JSONObject override1 -> merge(base1, override1);
160-
case JSONArray base1 when override.get(key) instanceof JSONArray override1 -> {
158+
switch (base.opt(key)) {
159+
case null -> base.put(key, override.opt(key));
160+
case JSONObject base1 when override.opt(key) instanceof JSONObject override1 -> merge(base1, override1);
161+
case JSONArray base1 when override.opt(key) instanceof JSONArray override1 -> {
161162
for (Object o : override1) {
162163
base1.put(o);
163164
}

0 commit comments

Comments
 (0)