From b662eb806226cffd6d77554e498b59a5a9f95c18 Mon Sep 17 00:00:00 2001 From: dags- Date: Sun, 14 Jun 2020 23:03:16 +0100 Subject: [PATCH] - fix tall grass possibly preventing tree template features from placing - refined badlands terrain - more lush birch forest grasses/flowers --- Engine | 2 +- FeatureManager | 2 +- build.gradle | 3 + .../terraforged/chunk/TerraSetupFactory.java | 2 - .../command/search/BiomeSearchTask.java | 2 +- .../command/search/TerrainSearchTask.java | 2 +- .../features/shrubs/birch_forest_grass.json | 188 ++++++++++++++++++ 7 files changed, 195 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/data/terraforged/features/shrubs/birch_forest_grass.json diff --git a/Engine b/Engine index 7a8cf40..4fe42cd 160000 --- a/Engine +++ b/Engine @@ -1 +1 @@ -Subproject commit 7a8cf4023c45668b7622aee8b372e119c998a6a7 +Subproject commit 4fe42cd41dd112604ef2879a43f8cfbc1a40e0fa diff --git a/FeatureManager b/FeatureManager index 96704f5..06ee44f 160000 --- a/FeatureManager +++ b/FeatureManager @@ -1 +1 @@ -Subproject commit 96704f55881abe69c1a20462cccb83004bd15a9a +Subproject commit 06ee44f3e14bf99f2115f1102645b063ae6ac697 diff --git a/build.gradle b/build.gradle index 7c9e424..3522d61 100644 --- a/build.gradle +++ b/build.gradle @@ -13,6 +13,9 @@ apply plugin: "net.minecraftforge.gradle" apply plugin: "maven-publish" apply plugin: "eclipse" +sourceCompatibility = JavaVersion.VERSION_1_8 +targetCompatibility = JavaVersion.VERSION_1_8 + version = "${mc_version}-${mod_version}${getClassifier()}" allprojects { diff --git a/src/main/java/com/terraforged/chunk/TerraSetupFactory.java b/src/main/java/com/terraforged/chunk/TerraSetupFactory.java index 931b28c..2dee4f1 100644 --- a/src/main/java/com/terraforged/chunk/TerraSetupFactory.java +++ b/src/main/java/com/terraforged/chunk/TerraSetupFactory.java @@ -120,8 +120,6 @@ public class TerraSetupFactory { manager.append( new ForestSurface(context), Biomes.FOREST, - Biomes.BIRCH_FOREST, - Biomes.BIRCH_FOREST_HILLS, Biomes.TALL_BIRCH_FOREST, Biomes.DARK_FOREST, Biomes.DARK_FOREST_HILLS diff --git a/src/main/java/com/terraforged/command/search/BiomeSearchTask.java b/src/main/java/com/terraforged/command/search/BiomeSearchTask.java index 58d8d84..9a99b8a 100644 --- a/src/main/java/com/terraforged/command/search/BiomeSearchTask.java +++ b/src/main/java/com/terraforged/command/search/BiomeSearchTask.java @@ -28,7 +28,7 @@ public class BiomeSearchTask extends Search { @Override public BlockPos success(BlockPos.Mutable pos) { - pos.setY(reader.getHeight(Heightmap.Type.MOTION_BLOCKING, pos.getX(), pos.getZ())); + pos.setY(reader.getHeight(Heightmap.Type.WORLD_SURFACE_WG, pos.getX(), pos.getZ())); return super.success(pos); } } diff --git a/src/main/java/com/terraforged/command/search/TerrainSearchTask.java b/src/main/java/com/terraforged/command/search/TerrainSearchTask.java index d357917..7b6c5dc 100644 --- a/src/main/java/com/terraforged/command/search/TerrainSearchTask.java +++ b/src/main/java/com/terraforged/command/search/TerrainSearchTask.java @@ -34,7 +34,7 @@ public class TerrainSearchTask extends Search { @Override public BlockPos success(BlockPos.Mutable pos) { - pos.setY(reader.getHeight(Heightmap.Type.MOTION_BLOCKING, pos.getX(), pos.getZ())); + pos.setY(reader.getHeight(Heightmap.Type.WORLD_SURFACE_WG, pos.getX(), pos.getZ())); return super.success(pos); } } diff --git a/src/main/resources/data/terraforged/features/shrubs/birch_forest_grass.json b/src/main/resources/data/terraforged/features/shrubs/birch_forest_grass.json new file mode 100644 index 0000000..ff46a90 --- /dev/null +++ b/src/main/resources/data/terraforged/features/shrubs/birch_forest_grass.json @@ -0,0 +1,188 @@ +{ + "biomes": [ + "minecraft:birch*", + "minecraft:tall_birch*" + ], + "match": [[ + "minecraft:double_plant_placer" + ]], + "replace": { + "name": "minecraft:decorated", + "config": { + "feature": { + "name": "minecraft:random_selector", + "config": { + "features": [ + { + "chance": 0.8, + "name": "minecraft:random_patch", + "config": { + "state_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:tall_grass", + "Properties": { + "half": "lower" + } + } + }, + "block_placer": { + "type": "minecraft:double_plant_placer" + }, + "whitelist": [], + "blacklist": [], + "tries": 56, + "xspread": 7, + "yspread": 3, + "zspread": 7, + "can_replace": false, + "project": false, + "need_water": false + } + }, + { + "chance": 0.5, + "name": "minecraft:random_patch", + "config": { + "state_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:lilac", + "Properties": { + "half": "lower" + } + } + }, + "block_placer": { + "type": "minecraft:double_plant_placer" + }, + "whitelist": [], + "blacklist": [], + "tries": 64, + "xspread": 7, + "yspread": 3, + "zspread": 7, + "can_replace": false, + "project": false, + "need_water": false + } + }, + { + "chance": 0.3, + "name": "minecraft:random_patch", + "config": { + "state_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:large_fern", + "Properties": { + "half": "lower" + } + } + }, + "block_placer": { + "type": "minecraft:double_plant_placer" + }, + "whitelist": [], + "blacklist": [], + "tries": 48, + "xspread": 5, + "yspread": 3, + "zspread": 5, + "can_replace": false, + "project": false, + "need_water": false + } + }, + { + "chance": 0.2, + "name": "minecraft:random_patch", + "config": { + "state_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:fern", + "Properties": { + "half": "lower" + } + } + }, + "block_placer": { + "type": "minecraft:simple_block_placer" + }, + "whitelist": [], + "blacklist": [], + "tries": 24, + "xspread": 4, + "yspread": 3, + "zspread": 4, + "can_replace": false, + "project": false, + "need_water": false + } + }, + { + "chance": 0.1, + "name": "minecraft:random_patch", + "config": { + "state_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:peony", + "Properties": { + "half": "lower" + } + } + }, + "block_placer": { + "type": "minecraft:double_plant_placer" + }, + "whitelist": [], + "blacklist": [], + "tries": 32, + "xspread": 6, + "yspread": 3, + "zspread": 6, + "can_replace": false, + "project": false, + "need_water": false + } + } + ], + "default": { + "name": "minecraft:random_patch", + "config": { + "state_provider": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:tall_grass", + "Properties": { + "half": "lower" + } + } + }, + "block_placer": { + "type": "minecraft:double_plant_placer" + }, + "whitelist": [], + "blacklist": [], + "tries": 48, + "xspread": 7, + "yspread": 3, + "zspread": 7, + "can_replace": false, + "project": false, + "need_water": false + } + } + } + }, + "decorator": { + "name": "minecraft:count_heightmap_32", + "config": { + "count": 5 + } + } + } + } +} \ No newline at end of file