From b05ed64ec8b49f1924d99587ea12d34a6b22b7b2 Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Sat, 5 Jun 2021 17:36:07 +0200 Subject: [PATCH] Added weighted features provided by @crovono --- .../weighted_random_feature_placement.json | 22 +++++++++++++++++++ .../bp/features/weighted_random_feature.json | 15 +++++++++++++ .../weighted_random_feature_obsidian.json | 14 ++++++++++++ .../weighted_random_feature_planks.json | 14 ++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 examples/bp/feature_rules/weighted_random_feature_placement.json create mode 100644 examples/bp/features/weighted_random_feature.json create mode 100644 examples/bp/features/weighted_random_feature_obsidian.json create mode 100644 examples/bp/features/weighted_random_feature_planks.json diff --git a/examples/bp/feature_rules/weighted_random_feature_placement.json b/examples/bp/feature_rules/weighted_random_feature_placement.json new file mode 100644 index 00000000..934ca946 --- /dev/null +++ b/examples/bp/feature_rules/weighted_random_feature_placement.json @@ -0,0 +1,22 @@ +{ + "format_version": "1.13.0", + + "minecraft:feature_rules": { + "description": { + "identifier": "weighted_random_features:weighted_random_feature_placement", + "places_feature": "weighted_random_features:weighted_random_feature" + }, + + "conditions": { + "placement_pass": "final_pass" + }, + + "distribution": { + "iterations": 1, + + "x": 0, + "z": 0, + "y": 90 + } + } +} \ No newline at end of file diff --git a/examples/bp/features/weighted_random_feature.json b/examples/bp/features/weighted_random_feature.json new file mode 100644 index 00000000..f5b02bea --- /dev/null +++ b/examples/bp/features/weighted_random_feature.json @@ -0,0 +1,15 @@ +{ + "format_version": "1.13.0", + + "minecraft:weighted_random_feature": { + "description": { + "identifier": "weighted_random_features:weighted_random_feature" + }, + + "features": [ + //The schema says float for weights, but the game truncates it. You should enforce integers. + ["weighted_random_features:weighted_random_feature_obsidian", 3], + ["weighted_random_features:weighted_random_feature_planks", 1] + ] + } +} diff --git a/examples/bp/features/weighted_random_feature_obsidian.json b/examples/bp/features/weighted_random_feature_obsidian.json new file mode 100644 index 00000000..575d5638 --- /dev/null +++ b/examples/bp/features/weighted_random_feature_obsidian.json @@ -0,0 +1,14 @@ +{ + "format_version": "1.13.0", + + "minecraft:single_block_feature": { + "description": { + "identifier": "weighted_random_features:weighted_random_feature_obsidian" + }, + + "places_block": "minecraft:obsidian", + + "enforce_placement_rules": false, + "enforce_survivability_rules": false + } +} \ No newline at end of file diff --git a/examples/bp/features/weighted_random_feature_planks.json b/examples/bp/features/weighted_random_feature_planks.json new file mode 100644 index 00000000..2f5896de --- /dev/null +++ b/examples/bp/features/weighted_random_feature_planks.json @@ -0,0 +1,14 @@ +{ + "format_version": "1.13.0", + + "minecraft:single_block_feature": { + "description": { + "identifier": "weighted_random_features:weighted_random_feature_planks" + }, + + "places_block": "minecraft:planks", + + "enforce_placement_rules": false, + "enforce_survivability_rules": false + } +} \ No newline at end of file