From d4d888f330166d99fc75d863702bb819e4927b6e Mon Sep 17 00:00:00 2001 From: dags- Date: Sat, 27 Jun 2020 00:23:33 +0100 Subject: [PATCH] - tweaks to mountain biome trees - redo temp categorization of mountain biomes --- build.gradle | 4 ++++ .../terraforged/mod/biome/provider/BiomeHelper.java | 12 ++++++++++-- .../data/terraforged/features/trees/fir_foreset.json | 3 ++- .../data/terraforged/features/trees/pine.json | 1 - .../terraforged/features/trees/spruce_tundra.json | 1 - 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 6278777..6707f4c 100644 --- a/build.gradle +++ b/build.gradle @@ -127,6 +127,10 @@ classes { dependsOn(collectLibs) } +build { + dependsOn("reobfJar") +} + publishing { publications { // publish the mod jar & api jar diff --git a/src/main/java/com/terraforged/mod/biome/provider/BiomeHelper.java b/src/main/java/com/terraforged/mod/biome/provider/BiomeHelper.java index 042f095..66d1b8c 100644 --- a/src/main/java/com/terraforged/mod/biome/provider/BiomeHelper.java +++ b/src/main/java/com/terraforged/mod/biome/provider/BiomeHelper.java @@ -29,6 +29,7 @@ import com.terraforged.mod.biome.ModBiomes; import com.terraforged.mod.biome.map.BiomeMap; import com.terraforged.mod.biome.map.BiomeMapBuilder; import com.terraforged.mod.biome.map.BiomePredicate; +import com.terraforged.mod.biome.map.defaults.BiomeTemps; import com.terraforged.n2d.util.Vec2f; import com.terraforged.world.biome.BiomeData; import com.terraforged.world.biome.BiomeType; @@ -135,11 +136,18 @@ public class BiomeHelper { return biome.getTempCategory(); } +// Biomes.MOUNTAINS 0.2F +// Biomes.GRAVELLY_MOUNTAINS 0.2F +// Biomes.SNOWY_MOUNTAINS 0.0F +// Biomes.SNOWY_TAIGA_MOUNTAINS -0.5F +// Biomes.TAIGA_MOUNTAINS 0.25F +// Biomes.WOODED_MOUNTAINS 0.2F +// Biomes.MODIFIED_GRAVELLY_MOUNTAINS 0.2F public static Biome.TempCategory getMountainCategory(Biome biome) { - if (biome.getDefaultTemperature() < 0.2) { + if (biome.getDefaultTemperature() <= BiomeTemps.COLD) { return Biome.TempCategory.COLD; } - if (biome.getDefaultTemperature() > 0.4) { + if (biome.getDefaultTemperature() >= BiomeTemps.HOT) { return Biome.TempCategory.WARM; } return Biome.TempCategory.MEDIUM; diff --git a/src/main/resources/data/terraforged/features/trees/fir_foreset.json b/src/main/resources/data/terraforged/features/trees/fir_foreset.json index 7ff93ee..de8ebb3 100644 --- a/src/main/resources/data/terraforged/features/trees/fir_foreset.json +++ b/src/main/resources/data/terraforged/features/trees/fir_foreset.json @@ -1,11 +1,12 @@ { "biomes": [ + "minecraft:snowy_mountains", + "minecraft:wooded_mountains", "terraforged:fir_forest", "terraforged:snowy_fir_forest" ], "match": [ [ - "minecraft:normal_tree", "minecraft:spruce_log", "minecraft:spruce_leaves" ] diff --git a/src/main/resources/data/terraforged/features/trees/pine.json b/src/main/resources/data/terraforged/features/trees/pine.json index acb80ed..1177db2 100644 --- a/src/main/resources/data/terraforged/features/trees/pine.json +++ b/src/main/resources/data/terraforged/features/trees/pine.json @@ -6,7 +6,6 @@ ], "match": [ [ - "minecraft:normal_tree", "minecraft:spruce_log", "minecraft:spruce_leaves" ] diff --git a/src/main/resources/data/terraforged/features/trees/spruce_tundra.json b/src/main/resources/data/terraforged/features/trees/spruce_tundra.json index aca1587..5f2ff38 100644 --- a/src/main/resources/data/terraforged/features/trees/spruce_tundra.json +++ b/src/main/resources/data/terraforged/features/trees/spruce_tundra.json @@ -2,7 +2,6 @@ "biomes": [ "minecraft:snowy_tundra", "minecraft:snowy_taiga_mountains", - "minecraft:wooded_mountains", "minecraft:gravelly_mountains", "minecraft:modified_gravelly_mountains" ],