mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-23 00:28:02 +00:00
Overlay biome mob spawns
- 26.3 custom biomes write natural_mob_spawns as an overlay modifier with its argument, matching vanilla biomes - NeoForge biome modifiers can add spawns to Iris biomes again - The 26.3 custom biome codec test checks the overlay modifier
This commit is contained in:
1 parent
6fd877ebfc
commit
5e95248057
2 files changed
+8
-2
No files matched your search
@@ -34,9 +34,12 @@ public final class DataFixerV263 extends DataFixerV1217 {
|
||||
.put("max_inclusive", maximum));
|
||||
}
|
||||
}
|
||||
// Vanilla writes spawns as an overlay. A bare value decodes as an override, which NeoForge biome modifiers refuse to edit.
|
||||
attributes.put("minecraft:gameplay/natural_mob_spawns", new JSONObject()
|
||||
.put("spawns_by_category", spawners)
|
||||
.put("spawn_costs", fixed.getJSONObject("spawn_costs")));
|
||||
.put("argument", new JSONObject()
|
||||
.put("spawns_by_category", spawners)
|
||||
.put("spawn_costs", fixed.getJSONObject("spawn_costs")))
|
||||
.put("modifier", "overlay"));
|
||||
Object probability = fixed.remove("creature_spawn_probability");
|
||||
if (probability != null) {
|
||||
attributes.put("minecraft:gameplay/creature_world_gen_spawn_probability", probability);
|
||||
|
||||
Reference in new issue
Block a user