From ff6ecf2eef42db0cb3ba0544ea430ceba1f0d76a Mon Sep 17 00:00:00 2001 From: Mechalopa <92443696+Mechalopa@users.noreply.github.com> Date: Sun, 16 Feb 2025 17:39:34 +0900 Subject: [PATCH] Follows 1.20.1 update --- .../jafohana/registry/ModBlocks.java | 3 +- .../mechalopa/jafohana/util/ModTags.java | 1 + .../world/level/block/CreepansyBlock.java | 23 +++ .../biome_modifier/creepansy_features.json | 6 + .../fasciated_oxeye_daisy_features.json | 6 + .../flower_features_in_coniferous_forest.json | 4 + .../flower_features_in_meneglin.json | 6 + .../tags/blocks/creepansy_plantable_on.json | 19 ++ .../tags/worldgen/biome/has_creepansy.json | 9 + .../biome/has_fasciated_oxeye_daisy.json | 6 + .../biome/integrateddynamics/meneglin.json | 9 + .../configured_feature/creepansy.json | 30 +++ .../fasciated_oxeye_daisy.json | 14 ++ .../configured_feature/flower_meneglin.json | 172 ++++++++++++++++++ .../worldgen/placed_feature/creepansy.json | 19 ++ .../placed_feature/fasciated_dandelion.json | 8 + .../placed_feature/fasciated_oxeye_daisy.json | 27 +++ .../placed_feature/flower_meneglin.json | 19 ++ 18 files changed, 380 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/github/mechalopa/jafohana/world/level/block/CreepansyBlock.java create mode 100644 src/main/resources/data/jafohana/neoforge/biome_modifier/creepansy_features.json create mode 100644 src/main/resources/data/jafohana/neoforge/biome_modifier/fasciated_oxeye_daisy_features.json create mode 100644 src/main/resources/data/jafohana/neoforge/biome_modifier/flower_features_in_meneglin.json create mode 100644 src/main/resources/data/jafohana/tags/blocks/creepansy_plantable_on.json create mode 100644 src/main/resources/data/jafohana/tags/worldgen/biome/has_creepansy.json create mode 100644 src/main/resources/data/jafohana/tags/worldgen/biome/has_fasciated_oxeye_daisy.json create mode 100644 src/main/resources/data/jafohana/tags/worldgen/biome/integrateddynamics/meneglin.json create mode 100644 src/main/resources/data/jafohana/worldgen/configured_feature/creepansy.json create mode 100644 src/main/resources/data/jafohana/worldgen/configured_feature/fasciated_oxeye_daisy.json create mode 100644 src/main/resources/data/jafohana/worldgen/configured_feature/flower_meneglin.json create mode 100644 src/main/resources/data/jafohana/worldgen/placed_feature/creepansy.json create mode 100644 src/main/resources/data/jafohana/worldgen/placed_feature/fasciated_oxeye_daisy.json create mode 100644 src/main/resources/data/jafohana/worldgen/placed_feature/flower_meneglin.json diff --git a/src/main/java/com/github/mechalopa/jafohana/registry/ModBlocks.java b/src/main/java/com/github/mechalopa/jafohana/registry/ModBlocks.java index 07e58041..41988455 100644 --- a/src/main/java/com/github/mechalopa/jafohana/registry/ModBlocks.java +++ b/src/main/java/com/github/mechalopa/jafohana/registry/ModBlocks.java @@ -3,6 +3,7 @@ import java.util.function.Supplier; import com.github.mechalopa.jafohana.JAFOhana; +import com.github.mechalopa.jafohana.world.level.block.CreepansyBlock; import com.github.mechalopa.jafohana.world.level.block.CrimsonCloverBlock; import com.github.mechalopa.jafohana.world.level.block.FasciatedDandelionBlock; import com.github.mechalopa.jafohana.world.level.block.FasciatedOxeyeDaisyBlock; @@ -46,7 +47,7 @@ public class ModBlocks public static final Supplier PURPLE_PANSY = REGISTRY.register("purple_pansy", () -> new ModFlowerBlock(MobEffects.CONFUSION, 9.0F)); public static final Supplier WHITE_PANSY = REGISTRY.register("white_pansy", () -> new ModFlowerBlock(MobEffects.CONFUSION, 9.0F)); public static final Supplier YELLOW_PANSY = REGISTRY.register("yellow_pansy", () -> new ModFlowerBlock(MobEffects.CONFUSION, 9.0F)); - public static final Supplier CREEPANSY = REGISTRY.register("creepansy", () -> new ModFlowerBlock(MobEffects.DAMAGE_BOOST, 4.0F)); + public static final Supplier CREEPANSY = REGISTRY.register("creepansy", () -> new CreepansyBlock(MobEffects.DAMAGE_BOOST, 4.0F)); public static final Supplier SNOWDROP = REGISTRY.register("snowdrop", () -> new ModFlowerBlock(MobEffects.POISON, 12.0F)); public static final Supplier WINTER_HEATH = REGISTRY.register("winter_heath", () -> new ModFlowerBlock(MobEffects.WEAKNESS, 9.0F)); public static final Supplier BLUE_DAISY = REGISTRY.register("blue_daisy", () -> new ModFlowerBlock(MobEffects.MOVEMENT_SPEED, 5.0F)); diff --git a/src/main/java/com/github/mechalopa/jafohana/util/ModTags.java b/src/main/java/com/github/mechalopa/jafohana/util/ModTags.java index f164ca85..e21464bb 100644 --- a/src/main/java/com/github/mechalopa/jafohana/util/ModTags.java +++ b/src/main/java/com/github/mechalopa/jafohana/util/ModTags.java @@ -16,6 +16,7 @@ public static final class BlockTags public static final TagKey CONVERTABLE_TO_CREEPANSY = createBlockTag("convertable_to_creepansy"); public static final TagKey CONVERTABLE_TO_FASCIATED_DANDELION = createBlockTag("convertable_to_fasciated_dandelion"); public static final TagKey CONVERTABLE_TO_FASCIATED_OXEYE_DAISY = createBlockTag("convertable_to_fasciated_oxeye_daisy"); + public static final TagKey CREEPANSY_PLANTABLE_ON = createBlockTag("creepansy_plantable_on"); public static final TagKey CRIMSON_CLOVER_PLANTABLE_ON = createBlockTag("crimson_clover_plantable_on"); public static final TagKey JADE_VINE_PLANTABLE_ON = createBlockTag("jade_vine_plantable_on"); public static final TagKey RED_SPIDER_LILY_PLANTABLE_ON = createBlockTag("red_spider_lily_plantable_on"); diff --git a/src/main/java/com/github/mechalopa/jafohana/world/level/block/CreepansyBlock.java b/src/main/java/com/github/mechalopa/jafohana/world/level/block/CreepansyBlock.java new file mode 100644 index 00000000..7c6ad4a5 --- /dev/null +++ b/src/main/java/com/github/mechalopa/jafohana/world/level/block/CreepansyBlock.java @@ -0,0 +1,23 @@ +package com.github.mechalopa.jafohana.world.level.block; + +import com.github.mechalopa.jafohana.util.ModTags; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.state.BlockState; + +public class CreepansyBlock extends ModFlowerBlock +{ + public CreepansyBlock(Holder effect, float seconds) + { + super(effect, seconds); + } + + @Override + protected boolean mayPlaceOn(BlockState state, BlockGetter world, BlockPos pos) + { + return state.is(ModTags.BlockTags.CREEPANSY_PLANTABLE_ON); + } +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/neoforge/biome_modifier/creepansy_features.json b/src/main/resources/data/jafohana/neoforge/biome_modifier/creepansy_features.json new file mode 100644 index 00000000..7f8e2108 --- /dev/null +++ b/src/main/resources/data/jafohana/neoforge/biome_modifier/creepansy_features.json @@ -0,0 +1,6 @@ +{ + "type": "neoforge:add_features", + "biomes": "#jafohana:has_creepansy", + "features": "jafohana:creepansy", + "step": "vegetal_decoration" +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/neoforge/biome_modifier/fasciated_oxeye_daisy_features.json b/src/main/resources/data/jafohana/neoforge/biome_modifier/fasciated_oxeye_daisy_features.json new file mode 100644 index 00000000..b6b70bdf --- /dev/null +++ b/src/main/resources/data/jafohana/neoforge/biome_modifier/fasciated_oxeye_daisy_features.json @@ -0,0 +1,6 @@ +{ + "type": "neoforge:add_features", + "biomes": "#jafohana:has_fasciated_oxeye_daisy", + "features": "jafohana:fasciated_oxeye_daisy", + "step": "vegetal_decoration" +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/neoforge/biome_modifier/flower_features_in_coniferous_forest.json b/src/main/resources/data/jafohana/neoforge/biome_modifier/flower_features_in_coniferous_forest.json index 018263d2..c582cd3e 100644 --- a/src/main/resources/data/jafohana/neoforge/biome_modifier/flower_features_in_coniferous_forest.json +++ b/src/main/resources/data/jafohana/neoforge/biome_modifier/flower_features_in_coniferous_forest.json @@ -27,6 +27,10 @@ { "name": "#jafohana:biomesoplenty/tundra", "negate": true + }, + { + "name": "#jafohana:integrateddynamics/meneglin", + "negate": true } ] ], diff --git a/src/main/resources/data/jafohana/neoforge/biome_modifier/flower_features_in_meneglin.json b/src/main/resources/data/jafohana/neoforge/biome_modifier/flower_features_in_meneglin.json new file mode 100644 index 00000000..5acc3912 --- /dev/null +++ b/src/main/resources/data/jafohana/neoforge/biome_modifier/flower_features_in_meneglin.json @@ -0,0 +1,6 @@ +{ + "type": "neoforge:add_features", + "biomes": "#jafohana:integrateddynamics/meneglin", + "features": "jafohana:flower_meneglin", + "step": "vegetal_decoration" +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/tags/blocks/creepansy_plantable_on.json b/src/main/resources/data/jafohana/tags/blocks/creepansy_plantable_on.json new file mode 100644 index 00000000..c05125b4 --- /dev/null +++ b/src/main/resources/data/jafohana/tags/blocks/creepansy_plantable_on.json @@ -0,0 +1,19 @@ +{ + "replace": false, + "values": [ + "#minecraft:dirt", + "minecraft:farmland", + { + "id": "#c:storage_blocks/gunpowder", + "required": false + }, + { + "id": "#forge:storage_blocks/gunpowder", + "required": false + }, + { + "id": "blasted_barrens:ashen_sand", + "required": false + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/tags/worldgen/biome/has_creepansy.json b/src/main/resources/data/jafohana/tags/worldgen/biome/has_creepansy.json new file mode 100644 index 00000000..032d709c --- /dev/null +++ b/src/main/resources/data/jafohana/tags/worldgen/biome/has_creepansy.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + { + "id": "blasted_barrens:blasted_barrens", + "required": false + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/tags/worldgen/biome/has_fasciated_oxeye_daisy.json b/src/main/resources/data/jafohana/tags/worldgen/biome/has_fasciated_oxeye_daisy.json new file mode 100644 index 00000000..2163ce21 --- /dev/null +++ b/src/main/resources/data/jafohana/tags/worldgen/biome/has_fasciated_oxeye_daisy.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "#jafohana:integrateddynamics/meneglin" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/tags/worldgen/biome/integrateddynamics/meneglin.json b/src/main/resources/data/jafohana/tags/worldgen/biome/integrateddynamics/meneglin.json new file mode 100644 index 00000000..c35de774 --- /dev/null +++ b/src/main/resources/data/jafohana/tags/worldgen/biome/integrateddynamics/meneglin.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + { + "id": "integrateddynamics:meneglin", + "required": false + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/worldgen/configured_feature/creepansy.json b/src/main/resources/data/jafohana/worldgen/configured_feature/creepansy.json new file mode 100644 index 00000000..3130f390 --- /dev/null +++ b/src/main/resources/data/jafohana/worldgen/configured_feature/creepansy.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:flower", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "jafohana:creepansy" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 32, + "xz_spread": 7, + "y_spread": 3 + } +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/worldgen/configured_feature/fasciated_oxeye_daisy.json b/src/main/resources/data/jafohana/worldgen/configured_feature/fasciated_oxeye_daisy.json new file mode 100644 index 00000000..421f939f --- /dev/null +++ b/src/main/resources/data/jafohana/worldgen/configured_feature/fasciated_oxeye_daisy.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "jafohana:fasciated_oxeye_daisy", + "Properties": { + "half": "lower" + } + } + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/worldgen/configured_feature/flower_meneglin.json b/src/main/resources/data/jafohana/worldgen/configured_feature/flower_meneglin.json new file mode 100644 index 00000000..90db6fdf --- /dev/null +++ b/src/main/resources/data/jafohana/worldgen/configured_feature/flower_meneglin.json @@ -0,0 +1,172 @@ +{ + "type": "minecraft:simple_random_selector", + "config": { + "features": [ + { + "feature": { + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "jafohana:bluebell" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 64, + "xz_spread": 7, + "y_spread": 3 + } + }, + "placement": [] + }, + { + "feature": { + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "jafohana:evening_primrose" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 64, + "xz_spread": 7, + "y_spread": 3 + } + }, + "placement": [] + }, + { + "feature": { + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "jafohana:forget_me_not" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 64, + "xz_spread": 7, + "y_spread": 3 + } + }, + "placement": [] + }, + { + "feature": { + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "jafohana:blue_daisy" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 64, + "xz_spread": 7, + "y_spread": 3 + } + }, + "placement": [] + }, + { + "feature": { + "type": "minecraft:random_patch", + "config": { + "feature": { + "feature": { + "type": "minecraft:simple_block", + "config": { + "to_place": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "jafohana:white_pansy" + } + } + } + }, + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + } + } + ] + }, + "tries": 64, + "xz_spread": 7, + "y_spread": 3 + } + }, + "placement": [] + } + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/worldgen/placed_feature/creepansy.json b/src/main/resources/data/jafohana/worldgen/placed_feature/creepansy.json new file mode 100644 index 00000000..7194d8e4 --- /dev/null +++ b/src/main/resources/data/jafohana/worldgen/placed_feature/creepansy.json @@ -0,0 +1,19 @@ +{ + "feature": "jafohana:creepansy", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 16 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/worldgen/placed_feature/fasciated_dandelion.json b/src/main/resources/data/jafohana/worldgen/placed_feature/fasciated_dandelion.json index 38a72290..d61626ab 100644 --- a/src/main/resources/data/jafohana/worldgen/placed_feature/fasciated_dandelion.json +++ b/src/main/resources/data/jafohana/worldgen/placed_feature/fasciated_dandelion.json @@ -1,6 +1,14 @@ { "feature": "jafohana:fasciated_dandelion", "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:uniform", + "max_inclusive": 2, + "min_inclusive": 1 + } + }, { "type": "minecraft:rarity_filter", "chance": 64 diff --git a/src/main/resources/data/jafohana/worldgen/placed_feature/fasciated_oxeye_daisy.json b/src/main/resources/data/jafohana/worldgen/placed_feature/fasciated_oxeye_daisy.json new file mode 100644 index 00000000..e7b2a365 --- /dev/null +++ b/src/main/resources/data/jafohana/worldgen/placed_feature/fasciated_oxeye_daisy.json @@ -0,0 +1,27 @@ +{ + "feature": "jafohana:fasciated_oxeye_daisy", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:uniform", + "max_inclusive": 2, + "min_inclusive": 1 + } + }, + { + "type": "minecraft:rarity_filter", + "chance": 64 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/jafohana/worldgen/placed_feature/flower_meneglin.json b/src/main/resources/data/jafohana/worldgen/placed_feature/flower_meneglin.json new file mode 100644 index 00000000..f8f7d6e4 --- /dev/null +++ b/src/main/resources/data/jafohana/worldgen/placed_feature/flower_meneglin.json @@ -0,0 +1,19 @@ +{ + "feature": "jafohana:flower_meneglin", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 8 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file