Keep the Iris data pack loadable after upgrading to 26.1

26.1 requires has_ender_dragon_fight in dimension types and reads data
packs before any plugin runs, so a pack written on 1.21 stopped the
server from starting. 1.21 ignores the field, so it is now always
written.

Model used: Claude Opus 5.5
This commit is contained in:
piexel committed 2026-10-11 16:48:12 +02:00
1 parent 8a18b6ff8b
commit 196de7d858
1 file changed
+4
@@ -148,6 +148,10 @@ public class DataFixerV1217 extends DataFixerV1213 {
//json.put("has_fixed_time", json.remove("fixed_time") != null); //TODO investigate
json.put("attributes", attributes);
// Required from 26.1 on and ignored before it. Writing it here keeps the data pack loadable when the server
// is upgraded, because 26.1 reads the data pack before Iris can rewrite it.
json.put("has_ender_dragon_fight", dimension == Dimension.END);
json.remove("effects");
var defaults = new JSONObject(DIMENSIONS.get(dimension));
merge(json, defaults);