Skip to content

Commit

Permalink
Fix #503
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldorion committed Jan 30, 2024
1 parent 2a82a7f commit 6fda204
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/fabric-1.20.1/biome.definition.yaml
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/fabric-1.20.1/mappings/defaultfeatures.yaml
@@ -0,0 +1,2 @@
EndHighlandsBiome: EndHighlandsBiome
EndIslandsBiome: EndIslandsBiome
20 changes: 11 additions & 9 deletions src/fabric-1.20.1/templates/elementinits/biomes.java.ftl
Expand Up @@ -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);
</#if>
</#list>
<#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);
</#if>
</#list>
</#list>
}

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>
</#list>

<#if spawn_overworld?has_content>
Expand Down

0 comments on commit 6fda204

Please sign in to comment.