mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 14:00:26 +00:00
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:
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("has_fixed_time", json.remove("fixed_time") != null); //TODO investigate
|
||||||
json.put("attributes", attributes);
|
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");
|
json.remove("effects");
|
||||||
var defaults = new JSONObject(DIMENSIONS.get(dimension));
|
var defaults = new JSONObject(DIMENSIONS.get(dimension));
|
||||||
merge(json, defaults);
|
merge(json, defaults);
|
||||||
|
|||||||
Reference in new issue
Block a user