diff --git a/changelog.md b/changelog.md index da51e30d..7b6c130f 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,7 @@ * [Bugfix #483] GUI tooltips gave a build error * [Bugfix #493] Double plants could not be used * [Bugfix #496] Player right-clicks on a block failed to build +* [Bugfix #503] Custom End biomes had multiple problems ## 1.9.10 * [Bugfix #410] Hardness and harvest level did not correspond diff --git a/src/fabric-1.20.1/biome.definition.yaml b/src/fabric-1.20.1/biome.definition.yaml index d8e59fca..b6bb15eb 100644 --- a/src/fabric-1.20.1/biome.definition.yaml +++ b/src/fabric-1.20.1/biome.definition.yaml @@ -22,7 +22,6 @@ templates: global_templates: - template: elementinits/biomes.java.ftl - condition: hasBiomesInVanillaDimensions() name: "@SRCROOT/@BASEPACKAGEPATH/init/@JavaModNameBiomes.java" - template: biome/biometag.json.ftl # loaded from datapack generator diff --git a/src/fabric-1.20.1/mappings/defaultfeatures.yaml b/src/fabric-1.20.1/mappings/defaultfeatures.yaml new file mode 100644 index 00000000..6f292ac6 --- /dev/null +++ b/src/fabric-1.20.1/mappings/defaultfeatures.yaml @@ -0,0 +1,2 @@ +EndHighlandsBiome: EndHighlandsBiome +EndIslandsBiome: EndIslandsBiome diff --git a/src/fabric-1.20.1/templates/elementinits/biomes.java.ftl b/src/fabric-1.20.1/templates/elementinits/biomes.java.ftl index 2a5623a5..fd25a84d 100644 --- a/src/fabric-1.20.1/templates/elementinits/biomes.java.ftl +++ b/src/fabric-1.20.1/templates/elementinits/biomes.java.ftl @@ -50,20 +50,22 @@ public class ${JavaModName}Biomes { public static void load() { <#list biomes as me> - <#assign biome = me.getModElement().getGeneratableElement()> - <#list generator.sortByMappings(biome.defaultFeatures, "defaultfeatures") as defaultFeature> - <#if generator.map(defaultFeature, "defaultfeatures") = "EndHighlands"> - TheEndBiomes.addHighlandsBiome(${me.getModElement().getRegistryNameUpper()}, 10); - <#elseif generator.map(defaultFeature, "defaultfeatures") = "EndIslands"> - TheEndBiomes.addSmallIslandsBiome(${me.getModElement().getRegistryNameUpper()}, 10); - - + <#assign biome = me.getModElement().getGeneratableElement()> + <#list generator.sortByMappings(biome.defaultFeatures, "defaultfeatures") as defaultFeature> + <#if generator.map(defaultFeature, "defaultfeatures") = "EndHighlandsBiome"> + TheEndBiomes.addHighlandsBiome(${me.getModElement().getRegistryNameUpper()}, 10); + <#elseif generator.map(defaultFeature, "defaultfeatures") = "EndIslandsBiome"> + TheEndBiomes.addSmallIslandsBiome(${me.getModElement().getRegistryNameUpper()}, 10); + + } public static void loadTerraBlenderAPI() { <#list biomes as biome> - Regions.register(new ${biome.getModElement().getName()}Region(new ResourceLocation(${JavaModName}.MODID, "${biome.getModElement().getRegistryName()}"))); + <#if biome.spawnBiome || biome.spawnBiomeNether> + Regions.register(new ${biome.getModElement().getName()}Region(new ResourceLocation(${JavaModName}.MODID, "${biome.getModElement().getRegistryName()}"))); + <#if spawn_overworld?has_content>