-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
54 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 48 additions & 50 deletions
98
src/fabric-1.19.2/templates/json/dimension/multi_noise.json.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,57 @@ | ||
<#-- @formatter:off --> | ||
|
||
<#include "../../biomeutils.ftl"> | ||
|
||
<#assign biomesmap = fp.file("utils/defaultbiomes.json")?eval_json/> | ||
|
||
<#macro multiNoiseSource> | ||
{ | ||
"type": "minecraft:multi_noise", | ||
"biomes": [ | ||
<#list w.filterBrokenReferences(data.biomesInDimension) as biome> | ||
{ | ||
"biome": "${biome}", | ||
"parameters": | ||
<#if data.biomesInDimension?size == 1> | ||
{ | ||
"temperature": 0, | ||
"humidity": 0, | ||
"continentalness": 0, | ||
"weirdness": 0, | ||
"erosion": 0, | ||
"depth": 0, | ||
"offset": 0 | ||
} | ||
<#else> | ||
<#if biome.getUnmappedValue().startsWith("CUSTOM:")> | ||
<#assign ge = w.getWorkspace().getModElementByName(biome.getUnmappedValue().replace("CUSTOM:", "")).getGeneratableElement()/> | ||
{ | ||
"temperature": [${temperature2temperature(ge.temperature, normalizeWeight(ge.biomeWeight))}], | ||
"humidity": [${rainingPossibility2humidity(ge.rainingPossibility, normalizeWeight(ge.biomeWeight))}], | ||
"continentalness": [${baseHeight2continentalness(ge.baseHeight normalizeWeight(ge.biomeWeight))}], | ||
"weirdness": [${registryname2weirdness(registryname normalizeWeight(ge.biomeWeight))}], | ||
"erosion": [${heightVariation2erosion(ge.heightVariation normalizeWeight(ge.biomeWeight))}], | ||
"depth": 0, <#-- 0 for surface biomes, 1 for cave biomes --> | ||
"offset": 0 | ||
} | ||
<#else> | ||
<#if biomesmap["minecraft:" + biome.toString()]??> | ||
${thelper.obj2str(biomesmap["minecraft:" + biome.toString()])} | ||
<#else> | ||
{ | ||
"temperature": 0, | ||
"humidity": 0, | ||
"continentalness": 0, | ||
"weirdness": 0, | ||
"erosion": 0, | ||
"depth": 0, | ||
"offset": 0 | ||
} | ||
</#if> | ||
</#if> | ||
</#if> | ||
} | ||
<#if biome?has_next>,</#if> | ||
</#list> | ||
] | ||
"type": "minecraft:multi_noise", | ||
"biomes": [ | ||
<#list w.filterBrokenReferences(data.biomesInDimension) as biome> | ||
{ | ||
"biome": "${biome}", | ||
"parameters": | ||
<#if data.biomesInDimension?size == 1> | ||
{ | ||
"temperature": 0, | ||
"humidity": 0, | ||
"continentalness": 0, | ||
"weirdness": 0, | ||
"erosion": 0, | ||
"depth": 0, | ||
"offset": 0 | ||
} | ||
<#else> | ||
<#if biome.getUnmappedValue().startsWith("CUSTOM:")> | ||
<#assign ge = w.getWorkspace().getModElementByName(biome.getUnmappedValue().replace("CUSTOM:", "")).getGeneratableElement()/> | ||
{ | ||
"temperature": [${ge.genTemperature.min}, ${ge.genTemperature.max}], | ||
"humidity": [${ge.genHumidity.min}, ${ge.genHumidity.max}], | ||
"continentalness": [${ge.genContinentalness.min}, ${ge.genContinentalness.max}], | ||
"weirdness": [${ge.genWeirdness.min}, ${ge.genWeirdness.max}], | ||
"erosion": [${ge.genErosion.min}, ${ge.genErosion.max}], | ||
"depth": 0, <#-- 0 for surface biomes, 1 for cave biomes --> | ||
"offset": 0 | ||
} | ||
<#else> | ||
<#if biomesmap["minecraft:" + biome.toString()]??> | ||
${thelper.obj2str(biomesmap["minecraft:" + biome.toString()])} | ||
<#else> | ||
{ | ||
"temperature": 0, | ||
"humidity": 0, | ||
"continentalness": 0, | ||
"weirdness": 0, | ||
"erosion": 0, | ||
"depth": 0, | ||
"offset": 0 | ||
} | ||
</#if> | ||
</#if> | ||
</#if> | ||
} | ||
<#if biome?has_next>,</#if> | ||
</#list> | ||
] | ||
} | ||
</#macro> | ||
<#-- @formatter:on --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters