From 168409b84fb185744b6b81cbbe01ba5e3a5bce6a Mon Sep 17 00:00:00 2001 From: AViewFromTheTop <87103914+AViewFromTheTop@users.noreply.github.com> Date: Mon, 24 Feb 2025 04:27:33 -0500 Subject: [PATCH] Icicles & Fragile ice --- .../wilderwild/blockstates/fragile_ice.json | 13 + .../assets/wilderwild/blockstates/icicle.json | 34 ++ .../models/block/fragile_ice_0.json | 6 + .../models/block/fragile_ice_1.json | 6 + .../models/block/fragile_ice_2.json | 6 + .../models/block/icicle_down_base.json | 6 + .../models/block/icicle_down_frustum.json | 6 + .../models/block/icicle_down_middle.json | 6 + .../models/block/icicle_down_tip.json | 6 + .../models/block/icicle_down_tip_merge.json | 6 + .../models/block/icicle_up_base.json | 6 + .../models/block/icicle_up_frustum.json | 6 + .../models/block/icicle_up_middle.json | 6 + .../models/block/icicle_up_tip.json | 6 + .../models/block/icicle_up_tip_merge.json | 6 + .../wilderwild/models/item/fragile_ice.json | 3 + .../assets/wilderwild/models/item/icicle.json | 6 + .../tags/block/geode_invalid_blocks.json | 5 + .../data/minecraft/tags/block/ice.json | 5 + .../tags/block/mineable/pickaxe.json | 4 +- .../block/snow_layer_cannot_survive_on.json | 5 + .../freeze_immune_entity_types.json | 5 + .../loot_table/blocks/fragile_ice.json | 32 ++ .../wilderwild/loot_table/blocks/icicle.json | 32 ++ ...aceable.json => cave_ice_replaceable.json} | 0 .../tags/block/icicle_falls_from.json | 6 + .../tags/block/icicle_grows_when_under.json | 8 + .../wilderwild/tags/block/sound/clay.json | 5 + .../tags/block/sound/dead_bush.json | 5 + .../wilderwild/tags/block/sound/gravel.json | 5 + .../data/wilderwild/tags/block/sound/ice.json | 4 +- .../tags/block/sound/magma_block.json | 5 + .../wilderwild/tags/block/sound/podzol.json | 5 + .../block/sound/reinforced_deepslate.json | 5 + .../tags/block/sound/sugar_cane.json | 5 + .../tags/block/sound/wither_rose.json | 5 + .../fragile_ice_walkable_mobs.json | 31 ++ .../tags/game_event/makes_icicle_fall.json | 7 + .../worldgen/biome/feature/has_icicles.json | 5 + .../worldgen/biome/frozen_caves.json | 17 +- .../configured_feature/cave_icicle.json | 75 +++ ...json => downwards_fragile_ice_column.json} | 20 +- .../fragile_ice_big_column.json | 259 ++++++++++ ...ce_column.json => fragile_ice_column.json} | 20 +- ...tch.json => fragile_ice_column_patch.json} | 13 +- ...r_snow_disk.json => fragile_ice_disk.json} | 16 +- ...{ice_patch.json => fragile_ice_patch.json} | 15 +- .../{ice_pile.json => fragile_ice_pile.json} | 5 +- ...{hanging_icicles.json => hanging_ice.json} | 2 +- .../hanging_packed_ice.json | 31 ++ .../configured_feature/ice_columns.json | 9 +- .../worldgen/configured_feature/ice_disk.json | 30 -- .../configured_feature/ice_patch_ceiling.json | 17 +- .../worldgen/configured_feature/icicle.json | 75 +++ .../configured_feature/icicle_cluster.json | 31 ++ .../configured_feature/icicle_patch.json | 48 -- .../configured_feature/packed_ice_disk.json | 4 +- .../configured_feature/packed_ice_path.json | 6 +- ...> small_downwards_fragile_ice_column.json} | 5 +- ...umn.json => small_fragile_ice_column.json} | 5 +- .../configured_feature/snow_disk.json | 30 -- .../worldgen/placed_feature/cave_icicles.json | 56 +++ ...tch.json => fragile_ice_column_patch.json} | 2 +- .../{ice_disk.json => fragile_ice_disk.json} | 4 +- ...{ice_patch.json => fragile_ice_patch.json} | 2 +- .../{ice_pile.json => fragile_ice_pile.json} | 2 +- ...cle_patch.json => hanging_packed_ice.json} | 2 +- ...ow_disk_lower.json => icicle_cluster.json} | 22 +- .../placed_feature/icicles_surface.json | 68 +++ .../placed_feature/icicles_surface_wg.json | 68 +++ .../powder_snow_disk_lower.json | 35 -- .../powder_snow_disk_upper.json | 39 -- .../placed_feature/snow_disk_upper.json | 39 -- .../wilderwild/block/FragileIceBlock.java | 133 +++++ .../wilderwild/block/IcicleBlock.java | 465 ++++++++++++++++++ .../block/entity/IcicleBlockEntity.java | 168 +++++++ .../client/WWBlockRenderLayers.java | 3 + .../datagen/loot/WWBlockLootProvider.java | 3 + .../datagen/model/WWModelHelper.java | 65 +++ .../datagen/model/WWModelProvider.java | 4 + .../datagen/tag/WWBiomeTagProvider.java | 3 + .../datagen/tag/WWBlockTagProvider.java | 54 +- .../datagen/tag/WWEntityTagProvider.java | 26 + .../datagen/tag/WWGameEventTagProvider.java | 6 + .../mixin/block/ice/EntityMixin.java | 55 +++ .../mixin/block/ice/FrostedIceBlockMixin.java | 4 +- .../block/ice/SpawnUtilStrategyMixin.java | 54 ++ .../block/ice/WalkNodeEvaluatorMixin.java | 61 +++ .../mod_compat/FrozenLibIntegration.java | 30 +- .../registry/WWBlockEntityTypes.java | 2 + .../wilderwild/registry/WWBlocks.java | 24 + .../wilderwild/registry/WWFeatures.java | 6 + .../wilderwild/registry/WWGameEvents.java | 1 + .../wilderwild/tag/WWBiomeTags.java | 1 + .../wilderwild/tag/WWBlockTags.java | 13 +- .../wilderwild/tag/WWEntityTags.java | 1 + .../wilderwild/tag/WWGameEventTags.java | 2 +- .../worldgen/biome/FrozenCaves.java | 15 +- .../feature/configured/WWCaveConfigured.java | 322 +++++++----- .../worldgen/feature/placed/WWCavePlaced.java | 86 ++-- .../impl/features/IcicleClusterFeature.java | 198 ++++++++ .../worldgen/impl/features/IcicleFeature.java | 95 ++++ .../features/config/IcicleClusterConfig.java | 89 ++++ .../impl/features/config/IcicleConfig.java | 69 +++ .../worldgen/impl/util/IcicleUtils.java | 136 +++++ .../modification/WWMiscGeneration.java | 5 + .../assets/wilderwild/lang/en_us.json | 3 + .../textures/block/fragile_ice_0.png | Bin 0 -> 493 bytes .../textures/block/fragile_ice_1.png | Bin 0 -> 493 bytes .../textures/block/fragile_ice_2.png | Bin 0 -> 494 bytes .../textures/block/icicle_down_base.png | Bin 0 -> 281 bytes .../textures/block/icicle_down_frustum.png | Bin 0 -> 260 bytes .../textures/block/icicle_down_middle.png | Bin 0 -> 262 bytes .../textures/block/icicle_down_tip.png | Bin 0 -> 228 bytes .../textures/block/icicle_down_tip_merge.png | Bin 0 -> 228 bytes .../textures/block/icicle_up_base.png | Bin 0 -> 271 bytes .../textures/block/icicle_up_frustum.png | Bin 0 -> 258 bytes .../textures/block/icicle_up_middle.png | Bin 0 -> 262 bytes .../textures/block/icicle_up_tip.png | Bin 0 -> 228 bytes .../textures/block/icicle_up_tip_merge.png | Bin 0 -> 228 bytes .../wilderwild/textures/item/icicle.png | Bin 0 -> 228 bytes src/main/resources/wilderwild.mixins.json | 3 + 122 files changed, 3109 insertions(+), 491 deletions(-) create mode 100644 src/main/generated/assets/wilderwild/blockstates/fragile_ice.json create mode 100644 src/main/generated/assets/wilderwild/blockstates/icicle.json create mode 100644 src/main/generated/assets/wilderwild/models/block/fragile_ice_0.json create mode 100644 src/main/generated/assets/wilderwild/models/block/fragile_ice_1.json create mode 100644 src/main/generated/assets/wilderwild/models/block/fragile_ice_2.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_down_base.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_down_frustum.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_down_middle.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_down_tip.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_down_tip_merge.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_up_base.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_up_frustum.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_up_middle.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_up_tip.json create mode 100644 src/main/generated/assets/wilderwild/models/block/icicle_up_tip_merge.json create mode 100644 src/main/generated/assets/wilderwild/models/item/fragile_ice.json create mode 100644 src/main/generated/assets/wilderwild/models/item/icicle.json create mode 100644 src/main/generated/data/minecraft/tags/block/geode_invalid_blocks.json create mode 100644 src/main/generated/data/minecraft/tags/block/ice.json create mode 100644 src/main/generated/data/minecraft/tags/block/snow_layer_cannot_survive_on.json create mode 100644 src/main/generated/data/minecraft/tags/entity_type/freeze_immune_entity_types.json create mode 100644 src/main/generated/data/wilderwild/loot_table/blocks/fragile_ice.json create mode 100644 src/main/generated/data/wilderwild/loot_table/blocks/icicle.json rename src/main/generated/data/wilderwild/tags/block/feature/{ice_feature_replaceable.json => cave_ice_replaceable.json} (100%) create mode 100644 src/main/generated/data/wilderwild/tags/block/icicle_falls_from.json create mode 100644 src/main/generated/data/wilderwild/tags/block/icicle_grows_when_under.json create mode 100644 src/main/generated/data/wilderwild/tags/block/sound/clay.json create mode 100644 src/main/generated/data/wilderwild/tags/block/sound/dead_bush.json create mode 100644 src/main/generated/data/wilderwild/tags/block/sound/gravel.json create mode 100644 src/main/generated/data/wilderwild/tags/block/sound/magma_block.json create mode 100644 src/main/generated/data/wilderwild/tags/block/sound/podzol.json create mode 100644 src/main/generated/data/wilderwild/tags/block/sound/reinforced_deepslate.json create mode 100644 src/main/generated/data/wilderwild/tags/block/sound/sugar_cane.json create mode 100644 src/main/generated/data/wilderwild/tags/block/sound/wither_rose.json create mode 100644 src/main/generated/data/wilderwild/tags/entity_type/fragile_ice_walkable_mobs.json create mode 100644 src/main/generated/data/wilderwild/tags/game_event/makes_icicle_fall.json create mode 100644 src/main/generated/data/wilderwild/tags/worldgen/biome/feature/has_icicles.json create mode 100644 src/main/generated/data/wilderwild/worldgen/configured_feature/cave_icicle.json rename src/main/generated/data/wilderwild/worldgen/configured_feature/{downwards_ice_column.json => downwards_fragile_ice_column.json} (89%) create mode 100644 src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_big_column.json rename src/main/generated/data/wilderwild/worldgen/configured_feature/{ice_column.json => fragile_ice_column.json} (89%) rename src/main/generated/data/wilderwild/worldgen/configured_feature/{ice_column_patch.json => fragile_ice_column_patch.json} (79%) rename src/main/generated/data/wilderwild/worldgen/configured_feature/{powder_snow_disk.json => fragile_ice_disk.json} (60%) rename src/main/generated/data/wilderwild/worldgen/configured_feature/{ice_patch.json => fragile_ice_patch.json} (74%) rename src/main/generated/data/wilderwild/worldgen/configured_feature/{ice_pile.json => fragile_ice_pile.json} (62%) rename src/main/generated/data/wilderwild/worldgen/configured_feature/{hanging_icicles.json => hanging_ice.json} (82%) create mode 100644 src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_packed_ice.json delete mode 100644 src/main/generated/data/wilderwild/worldgen/configured_feature/ice_disk.json create mode 100644 src/main/generated/data/wilderwild/worldgen/configured_feature/icicle.json create mode 100644 src/main/generated/data/wilderwild/worldgen/configured_feature/icicle_cluster.json delete mode 100644 src/main/generated/data/wilderwild/worldgen/configured_feature/icicle_patch.json rename src/main/generated/data/wilderwild/worldgen/configured_feature/{small_downwards_ice_column.json => small_downwards_fragile_ice_column.json} (71%) rename src/main/generated/data/wilderwild/worldgen/configured_feature/{small_ice_column.json => small_fragile_ice_column.json} (71%) delete mode 100644 src/main/generated/data/wilderwild/worldgen/configured_feature/snow_disk.json create mode 100644 src/main/generated/data/wilderwild/worldgen/placed_feature/cave_icicles.json rename src/main/generated/data/wilderwild/worldgen/placed_feature/{ice_column_patch.json => fragile_ice_column_patch.json} (94%) rename src/main/generated/data/wilderwild/worldgen/placed_feature/{ice_disk.json => fragile_ice_disk.json} (86%) rename src/main/generated/data/wilderwild/worldgen/placed_feature/{ice_patch.json => fragile_ice_patch.json} (95%) rename src/main/generated/data/wilderwild/worldgen/placed_feature/{ice_pile.json => fragile_ice_pile.json} (95%) rename src/main/generated/data/wilderwild/worldgen/placed_feature/{icicle_patch.json => hanging_packed_ice.json} (95%) rename src/main/generated/data/wilderwild/worldgen/placed_feature/{snow_disk_lower.json => icicle_cluster.json} (50%) create mode 100644 src/main/generated/data/wilderwild/worldgen/placed_feature/icicles_surface.json create mode 100644 src/main/generated/data/wilderwild/worldgen/placed_feature/icicles_surface_wg.json delete mode 100644 src/main/generated/data/wilderwild/worldgen/placed_feature/powder_snow_disk_lower.json delete mode 100644 src/main/generated/data/wilderwild/worldgen/placed_feature/powder_snow_disk_upper.json delete mode 100644 src/main/generated/data/wilderwild/worldgen/placed_feature/snow_disk_upper.json create mode 100644 src/main/java/net/frozenblock/wilderwild/block/FragileIceBlock.java create mode 100644 src/main/java/net/frozenblock/wilderwild/block/IcicleBlock.java create mode 100644 src/main/java/net/frozenblock/wilderwild/block/entity/IcicleBlockEntity.java create mode 100644 src/main/java/net/frozenblock/wilderwild/mixin/block/ice/EntityMixin.java create mode 100644 src/main/java/net/frozenblock/wilderwild/mixin/block/ice/SpawnUtilStrategyMixin.java create mode 100644 src/main/java/net/frozenblock/wilderwild/mixin/block/ice/WalkNodeEvaluatorMixin.java create mode 100644 src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/IcicleClusterFeature.java create mode 100644 src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/IcicleFeature.java create mode 100644 src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/config/IcicleClusterConfig.java create mode 100644 src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/config/IcicleConfig.java create mode 100644 src/main/java/net/frozenblock/wilderwild/worldgen/impl/util/IcicleUtils.java create mode 100644 src/main/resources/assets/wilderwild/textures/block/fragile_ice_0.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/fragile_ice_1.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/fragile_ice_2.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_down_base.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_down_frustum.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_down_middle.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_down_tip.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_down_tip_merge.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_up_base.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_up_frustum.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_up_middle.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_up_tip.png create mode 100644 src/main/resources/assets/wilderwild/textures/block/icicle_up_tip_merge.png create mode 100644 src/main/resources/assets/wilderwild/textures/item/icicle.png diff --git a/src/main/generated/assets/wilderwild/blockstates/fragile_ice.json b/src/main/generated/assets/wilderwild/blockstates/fragile_ice.json new file mode 100644 index 0000000000..3a1792d8c5 --- /dev/null +++ b/src/main/generated/assets/wilderwild/blockstates/fragile_ice.json @@ -0,0 +1,13 @@ +{ + "variants": { + "age=0": { + "model": "wilderwild:block/fragile_ice_0" + }, + "age=1": { + "model": "wilderwild:block/fragile_ice_1" + }, + "age=2": { + "model": "wilderwild:block/fragile_ice_2" + } + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/blockstates/icicle.json b/src/main/generated/assets/wilderwild/blockstates/icicle.json new file mode 100644 index 0000000000..2b8d727df7 --- /dev/null +++ b/src/main/generated/assets/wilderwild/blockstates/icicle.json @@ -0,0 +1,34 @@ +{ + "variants": { + "thickness=base,vertical_direction=down": { + "model": "wilderwild:block/icicle_down_base" + }, + "thickness=base,vertical_direction=up": { + "model": "wilderwild:block/icicle_up_base" + }, + "thickness=frustum,vertical_direction=down": { + "model": "wilderwild:block/icicle_down_frustum" + }, + "thickness=frustum,vertical_direction=up": { + "model": "wilderwild:block/icicle_up_frustum" + }, + "thickness=middle,vertical_direction=down": { + "model": "wilderwild:block/icicle_down_middle" + }, + "thickness=middle,vertical_direction=up": { + "model": "wilderwild:block/icicle_up_middle" + }, + "thickness=tip,vertical_direction=down": { + "model": "wilderwild:block/icicle_down_tip" + }, + "thickness=tip,vertical_direction=up": { + "model": "wilderwild:block/icicle_up_tip" + }, + "thickness=tip_merge,vertical_direction=down": { + "model": "wilderwild:block/icicle_down_tip_merge" + }, + "thickness=tip_merge,vertical_direction=up": { + "model": "wilderwild:block/icicle_up_tip_merge" + } + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/fragile_ice_0.json b/src/main/generated/assets/wilderwild/models/block/fragile_ice_0.json new file mode 100644 index 0000000000..8f7108bb2e --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/fragile_ice_0.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "wilderwild:block/fragile_ice_0" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/fragile_ice_1.json b/src/main/generated/assets/wilderwild/models/block/fragile_ice_1.json new file mode 100644 index 0000000000..46e29252a1 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/fragile_ice_1.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "wilderwild:block/fragile_ice_1" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/fragile_ice_2.json b/src/main/generated/assets/wilderwild/models/block/fragile_ice_2.json new file mode 100644 index 0000000000..be93eca502 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/fragile_ice_2.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "wilderwild:block/fragile_ice_2" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_down_base.json b/src/main/generated/assets/wilderwild/models/block/icicle_down_base.json new file mode 100644 index 0000000000..b627e66a93 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_down_base.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_down_base" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_down_frustum.json b/src/main/generated/assets/wilderwild/models/block/icicle_down_frustum.json new file mode 100644 index 0000000000..8741188551 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_down_frustum.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_down_frustum" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_down_middle.json b/src/main/generated/assets/wilderwild/models/block/icicle_down_middle.json new file mode 100644 index 0000000000..3a433cd904 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_down_middle.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_down_middle" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_down_tip.json b/src/main/generated/assets/wilderwild/models/block/icicle_down_tip.json new file mode 100644 index 0000000000..b3edeadf69 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_down_tip.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_down_tip" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_down_tip_merge.json b/src/main/generated/assets/wilderwild/models/block/icicle_down_tip_merge.json new file mode 100644 index 0000000000..d8c537cad4 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_down_tip_merge.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_down_tip_merge" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_up_base.json b/src/main/generated/assets/wilderwild/models/block/icicle_up_base.json new file mode 100644 index 0000000000..f0acb1db24 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_up_base.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_up_base" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_up_frustum.json b/src/main/generated/assets/wilderwild/models/block/icicle_up_frustum.json new file mode 100644 index 0000000000..62c75f6d73 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_up_frustum.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_up_frustum" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_up_middle.json b/src/main/generated/assets/wilderwild/models/block/icicle_up_middle.json new file mode 100644 index 0000000000..223189685a --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_up_middle.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_up_middle" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_up_tip.json b/src/main/generated/assets/wilderwild/models/block/icicle_up_tip.json new file mode 100644 index 0000000000..50c85b7acc --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_up_tip.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_up_tip" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/block/icicle_up_tip_merge.json b/src/main/generated/assets/wilderwild/models/block/icicle_up_tip_merge.json new file mode 100644 index 0000000000..4b27d0826a --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/block/icicle_up_tip_merge.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/pointed_dripstone", + "textures": { + "cross": "wilderwild:block/icicle_up_tip_merge" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/item/fragile_ice.json b/src/main/generated/assets/wilderwild/models/item/fragile_ice.json new file mode 100644 index 0000000000..7d6f2eda1f --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/item/fragile_ice.json @@ -0,0 +1,3 @@ +{ + "parent": "wilderwild:block/fragile_ice_0" +} \ No newline at end of file diff --git a/src/main/generated/assets/wilderwild/models/item/icicle.json b/src/main/generated/assets/wilderwild/models/item/icicle.json new file mode 100644 index 0000000000..ca97a1dc12 --- /dev/null +++ b/src/main/generated/assets/wilderwild/models/item/icicle.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "wilderwild:item/icicle" + } +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/block/geode_invalid_blocks.json b/src/main/generated/data/minecraft/tags/block/geode_invalid_blocks.json new file mode 100644 index 0000000000..08d58699f6 --- /dev/null +++ b/src/main/generated/data/minecraft/tags/block/geode_invalid_blocks.json @@ -0,0 +1,5 @@ +{ + "values": [ + "wilderwild:fragile_ice" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/block/ice.json b/src/main/generated/data/minecraft/tags/block/ice.json new file mode 100644 index 0000000000..08d58699f6 --- /dev/null +++ b/src/main/generated/data/minecraft/tags/block/ice.json @@ -0,0 +1,5 @@ +{ + "values": [ + "wilderwild:fragile_ice" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json b/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json index 714d7e51f3..08edf50ac1 100644 --- a/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json +++ b/src/main/generated/data/minecraft/tags/block/mineable/pickaxe.json @@ -29,6 +29,8 @@ "wilderwild:mossy_gabbro_bricks", "wilderwild:mossy_gabbro_brick_stairs", "wilderwild:mossy_gabbro_brick_slab", - "wilderwild:mossy_gabbro_brick_wall" + "wilderwild:mossy_gabbro_brick_wall", + "wilderwild:fragile_ice", + "wilderwild:icicle" ] } \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/block/snow_layer_cannot_survive_on.json b/src/main/generated/data/minecraft/tags/block/snow_layer_cannot_survive_on.json new file mode 100644 index 0000000000..08d58699f6 --- /dev/null +++ b/src/main/generated/data/minecraft/tags/block/snow_layer_cannot_survive_on.json @@ -0,0 +1,5 @@ +{ + "values": [ + "wilderwild:fragile_ice" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/minecraft/tags/entity_type/freeze_immune_entity_types.json b/src/main/generated/data/minecraft/tags/entity_type/freeze_immune_entity_types.json new file mode 100644 index 0000000000..a608ca89b2 --- /dev/null +++ b/src/main/generated/data/minecraft/tags/entity_type/freeze_immune_entity_types.json @@ -0,0 +1,5 @@ +{ + "values": [ + "wilderwild:penguin" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/loot_table/blocks/fragile_ice.json b/src/main/generated/data/wilderwild/loot_table/blocks/fragile_ice.json new file mode 100644 index 0000000000..50404c4471 --- /dev/null +++ b/src/main/generated/data/wilderwild/loot_table/blocks/fragile_ice.json @@ -0,0 +1,32 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "wilderwild:fragile_ice" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/loot_table/blocks/icicle.json b/src/main/generated/data/wilderwild/loot_table/blocks/icicle.json new file mode 100644 index 0000000000..b4304f3574 --- /dev/null +++ b/src/main/generated/data/wilderwild/loot_table/blocks/icicle.json @@ -0,0 +1,32 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "predicates": { + "minecraft:enchantments": [ + { + "enchantments": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + } + ], + "entries": [ + { + "type": "minecraft:item", + "name": "wilderwild:icicle" + } + ], + "rolls": 1.0 + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/feature/ice_feature_replaceable.json b/src/main/generated/data/wilderwild/tags/block/feature/cave_ice_replaceable.json similarity index 100% rename from src/main/generated/data/wilderwild/tags/block/feature/ice_feature_replaceable.json rename to src/main/generated/data/wilderwild/tags/block/feature/cave_ice_replaceable.json diff --git a/src/main/generated/data/wilderwild/tags/block/icicle_falls_from.json b/src/main/generated/data/wilderwild/tags/block/icicle_falls_from.json new file mode 100644 index 0000000000..b0c485e36b --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/icicle_falls_from.json @@ -0,0 +1,6 @@ +{ + "values": [ + "minecraft:ice", + "wilderwild:fragile_ice" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/icicle_grows_when_under.json b/src/main/generated/data/wilderwild/tags/block/icicle_grows_when_under.json new file mode 100644 index 0000000000..c7a0262e5a --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/icicle_grows_when_under.json @@ -0,0 +1,8 @@ +{ + "values": [ + "minecraft:ice", + "minecraft:packed_ice", + "minecraft:blue_ice", + "wilderwild:fragile_ice" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/sound/clay.json b/src/main/generated/data/wilderwild/tags/block/sound/clay.json new file mode 100644 index 0000000000..957a556dbd --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/sound/clay.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:clay" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/sound/dead_bush.json b/src/main/generated/data/wilderwild/tags/block/sound/dead_bush.json new file mode 100644 index 0000000000..6d6cbb7da7 --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/sound/dead_bush.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:dead_bush" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/sound/gravel.json b/src/main/generated/data/wilderwild/tags/block/sound/gravel.json new file mode 100644 index 0000000000..f6968bff68 --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/sound/gravel.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:gravel" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/sound/ice.json b/src/main/generated/data/wilderwild/tags/block/sound/ice.json index cb6b22a194..606e726c1d 100644 --- a/src/main/generated/data/wilderwild/tags/block/sound/ice.json +++ b/src/main/generated/data/wilderwild/tags/block/sound/ice.json @@ -2,6 +2,8 @@ "values": [ "minecraft:ice", "minecraft:packed_ice", - "minecraft:blue_ice" + "minecraft:blue_ice", + "wilderwild:icicle", + "wilderwild:fragile_ice" ] } \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/sound/magma_block.json b/src/main/generated/data/wilderwild/tags/block/sound/magma_block.json new file mode 100644 index 0000000000..3bf0a87c21 --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/sound/magma_block.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:magma_block" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/sound/podzol.json b/src/main/generated/data/wilderwild/tags/block/sound/podzol.json new file mode 100644 index 0000000000..2ea40093d5 --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/sound/podzol.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:podzol" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/sound/reinforced_deepslate.json b/src/main/generated/data/wilderwild/tags/block/sound/reinforced_deepslate.json new file mode 100644 index 0000000000..579d20853c --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/sound/reinforced_deepslate.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:reinforced_deepslate" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/sound/sugar_cane.json b/src/main/generated/data/wilderwild/tags/block/sound/sugar_cane.json new file mode 100644 index 0000000000..6e3dc8c982 --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/sound/sugar_cane.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:sugar_cane" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/block/sound/wither_rose.json b/src/main/generated/data/wilderwild/tags/block/sound/wither_rose.json new file mode 100644 index 0000000000..4950d61487 --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/block/sound/wither_rose.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:wither_rose" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/entity_type/fragile_ice_walkable_mobs.json b/src/main/generated/data/wilderwild/tags/entity_type/fragile_ice_walkable_mobs.json new file mode 100644 index 0000000000..a880317ffb --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/entity_type/fragile_ice_walkable_mobs.json @@ -0,0 +1,31 @@ +{ + "values": [ + "minecraft:bat", + "minecraft:bee", + "minecraft:allay", + "minecraft:cod", + "minecraft:salmon", + "minecraft:tropical_fish", + "minecraft:axolotl", + "minecraft:turtle", + "minecraft:pufferfish", + "minecraft:spider", + "minecraft:cave_spider", + "minecraft:frog", + "minecraft:stray", + "minecraft:vex", + "wilderwild:tumbleweed", + "wilderwild:crab", + "wilderwild:jellyfish", + "wilderwild:firefly", + "wilderwild:butterfly", + { + "id": "#minecraft:freeze_immune_entity_types", + "required": false + }, + { + "id": "#minecraft:powder_snow_walkable_mobs", + "required": false + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/game_event/makes_icicle_fall.json b/src/main/generated/data/wilderwild/tags/game_event/makes_icicle_fall.json new file mode 100644 index 0000000000..6370c8c8e4 --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/game_event/makes_icicle_fall.json @@ -0,0 +1,7 @@ +{ + "values": [ + "minecraft:explode", + "minecraft:projectile_land", + "wilderwild:big_fall" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/tags/worldgen/biome/feature/has_icicles.json b/src/main/generated/data/wilderwild/tags/worldgen/biome/feature/has_icicles.json new file mode 100644 index 0000000000..6bc0dbd0d7 --- /dev/null +++ b/src/main/generated/data/wilderwild/tags/worldgen/biome/feature/has_icicles.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:ice_spikes" + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/biome/frozen_caves.json b/src/main/generated/data/wilderwild/worldgen/biome/frozen_caves.json index f97101b63d..59c9deadfa 100644 --- a/src/main/generated/data/wilderwild/worldgen/biome/frozen_caves.json +++ b/src/main/generated/data/wilderwild/worldgen/biome/frozen_caves.json @@ -33,7 +33,8 @@ ], [ "minecraft:amethyst_geode", - "wilderwild:packed_ice_path" + "wilderwild:packed_ice_path", + "wilderwild:icicle_cluster" ], [ "minecraft:fossil_upper", @@ -76,17 +77,13 @@ "wilderwild:ore_diorite_extra" ], [ - "wilderwild:snow_disk_upper", - "wilderwild:powder_snow_disk_upper", - "wilderwild:snow_disk_lower", - "wilderwild:powder_snow_disk_lower", + "wilderwild:fragile_ice_disk", "wilderwild:packed_ice_disk", - "wilderwild:ice_pile", - "wilderwild:ice_disk", - "wilderwild:icicle_patch", + "wilderwild:fragile_ice_pile", + "wilderwild:hanging_packed_ice", "wilderwild:ice_patch_ceiling", - "wilderwild:ice_column_patch", - "wilderwild:ice_patch" + "wilderwild:fragile_ice_column_patch", + "wilderwild:fragile_ice_patch" ], [], [ diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/cave_icicle.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/cave_icicle.json new file mode 100644 index 0000000000..586b36c6c2 --- /dev/null +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/cave_icicle.json @@ -0,0 +1,75 @@ +{ + "type": "minecraft:simple_random_selector", + "config": { + "features": [ + { + "feature": { + "type": "wilderwild:icicle_feature", + "config": { + "chance_of_directional_spread": 0.7, + "chance_of_spread_radius2": 0.5, + "chance_of_spread_radius3": 0.5, + "chance_of_taller_icicle": 0.2, + "place_ice_blocks": true + } + }, + "placement": [ + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": [ + "minecraft:air", + "minecraft:water" + ] + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + }, + { + "type": "minecraft:random_offset", + "xz_spread": 0, + "y_spread": 1 + } + ] + }, + { + "feature": { + "type": "wilderwild:icicle_feature", + "config": { + "chance_of_directional_spread": 0.7, + "chance_of_spread_radius2": 0.5, + "chance_of_spread_radius3": 0.5, + "chance_of_taller_icicle": 0.2, + "place_ice_blocks": true + } + }, + "placement": [ + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": [ + "minecraft:air", + "minecraft:water" + ] + }, + "direction_of_search": "up", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + }, + { + "type": "minecraft:random_offset", + "xz_spread": 0, + "y_spread": -1 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/downwards_ice_column.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/downwards_fragile_ice_column.json similarity index 89% rename from src/main/generated/data/wilderwild/worldgen/configured_feature/downwards_ice_column.json rename to src/main/generated/data/wilderwild/worldgen/configured_feature/downwards_fragile_ice_column.json index 1185c5161d..362607b0f6 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/downwards_ice_column.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/downwards_fragile_ice_column.json @@ -13,7 +13,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } }, @@ -52,7 +55,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } }, @@ -91,7 +97,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } }, @@ -130,7 +139,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } }, diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_big_column.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_big_column.json new file mode 100644 index 0000000000..311e7190f3 --- /dev/null +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_big_column.json @@ -0,0 +1,259 @@ +{ + "type": "frozenlib:combo_feature", + "config": { + "features": [ + { + "feature": { + "type": "frozenlib:upwards_column", + "config": { + "height": { + "type": "minecraft:uniform", + "max_inclusive": 9, + "min_inclusive": 2 + }, + "replaceable_blocks": [], + "state": { + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } + } + } + }, + "placement": [ + { + "type": "minecraft:random_offset", + "xz_spread": { + "type": "minecraft:uniform", + "max_inclusive": 1, + "min_inclusive": -1 + }, + "y_spread": 0 + }, + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + } + ] + }, + { + "feature": { + "type": "frozenlib:upwards_column", + "config": { + "height": { + "type": "minecraft:uniform", + "max_inclusive": 4, + "min_inclusive": 0 + }, + "replaceable_blocks": [], + "state": { + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } + } + } + }, + "placement": [ + { + "type": "minecraft:random_offset", + "xz_spread": { + "type": "minecraft:uniform", + "max_inclusive": 1, + "min_inclusive": -1 + }, + "y_spread": 0 + }, + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + } + ] + }, + { + "feature": { + "type": "frozenlib:upwards_column", + "config": { + "height": { + "type": "minecraft:uniform", + "max_inclusive": 4, + "min_inclusive": 0 + }, + "replaceable_blocks": [], + "state": { + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } + } + } + }, + "placement": [ + { + "type": "minecraft:random_offset", + "xz_spread": { + "type": "minecraft:uniform", + "max_inclusive": 1, + "min_inclusive": -1 + }, + "y_spread": 0 + }, + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + } + ] + }, + { + "feature": { + "type": "frozenlib:upwards_column", + "config": { + "height": { + "type": "minecraft:uniform", + "max_inclusive": 4, + "min_inclusive": 0 + }, + "replaceable_blocks": [], + "state": { + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } + } + } + }, + "placement": [ + { + "type": "minecraft:random_offset", + "xz_spread": { + "type": "minecraft:uniform", + "max_inclusive": 1, + "min_inclusive": -1 + }, + "y_spread": 0 + }, + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + } + ] + }, + { + "feature": { + "type": "frozenlib:upwards_column", + "config": { + "height": { + "type": "minecraft:uniform", + "max_inclusive": 4, + "min_inclusive": 0 + }, + "replaceable_blocks": [], + "state": { + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } + } + } + }, + "placement": [ + { + "type": "minecraft:random_offset", + "xz_spread": { + "type": "minecraft:uniform", + "max_inclusive": 1, + "min_inclusive": -1 + }, + "y_spread": 0 + }, + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + } + ] + }, + { + "feature": { + "type": "frozenlib:upwards_column", + "config": { + "height": { + "type": "minecraft:uniform", + "max_inclusive": 4, + "min_inclusive": 0 + }, + "replaceable_blocks": [], + "state": { + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } + } + } + }, + "placement": [ + { + "type": "minecraft:random_offset", + "xz_spread": { + "type": "minecraft:uniform", + "max_inclusive": 1, + "min_inclusive": -1 + }, + "y_spread": 0 + }, + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + } + ] + } + ] + } +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_column.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_column.json similarity index 89% rename from src/main/generated/data/wilderwild/worldgen/configured_feature/ice_column.json rename to src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_column.json index c4384bf3d7..35af55f5da 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_column.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_column.json @@ -13,7 +13,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } }, @@ -52,7 +55,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } }, @@ -91,7 +97,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } }, @@ -130,7 +139,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } }, diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_column_patch.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_column_patch.json similarity index 79% rename from src/main/generated/data/wilderwild/worldgen/configured_feature/ice_column_patch.json rename to src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_column_patch.json index 09f054808c..9733788ec0 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_column_patch.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_column_patch.json @@ -13,7 +13,10 @@ "entries": [ { "data": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } }, "weight": 5 }, @@ -22,16 +25,10 @@ "Name": "minecraft:packed_ice" }, "weight": 8 - }, - { - "data": { - "Name": "minecraft:blue_ice" - }, - "weight": 3 } ] }, - "replaceable": "#wilderwild:feature/ice_feature_replaceable", + "replaceable": "#wilderwild:feature/cave_ice_replaceable", "surface": "floor", "vegetation_chance": 0.1, "vegetation_feature": { diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/powder_snow_disk.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_disk.json similarity index 60% rename from src/main/generated/data/wilderwild/worldgen/configured_feature/powder_snow_disk.json rename to src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_disk.json index 001b96e1ec..5ccdb7ac1a 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/powder_snow_disk.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_disk.json @@ -5,25 +5,31 @@ "heightmap": "OCEAN_FLOOR_WG", "inner_chance": 0.7, "inner_percent": 0.325, - "inner_replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", + "inner_replaceable_blocks": "#wilderwild:feature/cave_ice_replaceable", "inner_state": { "type": "minecraft:simple_state_provider", "state": { - "Name": "minecraft:powder_snow" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } }, - "outer_replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", + "outer_replaceable_blocks": "#wilderwild:feature/cave_ice_replaceable", "outer_state": { "type": "minecraft:simple_state_provider", "state": { - "Name": "minecraft:powder_snow" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } }, "placement_chance": 0.8, "radius": { "type": "minecraft:uniform", "max_inclusive": 8, - "min_inclusive": 3 + "min_inclusive": 4 }, "use_heightmap_instead_of_circular_placement": false } diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_patch.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_patch.json similarity index 74% rename from src/main/generated/data/wilderwild/worldgen/configured_feature/ice_patch.json rename to src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_patch.json index 8afa3fb0b7..7a395f2f10 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_patch.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_patch.json @@ -13,7 +13,10 @@ "entries": [ { "data": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } }, "weight": 5 }, @@ -22,20 +25,14 @@ "Name": "minecraft:packed_ice" }, "weight": 8 - }, - { - "data": { - "Name": "minecraft:blue_ice" - }, - "weight": 3 } ] }, - "replaceable": "#wilderwild:feature/ice_feature_replaceable", + "replaceable": "#wilderwild:feature/cave_ice_replaceable", "surface": "floor", "vegetation_chance": 0.035, "vegetation_feature": { - "feature": "wilderwild:small_ice_column", + "feature": "wilderwild:small_fragile_ice_column", "placement": [] }, "vertical_range": 4, diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_pile.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_pile.json similarity index 62% rename from src/main/generated/data/wilderwild/worldgen/configured_feature/ice_pile.json rename to src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_pile.json index 38597ecbcc..1abd048969 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_pile.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/fragile_ice_pile.json @@ -4,7 +4,10 @@ "state_provider": { "type": "minecraft:simple_state_provider", "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } } diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_icicles.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_ice.json similarity index 82% rename from src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_icicles.json rename to src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_ice.json index 4f3879d299..22a8268eb3 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_icicles.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_ice.json @@ -2,7 +2,7 @@ "type": "minecraft:random_selector", "config": { "default": { - "feature": "wilderwild:downwards_ice_column", + "feature": "wilderwild:downwards_fragile_ice_column", "placement": [] }, "features": [ diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_packed_ice.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_packed_ice.json new file mode 100644 index 0000000000..2052ff3cb9 --- /dev/null +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/hanging_packed_ice.json @@ -0,0 +1,31 @@ +{ + "type": "minecraft:vegetation_patch", + "config": { + "depth": { + "type": "minecraft:uniform", + "max_inclusive": 3, + "min_inclusive": 2 + }, + "extra_bottom_block_chance": 0.4, + "extra_edge_column_chance": 0.6, + "ground_state": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "minecraft:packed_ice" + } + }, + "replaceable": "#wilderwild:feature/cave_ice_replaceable", + "surface": "ceiling", + "vegetation_chance": 0.15, + "vegetation_feature": { + "feature": "wilderwild:hanging_ice", + "placement": [] + }, + "vertical_range": 4, + "xz_radius": { + "type": "minecraft:uniform", + "max_inclusive": 6, + "min_inclusive": 3 + } + } +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_columns.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_columns.json index 797710966a..766c9a1a7d 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_columns.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_columns.json @@ -2,7 +2,7 @@ "type": "minecraft:random_selector", "config": { "default": { - "feature": "wilderwild:ice_column", + "feature": "wilderwild:fragile_ice_column", "placement": [] }, "features": [ @@ -19,6 +19,13 @@ "feature": "wilderwild:packed_ice_big_column", "placement": [] } + }, + { + "chance": 0.35, + "feature": { + "feature": "wilderwild:fragile_ice_big_column", + "placement": [] + } } ] } diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_disk.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_disk.json deleted file mode 100644 index 17af99fff4..0000000000 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_disk.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "frozenlib:fading_disk_feature", - "config": { - "fade_start_distance_percent": 0.675, - "heightmap": "OCEAN_FLOOR_WG", - "inner_chance": 0.7, - "inner_percent": 0.325, - "inner_replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", - "inner_state": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:ice" - } - }, - "outer_replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", - "outer_state": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:ice" - } - }, - "placement_chance": 0.8, - "radius": { - "type": "minecraft:uniform", - "max_inclusive": 5, - "min_inclusive": 2 - }, - "use_heightmap_instead_of_circular_placement": false - } -} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_patch_ceiling.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_patch_ceiling.json index ae9a929be2..392d8b6267 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_patch_ceiling.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/ice_patch_ceiling.json @@ -13,29 +13,26 @@ "entries": [ { "data": { - "Name": "minecraft:ice" - }, - "weight": 5 - }, - { - "data": { - "Name": "minecraft:packed_ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } }, "weight": 8 }, { "data": { - "Name": "minecraft:blue_ice" + "Name": "minecraft:packed_ice" }, "weight": 3 } ] }, - "replaceable": "#wilderwild:feature/ice_feature_replaceable", + "replaceable": "#wilderwild:feature/cave_ice_replaceable", "surface": "floor", "vegetation_chance": 0.035, "vegetation_feature": { - "feature": "wilderwild:small_downwards_ice_column", + "feature": "wilderwild:small_downwards_fragile_ice_column", "placement": [] }, "vertical_range": 4, diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/icicle.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/icicle.json new file mode 100644 index 0000000000..6e63a2beae --- /dev/null +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/icicle.json @@ -0,0 +1,75 @@ +{ + "type": "minecraft:simple_random_selector", + "config": { + "features": [ + { + "feature": { + "type": "wilderwild:icicle_feature", + "config": { + "chance_of_directional_spread": 0.7, + "chance_of_spread_radius2": 0.5, + "chance_of_spread_radius3": 0.5, + "chance_of_taller_icicle": 0.3, + "place_ice_blocks": false + } + }, + "placement": [ + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": [ + "minecraft:air", + "minecraft:water" + ] + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + }, + { + "type": "minecraft:random_offset", + "xz_spread": 0, + "y_spread": 1 + } + ] + }, + { + "feature": { + "type": "wilderwild:icicle_feature", + "config": { + "chance_of_directional_spread": 0.7, + "chance_of_spread_radius2": 0.5, + "chance_of_spread_radius3": 0.5, + "chance_of_taller_icicle": 0.3, + "place_ice_blocks": false + } + }, + "placement": [ + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": [ + "minecraft:air", + "minecraft:water" + ] + }, + "direction_of_search": "up", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + }, + { + "type": "minecraft:random_offset", + "xz_spread": 0, + "y_spread": -1 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/icicle_cluster.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/icicle_cluster.json new file mode 100644 index 0000000000..45c766318a --- /dev/null +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/icicle_cluster.json @@ -0,0 +1,31 @@ +{ + "type": "wilderwild:icicle_cluster_feature", + "config": { + "chance_of_icicle_at_max_distance_from_center": 0.1, + "density": { + "type": "minecraft:uniform", + "max_exclusive": 0.7, + "min_inclusive": 0.3 + }, + "floor_to_ceiling_search_range": 12, + "height": { + "type": "minecraft:uniform", + "max_inclusive": 5, + "min_inclusive": 2 + }, + "height_deviation": 3, + "ice_layer_thickness": { + "type": "minecraft:uniform", + "max_inclusive": 5, + "min_inclusive": 2 + }, + "max_distance_from_center_affecting_height_bias": 8, + "max_distance_from_edge_affecting_chance_of_icicle": 3, + "max_icicle_height_diff": 1, + "radius": { + "type": "minecraft:uniform", + "max_inclusive": 6, + "min_inclusive": 2 + } + } +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/icicle_patch.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/icicle_patch.json deleted file mode 100644 index df9c9f994c..0000000000 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/icicle_patch.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "type": "minecraft:vegetation_patch", - "config": { - "depth": { - "type": "minecraft:uniform", - "max_inclusive": 3, - "min_inclusive": 2 - }, - "extra_bottom_block_chance": 0.4, - "extra_edge_column_chance": 0.6, - "ground_state": { - "type": "minecraft:weighted_state_provider", - "entries": [ - { - "data": { - "Name": "minecraft:ice" - }, - "weight": 5 - }, - { - "data": { - "Name": "minecraft:packed_ice" - }, - "weight": 8 - }, - { - "data": { - "Name": "minecraft:blue_ice" - }, - "weight": 3 - } - ] - }, - "replaceable": "#wilderwild:feature/ice_feature_replaceable", - "surface": "ceiling", - "vegetation_chance": 0.15, - "vegetation_feature": { - "feature": "wilderwild:hanging_icicles", - "placement": [] - }, - "vertical_range": 4, - "xz_radius": { - "type": "minecraft:uniform", - "max_inclusive": 6, - "min_inclusive": 3 - } - } -} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/packed_ice_disk.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/packed_ice_disk.json index 767645185c..3acc4999e4 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/packed_ice_disk.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/packed_ice_disk.json @@ -5,14 +5,14 @@ "heightmap": "OCEAN_FLOOR_WG", "inner_chance": 0.7, "inner_percent": 0.325, - "inner_replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", + "inner_replaceable_blocks": "#wilderwild:feature/cave_ice_replaceable", "inner_state": { "type": "minecraft:simple_state_provider", "state": { "Name": "minecraft:packed_ice" } }, - "outer_replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", + "outer_replaceable_blocks": "#wilderwild:feature/cave_ice_replaceable", "outer_state": { "type": "minecraft:simple_state_provider", "state": { diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/packed_ice_path.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/packed_ice_path.json index c984886135..778fed09c2 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/packed_ice_path.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/packed_ice_path.json @@ -14,7 +14,7 @@ "only_place_when_exposed": true, "placement_chance": 1.0, "radius": 5, - "replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", + "replaceable_blocks": "#wilderwild:feature/cave_ice_replaceable", "scale_y": true, "state": { "type": "minecraft:simple_state_provider", @@ -39,7 +39,7 @@ "only_place_when_exposed": true, "placement_chance": 1.0, "radius": 5, - "replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", + "replaceable_blocks": "#wilderwild:feature/cave_ice_replaceable", "scale_y": true, "state": { "type": "minecraft:simple_state_provider", @@ -64,7 +64,7 @@ "only_place_when_exposed": true, "placement_chance": 1.0, "radius": 5, - "replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", + "replaceable_blocks": "#wilderwild:feature/cave_ice_replaceable", "scale_y": true, "state": { "type": "minecraft:simple_state_provider", diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/small_downwards_ice_column.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/small_downwards_fragile_ice_column.json similarity index 71% rename from src/main/generated/data/wilderwild/worldgen/configured_feature/small_downwards_ice_column.json rename to src/main/generated/data/wilderwild/worldgen/configured_feature/small_downwards_fragile_ice_column.json index 8addf73654..cb9ac53914 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/small_downwards_ice_column.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/small_downwards_fragile_ice_column.json @@ -8,7 +8,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } } \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/small_ice_column.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/small_fragile_ice_column.json similarity index 71% rename from src/main/generated/data/wilderwild/worldgen/configured_feature/small_ice_column.json rename to src/main/generated/data/wilderwild/worldgen/configured_feature/small_fragile_ice_column.json index b25c1cd79e..b551524ff2 100644 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/small_ice_column.json +++ b/src/main/generated/data/wilderwild/worldgen/configured_feature/small_fragile_ice_column.json @@ -8,7 +8,10 @@ }, "replaceable_blocks": [], "state": { - "Name": "minecraft:ice" + "Name": "wilderwild:fragile_ice", + "Properties": { + "age": "0" + } } } } \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/configured_feature/snow_disk.json b/src/main/generated/data/wilderwild/worldgen/configured_feature/snow_disk.json deleted file mode 100644 index 64257f39cd..0000000000 --- a/src/main/generated/data/wilderwild/worldgen/configured_feature/snow_disk.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "type": "frozenlib:fading_disk_feature", - "config": { - "fade_start_distance_percent": 0.675, - "heightmap": "OCEAN_FLOOR_WG", - "inner_chance": 0.7, - "inner_percent": 0.325, - "inner_replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", - "inner_state": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:snow_block" - } - }, - "outer_replaceable_blocks": "#wilderwild:feature/ice_feature_replaceable", - "outer_state": { - "type": "minecraft:simple_state_provider", - "state": { - "Name": "minecraft:snow_block" - } - }, - "placement_chance": 0.8, - "radius": { - "type": "minecraft:uniform", - "max_inclusive": 5, - "min_inclusive": 2 - }, - "use_heightmap_instead_of_circular_placement": false - } -} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/cave_icicles.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/cave_icicles.json new file mode 100644 index 0000000000..b39c9eba15 --- /dev/null +++ b/src/main/generated/data/wilderwild/worldgen/placed_feature/cave_icicles.json @@ -0,0 +1,56 @@ +{ + "feature": "wilderwild:cave_icicle", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:uniform", + "max_inclusive": 192, + "min_inclusive": 56 + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 256 + }, + "min_inclusive": { + "above_bottom": 0 + } + } + }, + { + "type": "minecraft:count", + "count": { + "type": "minecraft:uniform", + "max_inclusive": 5, + "min_inclusive": 1 + } + }, + { + "type": "minecraft:random_offset", + "xz_spread": { + "type": "minecraft:clamped_normal", + "deviation": 3.0, + "max_inclusive": 10, + "mean": 0.0, + "min_inclusive": -10 + }, + "y_spread": { + "type": "minecraft:clamped_normal", + "deviation": 0.6, + "max_inclusive": 2, + "mean": 0.0, + "min_inclusive": -2 + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/ice_column_patch.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_column_patch.json similarity index 94% rename from src/main/generated/data/wilderwild/worldgen/placed_feature/ice_column_patch.json rename to src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_column_patch.json index 33d4e74814..9875dbdab9 100644 --- a/src/main/generated/data/wilderwild/worldgen/placed_feature/ice_column_patch.json +++ b/src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_column_patch.json @@ -1,5 +1,5 @@ { - "feature": "wilderwild:ice_column_patch", + "feature": "wilderwild:fragile_ice_column_patch", "placement": [ { "type": "minecraft:count", diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/ice_disk.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_disk.json similarity index 86% rename from src/main/generated/data/wilderwild/worldgen/placed_feature/ice_disk.json rename to src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_disk.json index ebfb6a9ae2..173d6eaada 100644 --- a/src/main/generated/data/wilderwild/worldgen/placed_feature/ice_disk.json +++ b/src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_disk.json @@ -1,9 +1,9 @@ { - "feature": "wilderwild:ice_disk", + "feature": "wilderwild:fragile_ice_disk", "placement": [ { "type": "minecraft:count", - "count": 24 + "count": 38 }, { "type": "minecraft:in_square" diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/ice_patch.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_patch.json similarity index 95% rename from src/main/generated/data/wilderwild/worldgen/placed_feature/ice_patch.json rename to src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_patch.json index 37dffbafb6..f0830602a1 100644 --- a/src/main/generated/data/wilderwild/worldgen/placed_feature/ice_patch.json +++ b/src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_patch.json @@ -1,5 +1,5 @@ { - "feature": "wilderwild:ice_patch", + "feature": "wilderwild:fragile_ice_patch", "placement": [ { "type": "minecraft:count", diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/ice_pile.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_pile.json similarity index 95% rename from src/main/generated/data/wilderwild/worldgen/placed_feature/ice_pile.json rename to src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_pile.json index b1c724ec88..97a51d4acd 100644 --- a/src/main/generated/data/wilderwild/worldgen/placed_feature/ice_pile.json +++ b/src/main/generated/data/wilderwild/worldgen/placed_feature/fragile_ice_pile.json @@ -1,5 +1,5 @@ { - "feature": "wilderwild:ice_pile", + "feature": "wilderwild:fragile_ice_pile", "placement": [ { "type": "minecraft:count", diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/icicle_patch.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/hanging_packed_ice.json similarity index 95% rename from src/main/generated/data/wilderwild/worldgen/placed_feature/icicle_patch.json rename to src/main/generated/data/wilderwild/worldgen/placed_feature/hanging_packed_ice.json index ba60b42bfa..39d82e824f 100644 --- a/src/main/generated/data/wilderwild/worldgen/placed_feature/icicle_patch.json +++ b/src/main/generated/data/wilderwild/worldgen/placed_feature/hanging_packed_ice.json @@ -1,5 +1,5 @@ { - "feature": "wilderwild:icicle_patch", + "feature": "wilderwild:hanging_packed_ice", "placement": [ { "type": "minecraft:count", diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/snow_disk_lower.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/icicle_cluster.json similarity index 50% rename from src/main/generated/data/wilderwild/worldgen/placed_feature/snow_disk_lower.json rename to src/main/generated/data/wilderwild/worldgen/placed_feature/icicle_cluster.json index ee46eec01b..7ac3b7653e 100644 --- a/src/main/generated/data/wilderwild/worldgen/placed_feature/snow_disk_lower.json +++ b/src/main/generated/data/wilderwild/worldgen/placed_feature/icicle_cluster.json @@ -1,9 +1,13 @@ { - "feature": "wilderwild:snow_disk", + "feature": "wilderwild:icicle_cluster", "placement": [ { "type": "minecraft:count", - "count": 2 + "count": { + "type": "minecraft:uniform", + "max_inclusive": 48, + "min_inclusive": 24 + } }, { "type": "minecraft:in_square" @@ -13,25 +17,13 @@ "height": { "type": "minecraft:uniform", "max_inclusive": { - "absolute": 48 + "absolute": 256 }, "min_inclusive": { "above_bottom": 0 } } }, - { - "type": "minecraft:environment_scan", - "allowed_search_condition": { - "type": "minecraft:matching_blocks", - "blocks": "minecraft:air" - }, - "direction_of_search": "down", - "max_steps": 12, - "target_condition": { - "type": "minecraft:solid" - } - }, { "type": "minecraft:biome" } diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/icicles_surface.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/icicles_surface.json new file mode 100644 index 0000000000..821ee82b51 --- /dev/null +++ b/src/main/generated/data/wilderwild/worldgen/placed_feature/icicles_surface.json @@ -0,0 +1,68 @@ +{ + "feature": "wilderwild:icicle", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:uniform", + "max_inclusive": 30, + "min_inclusive": 18 + } + }, + { + "type": "minecraft:rarity_filter", + "chance": 3 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 127 + }, + "min_inclusive": { + "absolute": 62 + } + } + }, + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + }, + { + "type": "minecraft:random_offset", + "xz_spread": { + "type": "minecraft:clamped_normal", + "deviation": 3.0, + "max_inclusive": 10, + "mean": 0.0, + "min_inclusive": -10 + }, + "y_spread": { + "type": "minecraft:clamped_normal", + "deviation": 0.6, + "max_inclusive": 2, + "mean": 0.0, + "min_inclusive": -2 + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/icicles_surface_wg.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/icicles_surface_wg.json new file mode 100644 index 0000000000..9af7fcc490 --- /dev/null +++ b/src/main/generated/data/wilderwild/worldgen/placed_feature/icicles_surface_wg.json @@ -0,0 +1,68 @@ +{ + "feature": "wilderwild:icicle", + "placement": [ + { + "type": "minecraft:count", + "count": { + "type": "minecraft:uniform", + "max_inclusive": 30, + "min_inclusive": 18 + } + }, + { + "type": "minecraft:rarity_filter", + "chance": 3 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "WORLD_SURFACE_WG" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 127 + }, + "min_inclusive": { + "absolute": 62 + } + } + }, + { + "type": "minecraft:environment_scan", + "allowed_search_condition": { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + "direction_of_search": "down", + "max_steps": 12, + "target_condition": { + "type": "minecraft:solid" + } + }, + { + "type": "minecraft:random_offset", + "xz_spread": { + "type": "minecraft:clamped_normal", + "deviation": 3.0, + "max_inclusive": 10, + "mean": 0.0, + "min_inclusive": -10 + }, + "y_spread": { + "type": "minecraft:clamped_normal", + "deviation": 0.6, + "max_inclusive": 2, + "mean": 0.0, + "min_inclusive": -2 + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/powder_snow_disk_lower.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/powder_snow_disk_lower.json deleted file mode 100644 index fb940c17aa..0000000000 --- a/src/main/generated/data/wilderwild/worldgen/placed_feature/powder_snow_disk_lower.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "feature": "wilderwild:powder_snow_disk", - "placement": [ - { - "type": "minecraft:in_square" - }, - { - "type": "minecraft:height_range", - "height": { - "type": "minecraft:uniform", - "max_inclusive": { - "absolute": 48 - }, - "min_inclusive": { - "above_bottom": 0 - } - } - }, - { - "type": "minecraft:environment_scan", - "allowed_search_condition": { - "type": "minecraft:matching_blocks", - "blocks": "minecraft:air" - }, - "direction_of_search": "down", - "max_steps": 12, - "target_condition": { - "type": "minecraft:solid" - } - }, - { - "type": "minecraft:biome" - } - ] -} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/powder_snow_disk_upper.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/powder_snow_disk_upper.json deleted file mode 100644 index 69f2c485be..0000000000 --- a/src/main/generated/data/wilderwild/worldgen/placed_feature/powder_snow_disk_upper.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "feature": "wilderwild:powder_snow_disk", - "placement": [ - { - "type": "minecraft:count", - "count": 5 - }, - { - "type": "minecraft:in_square" - }, - { - "type": "minecraft:height_range", - "height": { - "type": "minecraft:uniform", - "max_inclusive": { - "absolute": 256 - }, - "min_inclusive": { - "absolute": 48 - } - } - }, - { - "type": "minecraft:environment_scan", - "allowed_search_condition": { - "type": "minecraft:matching_blocks", - "blocks": "minecraft:air" - }, - "direction_of_search": "down", - "max_steps": 12, - "target_condition": { - "type": "minecraft:solid" - } - }, - { - "type": "minecraft:biome" - } - ] -} \ No newline at end of file diff --git a/src/main/generated/data/wilderwild/worldgen/placed_feature/snow_disk_upper.json b/src/main/generated/data/wilderwild/worldgen/placed_feature/snow_disk_upper.json deleted file mode 100644 index a4fe4ecb61..0000000000 --- a/src/main/generated/data/wilderwild/worldgen/placed_feature/snow_disk_upper.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "feature": "wilderwild:snow_disk", - "placement": [ - { - "type": "minecraft:count", - "count": 10 - }, - { - "type": "minecraft:in_square" - }, - { - "type": "minecraft:height_range", - "height": { - "type": "minecraft:uniform", - "max_inclusive": { - "absolute": 256 - }, - "min_inclusive": { - "absolute": 48 - } - } - }, - { - "type": "minecraft:environment_scan", - "allowed_search_condition": { - "type": "minecraft:matching_blocks", - "blocks": "minecraft:air" - }, - "direction_of_search": "down", - "max_steps": 12, - "target_condition": { - "type": "minecraft:solid" - } - }, - { - "type": "minecraft:biome" - } - ] -} \ No newline at end of file diff --git a/src/main/java/net/frozenblock/wilderwild/block/FragileIceBlock.java b/src/main/java/net/frozenblock/wilderwild/block/FragileIceBlock.java new file mode 100644 index 0000000000..d6de23fb11 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/block/FragileIceBlock.java @@ -0,0 +1,133 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.block; + +import com.mojang.serialization.MapCodec; +import net.frozenblock.wilderwild.tag.WWEntityTags; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.BlockParticleOption; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundSource; +import net.minecraft.util.RandomSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LightLayer; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.HalfTransparentBlock; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.IntegerProperty; +import org.jetbrains.annotations.NotNull; + +public class FragileIceBlock extends HalfTransparentBlock { + public static final MapCodec CODEC = simpleCodec(FragileIceBlock::new); + public static final IntegerProperty AGE = BlockStateProperties.AGE_2; + public static final int DELAY_BETWEEN_CRACKS = 20; + + @Override + public @NotNull MapCodec codec() { + return CODEC; + } + + public FragileIceBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState(this.stateDefinition.any().setValue(AGE, 0)); + } + + private void crackOrDestroy(@NotNull BlockState blockState, Level level, BlockPos blockPos) { + int age = blockState.getValue(AGE); + if (age < 2) { + level.setBlock(blockPos, blockState.setValue(AGE, age + 1), UPDATE_CLIENTS); + SoundType soundType = this.getSoundType(blockState); + level.playSound(null, blockPos, soundType.getBreakSound(), SoundSource.BLOCKS, 0.1F, (soundType.getPitch() + 0.2F) + level.getRandom().nextFloat() * 0.2F); + if (level instanceof ServerLevel serverLevel) { + serverLevel.sendParticles( + new BlockParticleOption(ParticleTypes.BLOCK, blockState), + blockPos.getX() + 0.5D, + blockPos.getY() + 0.5D, + blockPos.getZ() + 0.5D, + level.random.nextInt(20, 30), + 0.3F, + 0.3F, + 0.3F, + 0.05D + ); + } + } else { + level.destroyBlock(blockPos, false); + } + } + + public void scheduleCrackIfNotScheduled(@NotNull Level level, BlockPos blockPos) { + if (!level.getBlockTicks().hasScheduledTick(blockPos, this)) { + level.scheduleTick(blockPos, this, DELAY_BETWEEN_CRACKS); + } + } + + @Override + protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) { + this.crackOrDestroy(blockState, serverLevel, blockPos); + } + + @Override + protected void neighborChanged(BlockState blockState, Level level, BlockPos blockPos, @NotNull Block block, BlockPos blockPos2, boolean bl) { + if (block.defaultBlockState().is(this)) { + if (level.getBlockState(blockPos2).isAir()) { + level.destroyBlock(blockPos, false); + } + } + + super.neighborChanged(blockState, level, blockPos, block, blockPos2, bl); + } + + @Override + protected void randomTick(@NotNull BlockState blockState, @NotNull ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) { + if (serverLevel.getBrightness(LightLayer.BLOCK, blockPos) > 11 - blockState.getLightBlock(serverLevel, blockPos)) { + this.melt(serverLevel, blockPos); + } else if (randomSource.nextFloat() <= 0.01F) { + + } + } + + @Override + public void stepOn(Level level, BlockPos blockPos, BlockState blockState, @NotNull Entity entity) { + if (!entity.getType().is(WWEntityTags.FRAGILE_ICE_WALKABLE_MOBS)) { + this.scheduleCrackIfNotScheduled(level, blockPos); + } + } + + protected void melt(@NotNull Level level, BlockPos blockPos) { + if (level.dimensionType().ultraWarm()) { + level.removeBlock(blockPos, false); + } else { + level.setBlockAndUpdate(blockPos, Blocks.WATER.defaultBlockState()); + level.neighborChanged(blockPos, Blocks.WATER, blockPos); + } + } + + @Override + protected void createBlockStateDefinition(StateDefinition.@NotNull Builder builder) { + builder.add(AGE); + } +} diff --git a/src/main/java/net/frozenblock/wilderwild/block/IcicleBlock.java b/src/main/java/net/frozenblock/wilderwild/block/IcicleBlock.java new file mode 100644 index 0000000000..88d9d39f26 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/block/IcicleBlock.java @@ -0,0 +1,465 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.block; + +import com.google.common.annotations.VisibleForTesting; +import com.mojang.serialization.MapCodec; +import net.frozenblock.wilderwild.block.entity.IcicleBlockEntity; +import net.frozenblock.wilderwild.block.impl.SnowloggingUtils; +import net.frozenblock.wilderwild.registry.WWBlockEntityTypes; +import net.frozenblock.wilderwild.registry.WWBlocks; +import net.frozenblock.wilderwild.tag.WWBlockTags; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.item.FallingBlockEntity; +import net.minecraft.world.entity.projectile.Projectile; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.Fallable; +import net.minecraft.world.level.block.LevelEvent; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.SimpleWaterloggedBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DripstoneThickness; +import net.minecraft.world.level.block.state.properties.EnumProperty; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.level.pathfinder.PathComputationType; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.Vec3; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import java.util.Optional; +import java.util.function.BiPredicate; +import java.util.function.Predicate; + +public class IcicleBlock extends BaseEntityBlock implements Fallable, SimpleWaterloggedBlock { + public static final MapCodec CODEC = simpleCodec(IcicleBlock::new); + public static final EnumProperty TIP_DIRECTION = BlockStateProperties.VERTICAL_DIRECTION; + public static final EnumProperty THICKNESS = BlockStateProperties.DRIPSTONE_THICKNESS; + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + private static final int DELAY_BEFORE_FALLING = 2; + private static final VoxelShape TIP_MERGE_SHAPE = Block.box(6D, 0D, 6D, 10D, 16D, 10D); + private static final VoxelShape TIP_SHAPE_UP = Block.box(6D, 0D, 6D, 10D, 12D, 10D); + private static final VoxelShape TIP_SHAPE_DOWN = Block.box(6D, 4D, 6D, 10D, 16D, 10D); + private static final VoxelShape FRUSTUM_SHAPE = Block.box(5D, 0D, 5D, 11D, 16D, 11D); + private static final VoxelShape MIDDLE_SHAPE = Block.box(5D, 0D, 5D, 11D, 16D, 11D); + private static final VoxelShape BASE_SHAPE = Block.box(3D, 0D, 3D, 13D, 16D, 13D); + + public IcicleBlock(BlockBehaviour.Properties properties) { + super(properties); + this.registerDefaultState( + this.stateDefinition.any().setValue(TIP_DIRECTION, Direction.UP).setValue(THICKNESS, DripstoneThickness.TIP).setValue(WATERLOGGED, false) + ); + } + + @Override + protected @NotNull MapCodec codec() { + return CODEC; + } + + @Override + protected void createBlockStateDefinition(StateDefinition.@NotNull Builder builder) { + builder.add(TIP_DIRECTION, THICKNESS, WATERLOGGED); + SnowloggingUtils.appendSnowlogProperties(builder); + } + + @Override + public boolean canSurvive(@NotNull BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + return isValidIciclePlacement(levelReader, blockPos, blockState.getValue(TIP_DIRECTION)); + } + + @Override + protected @NotNull BlockState updateShape( + @NotNull BlockState blockState, + Direction direction, + BlockState blockState2, + LevelAccessor levelAccessor, + BlockPos blockPos, + BlockPos blockPos2 + ) { + if (blockState.getValue(WATERLOGGED)) { + levelAccessor.scheduleTick(blockPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelAccessor)); + } + + if (direction != Direction.UP && direction != Direction.DOWN) { + return blockState; + } else { + Direction direction2 = blockState.getValue(TIP_DIRECTION); + if (direction2 == Direction.DOWN && levelAccessor.getBlockTicks().hasScheduledTick(blockPos, this)) { + return blockState; + } else if (direction == direction2.getOpposite() && !this.canSurvive(blockState, levelAccessor, blockPos)) { + if (direction2 == Direction.DOWN) { + levelAccessor.scheduleTick(blockPos, this, DELAY_BEFORE_FALLING); + } else { + levelAccessor.scheduleTick(blockPos, this, 1); + } + + return blockState; + } else { + boolean bl = blockState.getValue(THICKNESS) == DripstoneThickness.TIP_MERGE; + DripstoneThickness dripstoneThickness = calculateIcicleThickness(levelAccessor, blockPos, direction2, bl); + return blockState.setValue(THICKNESS, dripstoneThickness); + } + } + } + + @Override + protected void onProjectileHit(@NotNull Level level, BlockState blockState, BlockHitResult blockHitResult, Projectile projectile) { + if (!level.isClientSide) { + BlockPos blockPos = blockHitResult.getBlockPos(); + if (level instanceof ServerLevel serverLevel + && projectile.mayInteract(serverLevel, blockPos) + && projectile.mayBreak(serverLevel) + && projectile.getDeltaMovement().length() > 0.4D) { + level.destroyBlock(blockPos, true); + } + } + } + + public void triggerFall(@NotNull Level level, @NotNull BlockPos blockPos) { + level.scheduleTick(blockPos, this, DELAY_BEFORE_FALLING); + } + + @Override + protected void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) { + if (isIceSpike(blockState) && !this.canSurvive(blockState, serverLevel, blockPos)) { + serverLevel.destroyBlock(blockPos, true); + } else { + spawnFallingIcicle(blockState, serverLevel, blockPos); + } + } + + @Override + protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, @NotNull RandomSource randomSource) { + if (randomSource.nextFloat() < 0.011377778F && isHangingIcicleStartPos(blockState, serverLevel, blockPos)) { + growIcicleIfPossible(blockState, serverLevel, blockPos, randomSource); + } + } + + @Nullable + @Override + public BlockState getStateForPlacement(@NotNull BlockPlaceContext blockPlaceContext) { + LevelAccessor levelAccessor = blockPlaceContext.getLevel(); + BlockPos blockPos = blockPlaceContext.getClickedPos(); + Direction direction = blockPlaceContext.getNearestLookingVerticalDirection().getOpposite(); + Direction direction2 = calculateTipDirection(levelAccessor, blockPos, direction); + if (direction2 == null) { + return null; + } else { + DripstoneThickness icicleThickness = calculateIcicleThickness(levelAccessor, blockPos, direction2, !blockPlaceContext.isSecondaryUseActive()); + return icicleThickness == null + ? null + : SnowloggingUtils.getSnowPlacementState( + this.defaultBlockState() + .setValue(TIP_DIRECTION, direction2) + .setValue(THICKNESS, icicleThickness) + .setValue(WATERLOGGED, levelAccessor.getFluidState(blockPos).getType() == Fluids.WATER), + blockPlaceContext + ); + } + } + + @Override + protected @NotNull FluidState getFluidState(@NotNull BlockState blockState) { + return blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState); + } + + @Override + protected @NotNull VoxelShape getOcclusionShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) { + return Shapes.empty(); + } + + @Override + protected @NotNull VoxelShape getShape(@NotNull BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) { + DripstoneThickness icicleThickness = blockState.getValue(THICKNESS); + VoxelShape voxelShape; + if (icicleThickness == DripstoneThickness.TIP_MERGE) { + voxelShape = TIP_MERGE_SHAPE; + } else if (icicleThickness == DripstoneThickness.TIP) { + if (blockState.getValue(TIP_DIRECTION) == Direction.DOWN) { + voxelShape = TIP_SHAPE_DOWN; + } else { + voxelShape = TIP_SHAPE_UP; + } + } else if (icicleThickness == DripstoneThickness.FRUSTUM) { + voxelShape = FRUSTUM_SHAPE; + } else if (icicleThickness == DripstoneThickness.MIDDLE) { + voxelShape = MIDDLE_SHAPE; + } else { + voxelShape = BASE_SHAPE; + } + + Vec3 vec3 = blockState.getOffset(blockGetter, blockPos); + return voxelShape.move(vec3.x, 0D, vec3.z); + } + + @Override + protected boolean isCollisionShapeFullBlock(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos) { + return false; + } + + @Override + protected float getMaxHorizontalOffset() { + return 0.175F; + } + + @Override + public void onBrokenAfterFall(Level level, BlockPos blockPos, @NotNull FallingBlockEntity fallingBlockEntity) { + if (!fallingBlockEntity.isSilent()) { + level.levelEvent(LevelEvent.SOUND_POINTED_DRIPSTONE_LAND, blockPos, 0); + } + } + + @Override + public @NotNull DamageSource getFallDamageSource(@NotNull Entity entity) { + // TODO: Icicle damage source + return entity.damageSources().fallingStalactite(entity); + } + + private static void spawnFallingIcicle(BlockState blockState, ServerLevel serverLevel, @NotNull BlockPos blockPos) { + BlockPos.MutableBlockPos mutableBlockPos = blockPos.mutable(); + BlockState blockState2 = blockState; + + while (isHangingIcicle(blockState2)) { + FallingBlockEntity fallingBlockEntity = FallingBlockEntity.fall(serverLevel, mutableBlockPos, blockState2); + fallingBlockEntity.disableDrop(); + if (isTip(blockState2, true)) { + int i = Math.max(1 + blockPos.getY() - mutableBlockPos.getY(), 6); + fallingBlockEntity.setHurtsEntities(i, 10); + break; + } + + mutableBlockPos.move(Direction.DOWN); + blockState2 = serverLevel.getBlockState(mutableBlockPos); + } + } + + @VisibleForTesting + public static void growIcicleIfPossible(BlockState blockState, @NotNull ServerLevel serverLevel, @NotNull BlockPos blockPos, RandomSource randomSource) { + BlockState blockState2 = serverLevel.getBlockState(blockPos.above(1)); + BlockState blockState3 = serverLevel.getBlockState(blockPos.above(2)); + if (canGrow(blockState2, blockState3)) { + BlockPos blockPos2 = findTip(blockState, serverLevel, blockPos, 7, false); + if (blockPos2 != null) { + BlockState blockState4 = serverLevel.getBlockState(blockPos2); + if (canDrip(blockState4) && canTipGrow(blockState4, serverLevel, blockPos2)) { + if (randomSource.nextBoolean()) { + grow(serverLevel, blockPos2, Direction.DOWN); + } + } + } + } + } + + private static void grow(@NotNull ServerLevel serverLevel, @NotNull BlockPos blockPos, Direction direction) { + BlockPos blockPos2 = blockPos.relative(direction); + BlockState blockState = serverLevel.getBlockState(blockPos2); + if (isUnmergedTipWithDirection(blockState, direction.getOpposite())) { + createMergedTips(blockState, serverLevel, blockPos2); + } else if (blockState.isAir() || blockState.is(Blocks.WATER)) { + createIcicle(serverLevel, blockPos2, direction, DripstoneThickness.TIP); + } + } + + private static void createIcicle(@NotNull LevelAccessor levelAccessor, BlockPos blockPos, Direction direction, DripstoneThickness icicleThickness) { + BlockState blockState = WWBlocks.ICICLE + .defaultBlockState() + .setValue(TIP_DIRECTION, direction) + .setValue(THICKNESS, icicleThickness) + .setValue(WATERLOGGED, levelAccessor.getFluidState(blockPos).getType() == Fluids.WATER); + levelAccessor.setBlock(blockPos, blockState, UPDATE_ALL); + } + + private static void createMergedTips(@NotNull BlockState blockState, LevelAccessor levelAccessor, BlockPos blockPos) { + BlockPos blockPos3; + BlockPos blockPos2; + if (blockState.getValue(TIP_DIRECTION) == Direction.UP) { + blockPos2 = blockPos; + blockPos3 = blockPos.above(); + } else { + blockPos3 = blockPos; + blockPos2 = blockPos.below(); + } + + createIcicle(levelAccessor, blockPos3, Direction.DOWN, DripstoneThickness.TIP_MERGE); + createIcicle(levelAccessor, blockPos2, Direction.UP, DripstoneThickness.TIP_MERGE); + } + + @Nullable + private static BlockPos findTip(BlockState blockState, LevelAccessor levelAccessor, BlockPos blockPos, int i, boolean bl) { + if (isTip(blockState, bl)) return blockPos; + Direction direction = blockState.getValue(TIP_DIRECTION); + BiPredicate biPredicate = (blockPosx, blockStatex) -> blockStatex.is(WWBlocks.ICICLE) + && blockStatex.getValue(TIP_DIRECTION) == direction; + + return findBlockVertical(levelAccessor, blockPos, direction.getAxisDirection(), biPredicate, blockStatex -> isTip(blockStatex, bl), i).orElse(null); + } + + @Nullable + private static Direction calculateTipDirection(LevelReader levelReader, BlockPos blockPos, Direction direction) { + if (isValidIciclePlacement(levelReader, blockPos, direction)) return direction; + if (!isValidIciclePlacement(levelReader, blockPos, direction.getOpposite())) return null; + return direction.getOpposite(); + } + + private static DripstoneThickness calculateIcicleThickness(@NotNull LevelReader levelReader, @NotNull BlockPos blockPos, @NotNull Direction direction, boolean bl) { + Direction direction2 = direction.getOpposite(); + BlockState blockState = levelReader.getBlockState(blockPos.relative(direction)); + if (isIcicleWithDirection(blockState, direction2)) { + return !bl && blockState.getValue(THICKNESS) != DripstoneThickness.TIP_MERGE ? DripstoneThickness.TIP : DripstoneThickness.TIP_MERGE; + } else if (!isIcicleWithDirection(blockState, direction)) { + return DripstoneThickness.TIP; + } else { + DripstoneThickness dripstoneThickness = blockState.getValue(THICKNESS); + if (dripstoneThickness != DripstoneThickness.TIP && dripstoneThickness != DripstoneThickness.TIP_MERGE) { + BlockState blockState2 = levelReader.getBlockState(blockPos.relative(direction2)); + return !isIcicleWithDirection(blockState2, direction) ? DripstoneThickness.BASE : DripstoneThickness.MIDDLE; + } else { + return DripstoneThickness.FRUSTUM; + } + } + } + + public static boolean canDrip(BlockState blockState) { + return isHangingIcicle(blockState) && blockState.getValue(THICKNESS) == DripstoneThickness.TIP && !blockState.getValue(WATERLOGGED); + } + + private static boolean canTipGrow(@NotNull BlockState blockState, @NotNull ServerLevel serverLevel, @NotNull BlockPos blockPos) { + Direction direction = blockState.getValue(TIP_DIRECTION); + BlockPos blockPos2 = blockPos.relative(direction); + BlockState blockState2 = serverLevel.getBlockState(blockPos2); + if (!blockState2.getFluidState().isEmpty()) { + return false; + } else { + return blockState2.isAir() || isUnmergedTipWithDirection(blockState2, direction.getOpposite()); + } + } + + private static boolean isValidIciclePlacement(@NotNull LevelReader levelReader, @NotNull BlockPos blockPos, @NotNull Direction direction) { + BlockPos blockPos2 = blockPos.relative(direction.getOpposite()); + BlockState blockState = levelReader.getBlockState(blockPos2); + return blockState.isFaceSturdy(levelReader, blockPos2, direction) || isIcicleWithDirection(blockState, direction); + } + + private static boolean isTip(@NotNull BlockState blockState, boolean bl) { + if (!blockState.is(WWBlocks.ICICLE)) { + return false; + } else { + DripstoneThickness dripstoneThickness = blockState.getValue(THICKNESS); + return dripstoneThickness == DripstoneThickness.TIP || bl && dripstoneThickness == DripstoneThickness.TIP_MERGE; + } + } + + private static boolean isUnmergedTipWithDirection(BlockState blockState, Direction direction) { + return isTip(blockState, false) && blockState.getValue(TIP_DIRECTION) == direction; + } + + private static boolean isHangingIcicle(BlockState blockState) { + return isIcicleWithDirection(blockState, Direction.DOWN); + } + + private static boolean isIceSpike(BlockState blockState) { + return isIcicleWithDirection(blockState, Direction.UP); + } + + private static boolean isHangingIcicleStartPos(BlockState blockState, LevelReader levelReader, BlockPos blockPos) { + return isHangingIcicle(blockState) && !levelReader.getBlockState(blockPos.above()).is(WWBlocks.ICICLE); + } + + @Override + protected boolean isPathfindable(BlockState blockState, PathComputationType pathComputationType) { + return false; + } + + private static boolean isIcicleWithDirection(@NotNull BlockState blockState, Direction direction) { + return blockState.is(WWBlocks.ICICLE) && blockState.getValue(TIP_DIRECTION) == direction; + } + + private static boolean canGrow(@NotNull BlockState blockState, BlockState aboveState) { + return blockState.is(WWBlocks.FRAGILE_ICE) || (blockState.is(WWBlockTags.ICICLE_GROWS_WHEN_UNDER) && isValidWaterForGrowing(aboveState)); + } + + public static boolean isValidWaterForGrowing(@NotNull BlockState blockState) { + return blockState.is(Blocks.WATER) && blockState.getFluidState().isSource(); + } + + private static Optional findBlockVertical( + LevelAccessor levelAccessor, + @NotNull BlockPos blockPos, + Direction.AxisDirection axisDirection, + BiPredicate biPredicate, + Predicate predicate, + int i + ) { + Direction direction = Direction.get(axisDirection, Direction.Axis.Y); + BlockPos.MutableBlockPos mutableBlockPos = blockPos.mutable(); + + for(int j = 1; j < i; ++j) { + mutableBlockPos.move(direction); + BlockState blockState = levelAccessor.getBlockState(mutableBlockPos); + if (predicate.test(blockState)) { + return Optional.of(mutableBlockPos.immutable()); + } + + if (levelAccessor.isOutsideBuildHeight(mutableBlockPos.getY()) || !biPredicate.test(mutableBlockPos, blockState)) { + return Optional.empty(); + } + } + + return Optional.empty(); + } + + @Override + public @Nullable BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new IcicleBlockEntity(blockPos, blockState); + } + + @Override + protected @NotNull RenderShape getRenderShape(BlockState blockState) { + return RenderShape.MODEL; + } + + @Override + public @Nullable BlockEntityTicker getTicker(@NotNull Level level, BlockState blockState, BlockEntityType type) { + return !level.isClientSide ? createTickerHelper(type, WWBlockEntityTypes.ICICLE, (worldx, pos, statex, blockEntity) -> + blockEntity.serverTick(worldx, pos, statex) + ) : null; + } +} diff --git a/src/main/java/net/frozenblock/wilderwild/block/entity/IcicleBlockEntity.java b/src/main/java/net/frozenblock/wilderwild/block/entity/IcicleBlockEntity.java new file mode 100644 index 0000000000..008381e4a1 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/block/entity/IcicleBlockEntity.java @@ -0,0 +1,168 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.block.entity; + +import com.mojang.logging.LogUtils; +import com.mojang.serialization.Dynamic; +import net.frozenblock.wilderwild.block.IcicleBlock; +import net.frozenblock.wilderwild.registry.WWBlockEntityTypes; +import net.frozenblock.wilderwild.tag.WWBlockTags; +import net.frozenblock.wilderwild.tag.WWGameEventTags; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.Holder; +import net.minecraft.core.HolderLookup; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.NbtOps; +import net.minecraft.nbt.Tag; +import net.minecraft.resources.RegistryOps; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.tags.TagKey; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.gameevent.BlockPositionSource; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.level.gameevent.GameEventListener; +import net.minecraft.world.level.gameevent.PositionSource; +import net.minecraft.world.level.gameevent.vibrations.VibrationSystem; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.slf4j.Logger; + +public class IcicleBlockEntity extends BlockEntity implements GameEventListener.Provider, VibrationSystem { + private static final Logger LOGGER = LogUtils.getLogger(); + private final Listener vibrationListener; + private final User vibrationUser = this.createVibrationUser(); + private Data vibrationData; + + public IcicleBlockEntity(@NotNull BlockPos pos, @NotNull BlockState state) { + super(WWBlockEntityTypes.ICICLE, pos, state); + this.vibrationData = new Data(); + this.vibrationListener = new Listener(this); + } + + public void serverTick(@NotNull Level level, @NotNull BlockPos pos, @NotNull BlockState state) { + Ticker.tick(level, this.getVibrationData(), this.getVibrationUser()); + } + + @Override + public void loadAdditional(@NotNull CompoundTag tag, HolderLookup.Provider provider) { + super.loadAdditional(tag, provider); + + if (tag.contains("listener", 10)) { + RegistryOps registryOps = provider.createSerializationContext(NbtOps.INSTANCE); + Data.CODEC.parse(new Dynamic<>(registryOps, tag.getCompound("listener"))) + .resultOrPartial((string) -> LOGGER.error("Failed to parse vibration listener for Icicle: '{}'", string)) + .ifPresent(data -> this.vibrationData = data); + } + } + + @Override + protected void saveAdditional(@NotNull CompoundTag tag, HolderLookup.Provider provider) { + super.saveAdditional(tag, provider); + + RegistryOps registryOps = provider.createSerializationContext(NbtOps.INSTANCE); + Data.CODEC.encodeStart(registryOps, this.vibrationData) + .resultOrPartial((string) -> LOGGER.error("Failed to encode vibration listener for Icicle: '{}'", string)) + .ifPresent(nbt -> tag.put("listener", nbt)); + } + + @NotNull + public VibrationSystem.User createVibrationUser() { + return new IcicleBlockEntity.VibrationUser(this.getBlockPos()); + } + + @Override + @NotNull + public Listener getListener() { + return this.vibrationListener; + } + + @Override + @NotNull + public Data getVibrationData() { + return this.vibrationData; + } + + @Override + @NotNull + public User getVibrationUser() { + return this.vibrationUser; + } + + public class VibrationUser implements User { + public static final int LISTENER_RANGE = 8; + protected final BlockPos blockPos; + private final PositionSource positionSource; + + public VibrationUser(BlockPos pos) { + this.blockPos = pos; + this.positionSource = new BlockPositionSource(pos); + } + + @Override + public int getListenerRadius() { + return LISTENER_RANGE; + } + + @Override + @NotNull + public PositionSource getPositionSource() { + return this.positionSource; + } + + @Override + public @NotNull TagKey getListenableEvents() { + return WWGameEventTags.MAKES_ICICLE_FALL; + } + + @Override + public boolean canReceiveVibration( + @NotNull ServerLevel level, + @NotNull BlockPos pos, + @NotNull Holder gameEvent, + @Nullable GameEvent.Context context + ) { + if (pos.equals(this.blockPos) && (gameEvent == GameEvent.BLOCK_DESTROY || gameEvent == GameEvent.BLOCK_PLACE)) return false; + if (IcicleBlockEntity.this.getBlockState().getValue(IcicleBlock.TIP_DIRECTION) == Direction.UP) return false; + return level.getBlockState(IcicleBlockEntity.this.getBlockPos().above()).is(WWBlockTags.ICICLE_FALLS_FROM); + } + + @Override + public void onReceiveVibration( + @NotNull ServerLevel world, + @NotNull BlockPos pos, + @NotNull Holder gameEvent, + @Nullable Entity entity, + @Nullable Entity entity2, + float f + ) { + if (IcicleBlockEntity.this.getBlockState().getBlock() instanceof IcicleBlock icicleBlock) { + icicleBlock.triggerFall(world, this.blockPos); + } + } + + @Override + public void onDataChanged() { + IcicleBlockEntity.this.setChanged(); + } + } +} diff --git a/src/main/java/net/frozenblock/wilderwild/client/WWBlockRenderLayers.java b/src/main/java/net/frozenblock/wilderwild/client/WWBlockRenderLayers.java index 629ac13067..36325f63fb 100644 --- a/src/main/java/net/frozenblock/wilderwild/client/WWBlockRenderLayers.java +++ b/src/main/java/net/frozenblock/wilderwild/client/WWBlockRenderLayers.java @@ -156,6 +156,9 @@ public static void init() { renderLayerRegistry.putBlock(WWBlocks.TUMBLEWEED_PLANT, RenderType.cutout()); renderLayerRegistry.putBlock(WWBlocks.TUMBLEWEED, RenderType.cutout()); + renderLayerRegistry.putBlock(WWBlocks.FRAGILE_ICE, RenderType.translucent()); + renderLayerRegistry.putBlock(WWBlocks.ICICLE, RenderType.cutout()); + renderLayerRegistry.putBlock(WWBlocks.BAOBAB_LEAVES, RenderType.cutoutMipped()); renderLayerRegistry.putBlock(WWBlocks.WILLOW_LEAVES, RenderType.cutoutMipped()); renderLayerRegistry.putBlock(WWBlocks.CYPRESS_LEAVES, RenderType.cutoutMipped()); diff --git a/src/main/java/net/frozenblock/wilderwild/datagen/loot/WWBlockLootProvider.java b/src/main/java/net/frozenblock/wilderwild/datagen/loot/WWBlockLootProvider.java index 394acf2d90..cc23194a76 100644 --- a/src/main/java/net/frozenblock/wilderwild/datagen/loot/WWBlockLootProvider.java +++ b/src/main/java/net/frozenblock/wilderwild/datagen/loot/WWBlockLootProvider.java @@ -515,6 +515,9 @@ public void generate() { WWBlockLootHelper.makeShearsOrSilkTouchRequiredLoot(this, WWBlocks.YELLOW_MAPLE_LEAF_LITTER); WWBlockLootHelper.makeShearsOrSilkTouchRequiredLoot(this, WWBlocks.ORANGE_MAPLE_LEAF_LITTER); WWBlockLootHelper.makeShearsOrSilkTouchRequiredLoot(this, WWBlocks.RED_MAPLE_LEAF_LITTER); + + this.dropWhenSilkTouch(WWBlocks.FRAGILE_ICE); + this.dropWhenSilkTouch(WWBlocks.ICICLE); } } diff --git a/src/main/java/net/frozenblock/wilderwild/datagen/model/WWModelHelper.java b/src/main/java/net/frozenblock/wilderwild/datagen/model/WWModelHelper.java index b6ad831dd0..ed81145682 100644 --- a/src/main/java/net/frozenblock/wilderwild/datagen/model/WWModelHelper.java +++ b/src/main/java/net/frozenblock/wilderwild/datagen/model/WWModelHelper.java @@ -24,6 +24,7 @@ import java.util.function.Function; import net.frozenblock.wilderwild.WWConstants; import net.frozenblock.wilderwild.block.ShelfFungiBlock; +import net.frozenblock.wilderwild.registry.WWBlocks; import net.minecraft.Util; import net.minecraft.core.Direction; import net.minecraft.data.models.BlockModelGenerators; @@ -42,9 +43,11 @@ import net.minecraft.data.models.model.TexturedModel; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.properties.AttachFace; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DripstoneThickness; import org.jetbrains.annotations.NotNull; public final class WWModelHelper { @@ -257,4 +260,66 @@ public static void createHibiscus(@NotNull BlockModelGenerators generator, Block ResourceLocation resourceLocation = tintState.getCrossPot().create(pottedBlock, textureMapping, generator.modelOutput); generator.blockStateOutput.accept(BlockModelGenerators.createSimpleBlock(pottedBlock, resourceLocation)); } + + public static void createIcicle(@NotNull BlockModelGenerators generator) { + generator.skipAutoItemBlock(WWBlocks.ICICLE); + PropertyDispatch.C2 c2 = PropertyDispatch.properties( + BlockStateProperties.VERTICAL_DIRECTION, BlockStateProperties.DRIPSTONE_THICKNESS + ); + + for (DripstoneThickness dripstoneThickness : DripstoneThickness.values()) { + c2.select(Direction.UP, dripstoneThickness, createIcicleVariant(generator, Direction.UP, dripstoneThickness)); + } + + for (DripstoneThickness dripstoneThickness : DripstoneThickness.values()) { + c2.select(Direction.DOWN, dripstoneThickness, createIcicleVariant(generator, Direction.DOWN, dripstoneThickness)); + } + + generator.blockStateOutput.accept(MultiVariantGenerator.multiVariant(WWBlocks.ICICLE).with(c2)); + } + + private static @NotNull Variant createIcicleVariant(@NotNull BlockModelGenerators generator, @NotNull Direction direction, @NotNull DripstoneThickness dripstoneThickness) { + String string = "_" + direction.getSerializedName() + "_" + dripstoneThickness.getSerializedName(); + TextureMapping textureMapping = TextureMapping.cross(TextureMapping.getBlockTexture(WWBlocks.ICICLE, string)); + return Variant.variant() + .with(VariantProperties.MODEL, ModelTemplates.POINTED_DRIPSTONE.createWithSuffix(WWBlocks.ICICLE, string, textureMapping, generator.modelOutput)); + } + + public static void createFragileIce(@NotNull BlockModelGenerators generator) { + ResourceLocation leastCrackedModelId = generator.createSuffixedVariant(WWBlocks.FRAGILE_ICE, "_0", ModelTemplates.CUBE_ALL, TextureMapping::cube); + + generator.blockStateOutput + .accept( + MultiVariantGenerator.multiVariant(WWBlocks.FRAGILE_ICE) + .with( + PropertyDispatch.property(BlockStateProperties.AGE_2) + .select( + 0, + Variant.variant() + .with( + VariantProperties.MODEL, + leastCrackedModelId + ) + ) + .select( + 1, + Variant.variant() + .with( + VariantProperties.MODEL, + generator.createSuffixedVariant(WWBlocks.FRAGILE_ICE, "_1", ModelTemplates.CUBE_ALL, TextureMapping::cube) + ) + ) + .select( + 2, + Variant.variant() + .with( + VariantProperties.MODEL, + generator.createSuffixedVariant(WWBlocks.FRAGILE_ICE, "_2", ModelTemplates.CUBE_ALL, TextureMapping::cube) + ) + ) + ) + ); + + generator.modelOutput.accept(ModelLocationUtils.getModelLocation(WWBlocks.FRAGILE_ICE.asItem()), new DelegatedModel(leastCrackedModelId)); + } } diff --git a/src/main/java/net/frozenblock/wilderwild/datagen/model/WWModelProvider.java b/src/main/java/net/frozenblock/wilderwild/datagen/model/WWModelProvider.java index d26570e3e1..413344acfd 100644 --- a/src/main/java/net/frozenblock/wilderwild/datagen/model/WWModelProvider.java +++ b/src/main/java/net/frozenblock/wilderwild/datagen/model/WWModelProvider.java @@ -143,6 +143,9 @@ public void generateBlockStateModels(@NotNull BlockModelGenerators generator) { WWModelHelper.createNematocyst(generator, WWBlocks.BLUE_PEARLESCENT_NEMATOCYST); WWModelHelper.createNematocyst(generator, WWBlocks.PURPLE_PEARLESCENT_NEMATOCYST); + WWModelHelper.createFragileIce(generator); + WWModelHelper.createIcicle(generator); + WWModelHelper.createHollowedLog(generator, WWBlocks.HOLLOWED_OAK_LOG, WWBlocks.HOLLOWED_OAK_LOG, Blocks.STRIPPED_OAK_LOG, Blocks.OAK_LOG); WWModelHelper.createHollowedLog(generator, WWBlocks.HOLLOWED_SPRUCE_LOG, WWBlocks.HOLLOWED_SPRUCE_LOG, Blocks.STRIPPED_SPRUCE_LOG, Blocks.SPRUCE_LOG); WWModelHelper.createHollowedLog(generator, WWBlocks.HOLLOWED_BIRCH_LOG, WWBlocks.HOLLOWED_BIRCH_LOG, Blocks.STRIPPED_BIRCH_LOG, Blocks.BIRCH_LOG); @@ -185,6 +188,7 @@ public void generateItemModels(@NotNull ItemModelGenerators generator) { generator.generateFlatItem(WWBlocks.HANGING_TENDRIL.asItem(), ModelTemplates.FLAT_ITEM); generator.generateFlatItem(WWBlocks.CATTAIL.asItem(), ModelTemplates.FLAT_ITEM); generator.generateFlatItem(WWBlocks.SPONGE_BUD.asItem(), ModelTemplates.FLAT_ITEM); + generator.generateFlatItem(WWBlocks.ICICLE.asItem(), ModelTemplates.FLAT_ITEM); generator.generateFlatItem(WWItems.BAOBAB_NUT, ModelTemplates.FLAT_ITEM); generator.generateFlatItem(WWItems.COCONUT, ModelTemplates.FLAT_ITEM); diff --git a/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWBiomeTagProvider.java b/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWBiomeTagProvider.java index 3f7a11d22f..1da35ae6ec 100644 --- a/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWBiomeTagProvider.java +++ b/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWBiomeTagProvider.java @@ -1219,6 +1219,9 @@ private void generateFeatureTags() { this.getOrCreateTagBuilder(WWBiomeTags.HAS_CHERRY_FLOWERS) .add(Biomes.CHERRY_GROVE); + this.getOrCreateTagBuilder(WWBiomeTags.HAS_ICICLES) + .add(Biomes.ICE_SPIKES); + this.getOrCreateTagBuilder(WWBiomeTags.HAS_TUMBLEWEED_PLANT) .add(Biomes.DESERT) .add(Biomes.WINDSWEPT_SAVANNA) diff --git a/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWBlockTagProvider.java b/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWBlockTagProvider.java index 020b0dbcc8..e2f84c87c0 100644 --- a/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWBlockTagProvider.java +++ b/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWBlockTagProvider.java @@ -346,7 +346,7 @@ private void generateFeatures() { this.getOrCreateTagBuilder(WWBlockTags.RED_SCORCHED_SAND_FEATURE_REPLACEABLE) .add(Blocks.RED_SAND); - this.getOrCreateTagBuilder(WWBlockTags.ICE_FEATURE_REPLACEABLE) + this.getOrCreateTagBuilder(WWBlockTags.CAVE_ICE_REPLACEABLE) .add(Blocks.GRAVEL) .addOptionalTag(BlockTags.DIRT) .addOptionalTag(BlockTags.BASE_STONE_OVERWORLD) @@ -459,6 +459,16 @@ private void generateTags() { .add(WWBlocks.RED_NEMATOCYST) .add(WWBlocks.YELLOW_NEMATOCYST); + this.getOrCreateTagBuilder(WWBlockTags.ICICLE_FALLS_FROM) + .add(Blocks.ICE) + .add(WWBlocks.FRAGILE_ICE); + + this.getOrCreateTagBuilder(WWBlockTags.ICICLE_GROWS_WHEN_UNDER) + .add(Blocks.ICE) + .add(Blocks.PACKED_ICE) + .add(Blocks.BLUE_ICE) + .add(WWBlocks.FRAGILE_ICE); + this.getOrCreateTagBuilder(WWBlockTags.STOPS_TUMBLEWEED) .add(Blocks.MUD) .add(Blocks.MUDDY_MANGROVE_ROOTS) @@ -864,7 +874,10 @@ private void generateMinecraft() { .add(WWBlocks.MOSSY_GABBRO_BRICKS) .add(WWBlocks.MOSSY_GABBRO_BRICK_STAIRS) .add(WWBlocks.MOSSY_GABBRO_BRICK_SLAB) - .add(WWBlocks.MOSSY_GABBRO_BRICK_WALL); + .add(WWBlocks.MOSSY_GABBRO_BRICK_WALL) + + .add(WWBlocks.FRAGILE_ICE) + .add(WWBlocks.ICICLE); this.getOrCreateTagBuilder(BlockTags.MINEABLE_WITH_SHOVEL) .addOptionalTag(WWBlockTags.MESOGLEA) @@ -970,6 +983,15 @@ private void generateMinecraft() { .add(WWBlocks.MYCELIUM_GROWTH) .addOptionalTag(WWBlockTags.LEAF_LITTERS); + this.getOrCreateTagBuilder(BlockTags.GEODE_INVALID_BLOCKS) + .add(WWBlocks.FRAGILE_ICE); + + this.getOrCreateTagBuilder(BlockTags.SNOW_LAYER_CANNOT_SURVIVE_ON) + .add(WWBlocks.FRAGILE_ICE); + + this.getOrCreateTagBuilder(BlockTags.ICE) + .add(WWBlocks.FRAGILE_ICE); + this.getOrCreateTagBuilder(BlockTags.REPLACEABLE_BY_TREES) .add(WWBlocks.MYCELIUM_GROWTH) .add(WWBlocks.DATURA) @@ -1300,6 +1322,30 @@ private void generateWoods() { } private void generateSounds() { + this.getOrCreateTagBuilder(WWBlockTags.SOUND_MAGMA_BLOCK) + .add(Blocks.MAGMA_BLOCK); + + this.getOrCreateTagBuilder(WWBlockTags.SOUND_WITHER_ROSE) + .add(Blocks.WITHER_ROSE); + + this.getOrCreateTagBuilder(WWBlockTags.SOUND_SUGAR_CANE) + .add(Blocks.SUGAR_CANE); + + this.getOrCreateTagBuilder(WWBlockTags.SOUND_REINFORCED_DEEPSLATE) + .add(Blocks.REINFORCED_DEEPSLATE); + + this.getOrCreateTagBuilder(WWBlockTags.SOUND_PODZOL) + .add(Blocks.PODZOL); + + this.getOrCreateTagBuilder(WWBlockTags.SOUND_DEAD_BUSH) + .add(Blocks.DEAD_BUSH); + + this.getOrCreateTagBuilder(WWBlockTags.SOUND_CLAY) + .add(Blocks.CLAY); + + this.getOrCreateTagBuilder(WWBlockTags.SOUND_GRAVEL) + .add(Blocks.GRAVEL); + this.getOrCreateTagBuilder(WWBlockTags.SOUND_MELON) .add(Blocks.PUMPKIN) .add(Blocks.CARVED_PUMPKIN) @@ -1389,7 +1435,9 @@ private void generateSounds() { this.getOrCreateTagBuilder(WWBlockTags.SOUND_ICE) .add(Blocks.ICE) .add(Blocks.PACKED_ICE) - .add(Blocks.BLUE_ICE); + .add(Blocks.BLUE_ICE) + .add(WWBlocks.ICICLE) + .add(WWBlocks.FRAGILE_ICE); this.getOrCreateTagBuilder(WWBlockTags.SOUND_COARSE_DIRT) .add(Blocks.COARSE_DIRT) diff --git a/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWEntityTagProvider.java b/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWEntityTagProvider.java index 8a1c168f03..f6eb59fa1a 100644 --- a/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWEntityTagProvider.java +++ b/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWEntityTagProvider.java @@ -123,6 +123,32 @@ protected void addTags(@NotNull HolderLookup.Provider arg) { .add(EntityType.ARROW) .add(EntityType.SPECTRAL_ARROW); + this.getOrCreateTagBuilder(WWEntityTags.FRAGILE_ICE_WALKABLE_MOBS) + .add(EntityType.BAT) + .add(EntityType.BEE) + .add(EntityType.ALLAY) + .add(EntityType.COD) + .add(EntityType.SALMON) + .add(EntityType.TROPICAL_FISH) + .add(EntityType.AXOLOTL) + .add(EntityType.TURTLE) + .add(EntityType.PUFFERFISH) + .add(EntityType.SPIDER) + .add(EntityType.CAVE_SPIDER) + .add(EntityType.FROG) + .add(EntityType.STRAY) + .add(EntityType.VEX) + .add(WWEntityTypes.TUMBLEWEED) + .add(WWEntityTypes.CRAB) + .add(WWEntityTypes.JELLYFISH) + .add(WWEntityTypes.FIREFLY) + .add(WWEntityTypes.BUTTERFLY) + .addOptionalTag(EntityTypeTags.FREEZE_IMMUNE_ENTITY_TYPES) + .addOptionalTag(EntityTypeTags.POWDER_SNOW_WALKABLE_MOBS); + + this.getOrCreateTagBuilder(EntityTypeTags.FREEZE_IMMUNE_ENTITY_TYPES) + .add(WWEntityTypes.PENGUIN); + this.getOrCreateTagBuilder(EntityTypeTags.FROG_FOOD) .add(WWEntityTypes.BUTTERFLY); diff --git a/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWGameEventTagProvider.java b/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWGameEventTagProvider.java index a6b50258c1..860c58e45b 100644 --- a/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWGameEventTagProvider.java +++ b/src/main/java/net/frozenblock/wilderwild/datagen/tag/WWGameEventTagProvider.java @@ -20,6 +20,7 @@ import java.util.concurrent.CompletableFuture; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; +import net.frozenblock.wilderwild.registry.WWGameEvents; import net.frozenblock.wilderwild.tag.WWGameEventTags; import net.minecraft.core.HolderLookup; import net.minecraft.data.tags.GameEventTagsProvider; @@ -47,5 +48,10 @@ protected void addTags(@NotNull HolderLookup.Provider arg) { this.tag(WWGameEventTags.CRAB_CAN_DETECT) .addTag(WWGameEventTags.CRAB_CAN_ALWAYS_DETECT) .addOptionalTag(GameEventTags.VIBRATIONS.location()); + + this.tag(WWGameEventTags.MAKES_ICICLE_FALL) + .add(GameEvent.EXPLODE.key()) + .add(GameEvent.PROJECTILE_LAND.key()) + .add(WWGameEvents.BIG_FALL.key()); } } diff --git a/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/EntityMixin.java b/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/EntityMixin.java new file mode 100644 index 0000000000..b1fde98083 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/EntityMixin.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.mixin.block.ice; + +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import net.frozenblock.wilderwild.registry.WWGameEvents; +import net.minecraft.core.Holder; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.phys.Vec3; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; + +@Mixin(Entity.class) +public class EntityMixin { + + @Shadow + public float fallDistance; + + @WrapOperation( + method = "checkFallDamage", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/world/level/Level;gameEvent(Lnet/minecraft/core/Holder;Lnet/minecraft/world/phys/Vec3;Lnet/minecraft/world/level/gameevent/GameEvent$Context;)V" + ) + ) + private void wilderWild$bigFallGameEvent( + Level instance, Holder holder, Vec3 vec3, GameEvent.Context context, Operation original + ) { + original.call(instance, holder, vec3, context); + if (this.fallDistance >= 4F) { + original.call(instance, WWGameEvents.BIG_FALL, vec3, context); + } + } + +} diff --git a/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/FrostedIceBlockMixin.java b/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/FrostedIceBlockMixin.java index 39ff3dcb78..b2132e16bf 100644 --- a/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/FrostedIceBlockMixin.java +++ b/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/FrostedIceBlockMixin.java @@ -47,7 +47,7 @@ public class FrostedIceBlockMixin { private void wilderWild$slightlyMelt(BlockState blockState, Level level, BlockPos blockPos, CallbackInfoReturnable info) { if (WWBlockConfig.get().frostedIceCracking) { SoundType soundType = FrostedIceBlock.class.cast(this).getSoundType(blockState); - level.playSound(null, blockPos, soundType.getBreakSound(), SoundSource.BLOCKS, 0.003F, (soundType.getPitch() + 0.2F) + level.getRandom().nextFloat() * 0.2F); + level.playSound(null, blockPos, soundType.getBreakSound(), SoundSource.BLOCKS, 0.075F, (soundType.getPitch() + 0.2F) + level.getRandom().nextFloat() * 0.2F); } } @@ -75,7 +75,7 @@ public class FrostedIceBlockMixin { ); } SoundType soundType = FrostedIceBlock.class.cast(this).getSoundType(blockState); - level.playSound(null, blockPos, soundType.getBreakSound(), SoundSource.BLOCKS, 0.01F, soundType.getPitch()); + level.playSound(null, blockPos, soundType.getBreakSound(), SoundSource.BLOCKS, 0.15F, soundType.getPitch()); } } diff --git a/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/SpawnUtilStrategyMixin.java b/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/SpawnUtilStrategyMixin.java new file mode 100644 index 0000000000..d61f0069d1 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/SpawnUtilStrategyMixin.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.mixin.block.ice; + +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import net.frozenblock.wilderwild.registry.WWBlocks; +import net.minecraft.util.SpawnUtil; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import org.objectweb.asm.Opcodes; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Slice; + +@Mixin(SpawnUtil.Strategy.class) +public interface SpawnUtilStrategyMixin { + + @WrapOperation( + method = "method_44183", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/world/level/block/state/BlockState;is(Lnet/minecraft/world/level/block/Block;)Z", + ordinal = 0 + ), + slice = @Slice( + from = @At( + value = "FIELD", + target = "Lnet/minecraft/world/level/block/Blocks;ICE:Lnet/minecraft/world/level/block/Block;", + opcode = Opcodes.GETSTATIC + ) + ) + ) + private static boolean wilderWild$getBlockPathTypeRawWithPricklyPear(BlockState blockState, Block block, Operation operation) { + return operation.call(blockState, block) || operation.call(blockState, WWBlocks.FRAGILE_ICE); + } + +} diff --git a/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/WalkNodeEvaluatorMixin.java b/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/WalkNodeEvaluatorMixin.java new file mode 100644 index 0000000000..6a42010c17 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/mixin/block/ice/WalkNodeEvaluatorMixin.java @@ -0,0 +1,61 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.mixin.block.ice; + +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; +import net.frozenblock.wilderwild.registry.WWBlocks; +import net.frozenblock.wilderwild.registry.WWGameEvents; +import net.minecraft.core.Holder; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.gameevent.GameEvent; +import net.minecraft.world.level.pathfinder.WalkNodeEvaluator; +import net.minecraft.world.phys.Vec3; +import org.objectweb.asm.Opcodes; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Slice; + +@Mixin(WalkNodeEvaluator.class) +public class WalkNodeEvaluatorMixin { + + @WrapOperation( + method = "getPathTypeFromState", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/world/level/block/state/BlockState;is(Lnet/minecraft/world/level/block/Block;)Z", + ordinal = 0 + ), + slice = @Slice( + from = @At( + value = "FIELD", + target = "Lnet/minecraft/world/level/block/Blocks;POINTED_DRIPSTONE:Lnet/minecraft/world/level/block/Block;", + opcode = Opcodes.GETSTATIC + ) + ) + ) + private static boolean wilderWild$getBlockPathTypeRawWithIcicle(BlockState blockState, Block block, Operation operation) { + return operation.call(blockState, block) || operation.call(blockState, WWBlocks.ICICLE); + } + +} diff --git a/src/main/java/net/frozenblock/wilderwild/mod_compat/FrozenLibIntegration.java b/src/main/java/net/frozenblock/wilderwild/mod_compat/FrozenLibIntegration.java index 066d655afb..2f404a8518 100644 --- a/src/main/java/net/frozenblock/wilderwild/mod_compat/FrozenLibIntegration.java +++ b/src/main/java/net/frozenblock/wilderwild/mod_compat/FrozenLibIntegration.java @@ -29,6 +29,7 @@ import net.frozenblock.lib.advancement.api.AdvancementEvents; import net.frozenblock.lib.block.api.dripstone.DripstoneDripApi; import net.frozenblock.lib.block.api.entity.BlockEntityWithoutLevelRendererRegistry; +import net.frozenblock.lib.block.api.tick.BlockRandomTicks; import net.frozenblock.lib.block.api.tick.BlockScheduledTicks; import net.frozenblock.lib.block.sound.api.BlockSoundTypeOverwrites; import net.frozenblock.lib.block.storage.api.hopper.HopperApi; @@ -47,6 +48,7 @@ import net.frozenblock.lib.worldgen.structure.api.RandomPoolAliasApi; import net.frozenblock.lib.worldgen.structure.api.StructureProcessorApi; import net.frozenblock.wilderwild.WWConstants; +import net.frozenblock.wilderwild.block.IcicleBlock; import net.frozenblock.wilderwild.block.entity.GeyserBlockEntity; import net.frozenblock.wilderwild.config.WWAmbienceAndMiscConfig; import net.frozenblock.wilderwild.config.WWBlockConfig; @@ -137,7 +139,7 @@ private static Criterion inBiome(Holder ho @Override public void initPreFreeze() { WWConstants.log("FrozenLib pre-freeze mod integration ran!", WWConstants.UNSTABLE_LOGGING); - SpottingIconPredicate.register(WWConstants.id("stella"), entity -> entity.hasCustomName() && entity.getCustomName().getString().equalsIgnoreCase("stella")); + SpottingIconPredicate.register(WWConstants.id("stella"), entity ->entity.hasCustomName() && entity.getCustomName().getString().equalsIgnoreCase("stella")); SoundPredicate.register(INSTRUMENT_SOUND_PREDICATE, () -> new SoundPredicate.LoopPredicate() { private boolean firstCheck = true; @@ -268,6 +270,15 @@ public void init() { } ); + BlockRandomTicks.addToBlock( + Blocks.ICE, + (blockState, serverLevel, blockPos, randomSource) -> { + if (IcicleBlock.isValidWaterForGrowing(serverLevel.getBlockState(blockPos.above()))) { + + } + } + ); + WindManager.addExtension(WWWindManager::new); RemovableItemTags.register("wilderwild_is_ancient", (level, entity, slot, selected) -> true, true); @@ -283,15 +294,14 @@ public void init() { BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_SANDSTONE, WWSoundTypes.SANDSTONE, () -> WWBlockConfig.get().blockSounds.sandstoneSounds); BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_LILY_PAD, WWSoundTypes.LILY_PAD, () -> WWBlockConfig.get().blockSounds.lilyPadSounds); BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_MELON, WWSoundTypes.MELON, () -> WWBlockConfig.get().blockSounds.melonSounds); - - BlockSoundTypeOverwrites.addBlock(Blocks.CLAY, WWSoundTypes.CLAY, () -> WWBlockConfig.get().blockSounds.claySounds); - BlockSoundTypeOverwrites.addBlock(Blocks.DEAD_BUSH, SoundType.NETHER_SPROUTS, () -> WWBlockConfig.get().blockSounds.deadBushSounds); - BlockSoundTypeOverwrites.addBlock(Blocks.GRAVEL, WWSoundTypes.GRAVEL, () -> WWBlockConfig.get().blockSounds.gravelSounds); - BlockSoundTypeOverwrites.addBlock(Blocks.PODZOL, SoundType.ROOTED_DIRT, () -> WWBlockConfig.get().blockSounds.podzolSounds); - BlockSoundTypeOverwrites.addBlock(Blocks.REINFORCED_DEEPSLATE, WWSoundTypes.REINFORCED_DEEPSLATE, () -> WWBlockConfig.get().blockSounds.reinforcedDeepslateSounds); - BlockSoundTypeOverwrites.addBlock(Blocks.SUGAR_CANE, WWSoundTypes.SUGARCANE, () -> WWBlockConfig.get().blockSounds.sugarCaneSounds); - BlockSoundTypeOverwrites.addBlock(Blocks.WITHER_ROSE, SoundType.SWEET_BERRY_BUSH, () -> WWBlockConfig.get().blockSounds.witherRoseSounds); - BlockSoundTypeOverwrites.addBlock(Blocks.MAGMA_BLOCK, WWSoundTypes.MAGMA, () -> WWBlockConfig.get().blockSounds.magmaSounds); + BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_GRAVEL, WWSoundTypes.GRAVEL, () -> WWBlockConfig.get().blockSounds.gravelSounds); + BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_CLAY, WWSoundTypes.CLAY, () -> WWBlockConfig.get().blockSounds.claySounds); + BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_DEAD_BUSH, SoundType.NETHER_SPROUTS, () -> WWBlockConfig.get().blockSounds.deadBushSounds); + BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_PODZOL, SoundType.ROOTED_DIRT, () -> WWBlockConfig.get().blockSounds.podzolSounds); + BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_REINFORCED_DEEPSLATE, WWSoundTypes.REINFORCED_DEEPSLATE, () -> WWBlockConfig.get().blockSounds.reinforcedDeepslateSounds); + BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_SUGAR_CANE, WWSoundTypes.SUGARCANE, () -> WWBlockConfig.get().blockSounds.sugarCaneSounds); + BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_WITHER_ROSE, SoundType.SWEET_BERRY_BUSH, () -> WWBlockConfig.get().blockSounds.witherRoseSounds); + BlockSoundTypeOverwrites.addBlockTag(WWBlockTags.SOUND_MAGMA_BLOCK, WWSoundTypes.MAGMA, () -> WWBlockConfig.get().blockSounds.magmaSounds); WolfVariantBiomeRegistry.register(WWBiomes.SNOWY_DYING_MIXED_FOREST, WolfVariants.ASHEN); WolfVariantBiomeRegistry.register(WWBiomes.RAINFOREST, WolfVariants.WOODS); diff --git a/src/main/java/net/frozenblock/wilderwild/registry/WWBlockEntityTypes.java b/src/main/java/net/frozenblock/wilderwild/registry/WWBlockEntityTypes.java index ec3f6e2d85..5b0bdb2e18 100644 --- a/src/main/java/net/frozenblock/wilderwild/registry/WWBlockEntityTypes.java +++ b/src/main/java/net/frozenblock/wilderwild/registry/WWBlockEntityTypes.java @@ -23,6 +23,7 @@ import net.frozenblock.wilderwild.block.entity.DisplayLanternBlockEntity; import net.frozenblock.wilderwild.block.entity.GeyserBlockEntity; import net.frozenblock.wilderwild.block.entity.HangingTendrilBlockEntity; +import net.frozenblock.wilderwild.block.entity.IcicleBlockEntity; import net.frozenblock.wilderwild.block.entity.ScorchedBlockEntity; import net.frozenblock.wilderwild.block.entity.StoneChestBlockEntity; import net.frozenblock.wilderwild.block.entity.TermiteMoundBlockEntity; @@ -55,5 +56,6 @@ private static BlockEntityType register(@NotNull Stri public static final BlockEntityType STONE_CHEST = register("stone_chest", BlockEntityType.Builder.of(StoneChestBlockEntity::new, WWBlocks.STONE_CHEST)); public static final BlockEntityType SCORCHED_BLOCK = register("scorched_block", BlockEntityType.Builder.of(ScorchedBlockEntity::new, WWBlocks.SCORCHED_SAND, WWBlocks.SCORCHED_RED_SAND)); public static final BlockEntityType GEYSER = register("geyser", BlockEntityType.Builder.of(GeyserBlockEntity::new, WWBlocks.GEYSER)); + public static final BlockEntityType ICICLE = register("icicle", BlockEntityType.Builder.of(IcicleBlockEntity::new, WWBlocks.ICICLE)); } diff --git a/src/main/java/net/frozenblock/wilderwild/registry/WWBlocks.java b/src/main/java/net/frozenblock/wilderwild/registry/WWBlocks.java index 52f172ccd3..c8d562f38e 100644 --- a/src/main/java/net/frozenblock/wilderwild/registry/WWBlocks.java +++ b/src/main/java/net/frozenblock/wilderwild/registry/WWBlocks.java @@ -46,11 +46,13 @@ import net.frozenblock.wilderwild.block.DisplayLanternBlock; import net.frozenblock.wilderwild.block.EchoGlassBlock; import net.frozenblock.wilderwild.block.FloweringWaterlilyBlock; +import net.frozenblock.wilderwild.block.FragileIceBlock; import net.frozenblock.wilderwild.block.FrozenDoublePlantBlock; import net.frozenblock.wilderwild.block.FrozenTallGrassBlock; import net.frozenblock.wilderwild.block.GeyserBlock; import net.frozenblock.wilderwild.block.HangingTendrilBlock; import net.frozenblock.wilderwild.block.HollowedLogBlock; +import net.frozenblock.wilderwild.block.IcicleBlock; import net.frozenblock.wilderwild.block.LeafLitterBlock; import net.frozenblock.wilderwild.block.LeavesWithLitterBlock; import net.frozenblock.wilderwild.block.MesogleaBlock; @@ -101,6 +103,7 @@ import net.minecraft.sounds.SoundEvents; import net.minecraft.util.RandomSource; import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.entity.EntityType; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.CreativeModeTabs; @@ -1256,6 +1259,24 @@ public final class WWBlocks { .mapColor(MAPLE_BARK_COLOR) ); + public static final FragileIceBlock FRAGILE_ICE = new FragileIceBlock( + BlockBehaviour.Properties.ofFullCopy(Blocks.ICE) + ); + + public static final IcicleBlock ICICLE = new IcicleBlock( + BlockBehaviour.Properties.of().mapColor(MapColor.ICE) + .forceSolidOn() + .friction(0.98F) + .randomTicks() + .strength(0.5F) + .sound(SoundType.GLASS) + .noOcclusion() + .dynamicShape() + .offsetType(BlockBehaviour.OffsetType.XZ) + .pushReaction(PushReaction.DESTROY) + .isRedstoneConductor(Blocks::never) + ); + private WWBlocks() { throw new UnsupportedOperationException("WWBlocks contains only static declarations."); } @@ -1559,6 +1580,9 @@ public static void registerMisc() { registerBlockAfter(RED_NEMATOCYST, "yellow_nematocyst", YELLOW_NEMATOCYST, CreativeModeTabs.NATURAL_BLOCKS); registerBlockAfter(YELLOW_NEMATOCYST, "lime_nematocyst", LIME_NEMATOCYST, CreativeModeTabs.NATURAL_BLOCKS); + registerBlockAfter(Items.ICE, "fragile_ice", FRAGILE_ICE, CreativeModeTabs.NATURAL_BLOCKS); + registerBlockAfter(Items.BLUE_ICE, "icicle", ICICLE, CreativeModeTabs.NATURAL_BLOCKS); + registerBlockAfter(Items.MAGMA_BLOCK, "geyser", GEYSER, CreativeModeTabs.NATURAL_BLOCKS, CreativeModeTabs.FUNCTIONAL_BLOCKS); registerBlockBefore(Items.SCULK_SENSOR, "geyser", GEYSER, CreativeModeTabs.REDSTONE_BLOCKS); diff --git a/src/main/java/net/frozenblock/wilderwild/registry/WWFeatures.java b/src/main/java/net/frozenblock/wilderwild/registry/WWFeatures.java index 557be9217b..38b03be3f6 100644 --- a/src/main/java/net/frozenblock/wilderwild/registry/WWFeatures.java +++ b/src/main/java/net/frozenblock/wilderwild/registry/WWFeatures.java @@ -22,6 +22,8 @@ import net.frozenblock.wilderwild.WWConstants; import net.frozenblock.wilderwild.worldgen.impl.features.AlgaeFeature; import net.frozenblock.wilderwild.worldgen.impl.features.CattailFeature; +import net.frozenblock.wilderwild.worldgen.impl.features.IcicleClusterFeature; +import net.frozenblock.wilderwild.worldgen.impl.features.IcicleFeature; import net.frozenblock.wilderwild.worldgen.impl.features.LargeMesogleaFeature; import net.frozenblock.wilderwild.worldgen.impl.features.NematocystFeature; import net.frozenblock.wilderwild.worldgen.impl.features.PalmTreeFeature; @@ -31,6 +33,8 @@ import net.frozenblock.wilderwild.worldgen.impl.features.SpongeBudFeature; import net.frozenblock.wilderwild.worldgen.impl.features.config.AlgaeFeatureConfig; import net.frozenblock.wilderwild.worldgen.impl.features.config.CattailFeatureConfig; +import net.frozenblock.wilderwild.worldgen.impl.features.config.IcicleClusterConfig; +import net.frozenblock.wilderwild.worldgen.impl.features.config.IcicleConfig; import net.frozenblock.wilderwild.worldgen.impl.features.config.LargeMesogleaConfig; import net.frozenblock.wilderwild.worldgen.impl.features.config.ShelfFungiFeatureConfig; import net.frozenblock.wilderwild.worldgen.impl.features.config.SnowAndIceDiskFeatureConfig; @@ -96,6 +100,8 @@ public class WWFeatures { public static final AlgaeFeature ALGAE_FEATURE = register("algae_feature", new AlgaeFeature(AlgaeFeatureConfig.CODEC)); public static final NematocystFeature NEMATOCYST_FEATURE = register("nematocyst_feature", new NematocystFeature(MultifaceGrowthConfiguration.CODEC)); public static final LargeMesogleaFeature LARGE_MESOGLEA_FEATURE = register("large_mesoglea_feature", new LargeMesogleaFeature(LargeMesogleaConfig.CODEC)); + public static final Feature ICICLE_CLUSTER_FEATURE = register("icicle_cluster_feature", new IcicleClusterFeature(IcicleClusterConfig.CODEC)); + public static final Feature ICICLE_FEATURE = register("icicle_feature", new IcicleFeature(IcicleConfig.CODEC)); public static final SnowBlanketFeature SNOW_BLANKET_FEATURE = register("snow_blanket_feature", new SnowBlanketFeature(NoneFeatureConfiguration.CODEC)); public static final SnowAndFreezeDiskFeature SNOW_AND_FREEZE_DISK_FEATURE = register("snow_and_freeze_disk_feature", new SnowAndFreezeDiskFeature(SnowAndIceDiskFeatureConfig.CODEC)); public static final PalmTreeFeature PALM_TREE_FEATURE = register("palm_tree", new PalmTreeFeature(TreeConfiguration.CODEC)); diff --git a/src/main/java/net/frozenblock/wilderwild/registry/WWGameEvents.java b/src/main/java/net/frozenblock/wilderwild/registry/WWGameEvents.java index 4fe4ac4620..30979a66ae 100644 --- a/src/main/java/net/frozenblock/wilderwild/registry/WWGameEvents.java +++ b/src/main/java/net/frozenblock/wilderwild/registry/WWGameEvents.java @@ -28,6 +28,7 @@ public final class WWGameEvents { public static final Reference SCULK_SENSOR_ACTIVATE = register("sculk_sensor_activate"); + public static final Reference BIG_FALL = register("big_fall"); private WWGameEvents() { throw new UnsupportedOperationException("WWGameEvents contains only static declarations."); diff --git a/src/main/java/net/frozenblock/wilderwild/tag/WWBiomeTags.java b/src/main/java/net/frozenblock/wilderwild/tag/WWBiomeTags.java index e7e1f98d6a..de22acc147 100644 --- a/src/main/java/net/frozenblock/wilderwild/tag/WWBiomeTags.java +++ b/src/main/java/net/frozenblock/wilderwild/tag/WWBiomeTags.java @@ -95,6 +95,7 @@ public final class WWBiomeTags { public static final TagKey HAS_FROZEN_PLAIN_TALL_GRASS = bind("feature/has_frozen_plain_tall_grass"); public static final TagKey HAS_FROZEN_LARGE_FERNS = bind("feature/has_frozen_large_ferns"); + public static final TagKey HAS_ICICLES = bind("feature/has_icicles"); public static final TagKey HAS_TUMBLEWEED_PLANT = bind("feature/has_tumbleweed_plant"); public static final TagKey NON_FROZEN_PLAINS = bind("non_frozen_plains"); public static final TagKey SWAMP_TREES = bind("feature/swamp_trees"); diff --git a/src/main/java/net/frozenblock/wilderwild/tag/WWBlockTags.java b/src/main/java/net/frozenblock/wilderwild/tag/WWBlockTags.java index e8e0415044..7b84d0827c 100644 --- a/src/main/java/net/frozenblock/wilderwild/tag/WWBlockTags.java +++ b/src/main/java/net/frozenblock/wilderwild/tag/WWBlockTags.java @@ -37,6 +37,14 @@ public final class WWBlockTags { public static final TagKey SOUND_SANDSTONE = bind("sound/sandstone"); public static final TagKey SOUND_LILY_PAD = bind("sound/lily_pad"); public static final TagKey SOUND_MELON = bind("sound/melon"); + public static final TagKey SOUND_GRAVEL = bind("sound/gravel"); + public static final TagKey SOUND_CLAY = bind("sound/clay"); + public static final TagKey SOUND_DEAD_BUSH = bind("sound/dead_bush"); + public static final TagKey SOUND_PODZOL = bind("sound/podzol"); + public static final TagKey SOUND_REINFORCED_DEEPSLATE = bind("sound/reinforced_deepslate"); + public static final TagKey SOUND_SUGAR_CANE = bind("sound/sugar_cane"); + public static final TagKey SOUND_WITHER_ROSE = bind("sound/wither_rose"); + public static final TagKey SOUND_MAGMA_BLOCK = bind("sound/magma_block"); public static final TagKey HOLLOWED_LOGS = bind("hollowed_logs"); public static final TagKey HOLLOWED_LOGS_DONT_BURN = bind("hollowed_logs_dont_burn"); @@ -81,6 +89,9 @@ public final class WWBlockTags { public static final TagKey KILLS_TERMITE = bind("kills_termite"); public static final TagKey BLOCKS_TERMITE = bind("blocks_termite"); + public static final TagKey ICICLE_FALLS_FROM = bind("icicle_falls_from"); + public static final TagKey ICICLE_GROWS_WHEN_UNDER = bind("icicle_grows_when_under"); + public static final TagKey ANCIENT_CITY_BLOCKS = bind("ancient_city_blocks"); public static final TagKey SCULK_SLAB_REPLACEABLE_WORLDGEN = bind("sculk_slab_replaceable_worldgen"); public static final TagKey SCULK_STAIR_REPLACEABLE_WORLDGEN = bind("sculk_stair_replaceable_worldgen"); @@ -156,7 +167,7 @@ public final class WWBlockTags { public static final TagKey RED_SCORCHED_SAND_FEATURE_INNER_REPLACEABLE = bind("feature/red_scorched_sand_feature_inner_replaceable"); public static final TagKey RED_SCORCHED_SAND_FEATURE_REPLACEABLE = bind("feature/red_scorched_sand_feature_replaceable"); public static final TagKey DIORITE_ICE_REPLACEABLE = bind("feature/diorite_ice_replaceable"); - public static final TagKey ICE_FEATURE_REPLACEABLE = bind("feature/ice_feature_replaceable"); + public static final TagKey CAVE_ICE_REPLACEABLE = bind("feature/cave_ice_replaceable"); public static final TagKey MESOGLEA_PATH_REPLACEABLE = bind("feature/mesoglea_path_replaceable"); public static final TagKey MAGMA_REPLACEABLE = bind("feature/magma_replaceable"); public static final TagKey NETHER_GEYSER_REPLACEABLE = bind("feature/nether_geyser_replaceable"); diff --git a/src/main/java/net/frozenblock/wilderwild/tag/WWEntityTags.java b/src/main/java/net/frozenblock/wilderwild/tag/WWEntityTags.java index 8ecad156df..4469fe0f7e 100644 --- a/src/main/java/net/frozenblock/wilderwild/tag/WWEntityTags.java +++ b/src/main/java/net/frozenblock/wilderwild/tag/WWEntityTags.java @@ -35,6 +35,7 @@ public final class WWEntityTags { public static final TagKey> COCONUT_CANT_SPLIT = bind("coconut_cant_split"); public static final TagKey> TUMBLEWEED_PASSES_THROUGH = bind("tumbleweed_passes_through"); public static final TagKey> GEYSER_PUSHES_FURTHER = bind("geyser_pushes_further"); + public static final TagKey> FRAGILE_ICE_WALKABLE_MOBS = bind("fragile_ice_walkable_mobs"); private WWEntityTags() { throw new UnsupportedOperationException("WilderEntityTags contains only static declarations."); diff --git a/src/main/java/net/frozenblock/wilderwild/tag/WWGameEventTags.java b/src/main/java/net/frozenblock/wilderwild/tag/WWGameEventTags.java index 13965571b9..5b599900c3 100644 --- a/src/main/java/net/frozenblock/wilderwild/tag/WWGameEventTags.java +++ b/src/main/java/net/frozenblock/wilderwild/tag/WWGameEventTags.java @@ -25,9 +25,9 @@ import org.jetbrains.annotations.NotNull; public final class WWGameEventTags { - public static final TagKey CRAB_CAN_DETECT = bind("crab_can_detect"); public static final TagKey CRAB_CAN_ALWAYS_DETECT = bind("crab_can_always_detect"); + public static final TagKey MAKES_ICICLE_FALL = bind("makes_icicle_fall"); private WWGameEventTags() { throw new UnsupportedOperationException("WilderGameEventTags contains only static declarations."); diff --git a/src/main/java/net/frozenblock/wilderwild/worldgen/biome/FrozenCaves.java b/src/main/java/net/frozenblock/wilderwild/worldgen/biome/FrozenCaves.java index 1b0ee1c4d0..9f665baa6c 100644 --- a/src/main/java/net/frozenblock/wilderwild/worldgen/biome/FrozenCaves.java +++ b/src/main/java/net/frozenblock/wilderwild/worldgen/biome/FrozenCaves.java @@ -158,20 +158,17 @@ public void addFeatures(@NotNull BiomeGenerationSettings.Builder features) { BiomeDefaultFeatures.addDefaultExtraVegetation(features); BiomeDefaultFeatures.addDefaultCarversAndLakes(features); features.addFeature(GenerationStep.Decoration.UNDERGROUND_ORES, WWCavePlaced.ORE_DIORITE_EXTRA.getKey()); + features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.FRAGILE_ICE_DISK.getKey()); features.addFeature(GenerationStep.Decoration.LOCAL_MODIFICATIONS, WWCavePlaced.PACKED_ICE_PATH.getKey()); - features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.SNOW_DISK_UPPER.getKey()); - features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.POWDER_SNOW_DISK_UPPER.getKey()); - features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.SNOW_DISK_LOWER.getKey()); - features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.POWDER_SNOW_DISK_LOWER.getKey()); features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.PACKED_ICE_DISK.getKey()); - features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.ICE_PILE.getKey()); - features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.ICE_DISK.getKey()); - features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.ICICLE_PATCH.getKey()); + features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.FRAGILE_ICE_PILE.getKey()); + features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.HANGING_PACKED_ICE.getKey()); features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.ICE_PATCH_CEILING.getKey()); - features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.ICE_COLUMN_PATCH.getKey()); - features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.ICE_PATCH.getKey()); + features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.FRAGILE_ICE_COLUMN_PATCH.getKey()); + features.addFeature(GenerationStep.Decoration.UNDERGROUND_DECORATION, WWCavePlaced.FRAGILE_ICE_PATCH.getKey()); features.addFeature(GenerationStep.Decoration.TOP_LAYER_MODIFICATION, WWCavePlaced.DIORITE_PATCH.getKey()); features.addFeature(GenerationStep.Decoration.TOP_LAYER_MODIFICATION, WWCavePlaced.DIORITE_PATCH_CEILING.getKey()); + features.addFeature(GenerationStep.Decoration.LOCAL_MODIFICATIONS, WWCavePlaced.ICICLE_CLUSTER.getKey()); } @Override diff --git a/src/main/java/net/frozenblock/wilderwild/worldgen/feature/configured/WWCaveConfigured.java b/src/main/java/net/frozenblock/wilderwild/worldgen/feature/configured/WWCaveConfigured.java index 256f694768..3e0fa4bb9b 100644 --- a/src/main/java/net/frozenblock/wilderwild/worldgen/feature/configured/WWCaveConfigured.java +++ b/src/main/java/net/frozenblock/wilderwild/worldgen/feature/configured/WWCaveConfigured.java @@ -35,6 +35,8 @@ import net.frozenblock.wilderwild.tag.WWBlockTags; import net.frozenblock.wilderwild.worldgen.feature.WWFeatureUtils; import static net.frozenblock.wilderwild.worldgen.feature.WWFeatureUtils.register; +import net.frozenblock.wilderwild.worldgen.impl.features.config.IcicleClusterConfig; +import net.frozenblock.wilderwild.worldgen.impl.features.config.IcicleConfig; import net.frozenblock.wilderwild.worldgen.impl.features.config.LargeMesogleaConfig; import net.minecraft.core.Direction; import net.minecraft.core.HolderSet; @@ -65,8 +67,10 @@ import net.minecraft.world.level.levelgen.feature.configurations.RandomFeatureConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.RandomPatchConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.SimpleBlockConfiguration; +import net.minecraft.world.level.levelgen.feature.configurations.SimpleRandomFeatureConfiguration; import net.minecraft.world.level.levelgen.feature.configurations.VegetationPatchConfiguration; import net.minecraft.world.level.levelgen.feature.stateproviders.BlockStateProvider; +import net.minecraft.world.level.levelgen.feature.stateproviders.SimpleStateProvider; import net.minecraft.world.level.levelgen.feature.stateproviders.WeightedStateProvider; import net.minecraft.world.level.levelgen.placement.CaveSurface; import net.minecraft.world.level.levelgen.placement.EnvironmentScanPlacement; @@ -124,25 +128,27 @@ public final class WWCaveConfigured { public static final FrozenLibConfiguredFeature> UPSIDE_DOWN_MAGMA = WWFeatureUtils.register("upside_down_magma"); // FROZEN CAVES + public static final FrozenLibConfiguredFeature> ICICLE_CLUSTER = register("icicle_cluster"); + public static final FrozenLibConfiguredFeature> CAVE_ICICLE = register("cave_icicle"); + public static final FrozenLibConfiguredFeature> ICICLE = register("icicle"); public static final FrozenLibConfiguredFeature> PACKED_ICE_PATH = register("packed_ice_path"); public static final FrozenLibConfiguredFeature> PACKED_ICE_DISK = register("packed_ice_disk"); public static final FrozenLibConfiguredFeature> PACKED_ICE_COLUMN = register("packed_ice_column"); public static final FrozenLibConfiguredFeature> DOWNWARDS_PACKED_ICE_COLUMN = register("downwards_packed_ice_column"); public static final FrozenLibConfiguredFeature> PACKED_ICE_BIG_COLUMN = register("packed_ice_big_column"); - public static final FrozenLibConfiguredFeature> ICE_DISK = register("ice_disk"); - public static final FrozenLibConfiguredFeature> ICE_COLUMN = register("ice_column"); - public static final FrozenLibConfiguredFeature> SMALL_ICE_COLUMN = register("small_ice_column"); - public static final FrozenLibConfiguredFeature> DOWNWARDS_ICE_COLUMN = register("downwards_ice_column"); - public static final FrozenLibConfiguredFeature> SMALL_DOWNWARDS_ICE_COLUMN = register("small_downwards_ice_column"); - public static final FrozenLibConfiguredFeature> ICE_PILE = register("ice_pile"); - public static final FrozenLibConfiguredFeature> SNOW_DISK = register("snow_disk"); - public static final FrozenLibConfiguredFeature> POWDER_SNOW_DISK = register("powder_snow_disk"); - public static final FrozenLibConfiguredFeature> HANGING_ICICLES = WWFeatureUtils.register("hanging_icicles"); + public static final FrozenLibConfiguredFeature> FRAGILE_ICE_BIG_COLUMN = register("fragile_ice_big_column"); + public static final FrozenLibConfiguredFeature> FRAGILE_ICE_DISK = register("fragile_ice_disk"); + public static final FrozenLibConfiguredFeature> FRAGILE_ICE_COLUMN = register("fragile_ice_column"); + public static final FrozenLibConfiguredFeature> SMALL_FRAGILE_ICE_COLUMN = register("small_fragile_ice_column"); + public static final FrozenLibConfiguredFeature> DOWNWARDS_FRAGILE_ICE_COLUMN = register("downwards_fragile_ice_column"); + public static final FrozenLibConfiguredFeature> SMALL_DOWNWARDS_FRAGILE_ICE_COLUMN = register("small_downwards_fragile_ice_column"); + public static final FrozenLibConfiguredFeature> FRAGILE_ICE_PILE = register("fragile_ice_pile"); + public static final FrozenLibConfiguredFeature> HANGING_ICE = WWFeatureUtils.register("hanging_ice"); public static final FrozenLibConfiguredFeature> ICE_COLUMNS = WWFeatureUtils.register("ice_columns"); - public static final FrozenLibConfiguredFeature> ICICLE_PATCH = WWFeatureUtils.register("icicle_patch"); + public static final FrozenLibConfiguredFeature> HANGING_PACKED_ICE = WWFeatureUtils.register("hanging_packed_ice"); public static final FrozenLibConfiguredFeature> ICE_PATCH_CEILING = WWFeatureUtils.register("ice_patch_ceiling"); - public static final FrozenLibConfiguredFeature> ICE_COLUMN_PATCH = WWFeatureUtils.register("ice_column_patch"); - public static final FrozenLibConfiguredFeature> ICE_PATCH = WWFeatureUtils.register("ice_patch"); + public static final FrozenLibConfiguredFeature> FRAGILE_ICE_COLUMN_PATCH = WWFeatureUtils.register("fragile_ice_column_patch"); + public static final FrozenLibConfiguredFeature> FRAGILE_ICE_PATCH = WWFeatureUtils.register("fragile_ice_patch"); public static final FrozenLibConfiguredFeature> DIORITE_PATCH = WWFeatureUtils.register("diorite_patch"); public static final FrozenLibConfiguredFeature> DIORITE_PATCH_CEILING = WWFeatureUtils.register("diorite_patch_ceiling"); @@ -828,6 +834,59 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati // FROZEN CAVES + ICICLE_CLUSTER.makeAndSetHolder(WWFeatures.ICICLE_CLUSTER_FEATURE, + new IcicleClusterConfig( + 12, + UniformInt.of(2, 5), + UniformInt.of(2, 6), + 1, + 3, + UniformInt.of(2, 5), + UniformFloat.of(0.3F, 0.7F), + 0.1F, + 3, + 8 + ) + ); + + CAVE_ICICLE.makeAndSetHolder(Feature.SIMPLE_RANDOM_SELECTOR, + new SimpleRandomFeatureConfiguration( + HolderSet.direct( + PlacementUtils.inlinePlaced( + WWFeatures.ICICLE_FEATURE, + new IcicleConfig(0.2F, 0.7F, 0.5F, 0.5F, true), + EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_OR_WATER_PREDICATE, 12), + RandomOffsetPlacement.vertical(ConstantInt.of(1)) + ), + PlacementUtils.inlinePlaced( + WWFeatures.ICICLE_FEATURE, + new IcicleConfig(0.2F, 0.7F, 0.5F, 0.5F, true), + EnvironmentScanPlacement.scanningFor(Direction.UP, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_OR_WATER_PREDICATE, 12), + RandomOffsetPlacement.vertical(ConstantInt.of(-1)) + ) + ) + ) + ); + + ICICLE.makeAndSetHolder(Feature.SIMPLE_RANDOM_SELECTOR, + new SimpleRandomFeatureConfiguration( + HolderSet.direct( + PlacementUtils.inlinePlaced( + WWFeatures.ICICLE_FEATURE, + new IcicleConfig(0.3F, 0.7F, 0.5F, 0.5F, false), + EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_OR_WATER_PREDICATE, 12), + RandomOffsetPlacement.vertical(ConstantInt.of(1)) + ), + PlacementUtils.inlinePlaced( + WWFeatures.ICICLE_FEATURE, + new IcicleConfig(0.3F, 0.7F, 0.5F, 0.5F, false), + EnvironmentScanPlacement.scanningFor(Direction.UP, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_OR_WATER_PREDICATE, 12), + RandomOffsetPlacement.vertical(ConstantInt.of(-1)) + ) + ) + ) + ); + PACKED_ICE_PATH.makeAndSetHolder(FrozenLibFeatures.COMBO_FEATURE, new ComboFeatureConfig( List.of( @@ -846,7 +905,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati true, new HolderSet.Named<>( BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE + WWBlockTags.CAVE_ICE_REPLACEABLE ), 1F ) @@ -866,7 +925,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati true, new HolderSet.Named<>( BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE + WWBlockTags.CAVE_ICE_REPLACEABLE ), 1F ) @@ -886,7 +945,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati true, new HolderSet.Named<>( BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE + WWBlockTags.CAVE_ICE_REPLACEABLE ), 1F ) @@ -907,11 +966,33 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati 0.675F, new HolderSet.Named<>( BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE + WWBlockTags.CAVE_ICE_REPLACEABLE ), new HolderSet.Named<>( BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE + WWBlockTags.CAVE_ICE_REPLACEABLE + ), + Heightmap.Types.OCEAN_FLOOR_WG + ) + ); + + FRAGILE_ICE_DISK.makeAndSetHolder(FrozenLibFeatures.FADING_DISK_FEATURE, + new FadingDiskFeatureConfig( + false, + BlockStateProvider.simple(WWBlocks.FRAGILE_ICE), + BlockStateProvider.simple(WWBlocks.FRAGILE_ICE), + UniformInt.of(4, 8), + 0.8F, + 0.7F, + 0.325F, + 0.675F, + new HolderSet.Named<>( + BuiltInRegistries.BLOCK.holderOwner(), + WWBlockTags.CAVE_ICE_REPLACEABLE + ), + new HolderSet.Named<>( + BuiltInRegistries.BLOCK.holderOwner(), + WWBlockTags.CAVE_ICE_REPLACEABLE ), Heightmap.Types.OCEAN_FLOOR_WG ) @@ -1078,35 +1159,80 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati ) ); - ICE_DISK.makeAndSetHolder(FrozenLibFeatures.FADING_DISK_FEATURE, - new FadingDiskFeatureConfig( - false, - BlockStateProvider.simple(Blocks.ICE), - BlockStateProvider.simple(Blocks.ICE), - UniformInt.of(2, 5), - 0.8F, - 0.7F, - 0.325F, - 0.675F, - new HolderSet.Named<>( - BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE - ), - new HolderSet.Named<>( - BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE - ), - Heightmap.Types.OCEAN_FLOOR_WG + FRAGILE_ICE_BIG_COLUMN.makeAndSetHolder(FrozenLibFeatures.COMBO_FEATURE, + new ComboFeatureConfig( + List.of( + PlacementUtils.inlinePlaced( + FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, + new ColumnFeatureConfig( + WWBlocks.FRAGILE_ICE.defaultBlockState(), + UniformInt.of(2, 9), + HolderSet.direct() + ), + RandomOffsetPlacement.horizontal(UniformInt.of(-1, 1)), + EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12) + ), + PlacementUtils.inlinePlaced( + FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, + new ColumnFeatureConfig( + WWBlocks.FRAGILE_ICE.defaultBlockState(), + UniformInt.of(0, 4), + HolderSet.direct() + ), + RandomOffsetPlacement.horizontal(UniformInt.of(-1, 1)), + EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12) + ), + PlacementUtils.inlinePlaced( + FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, + new ColumnFeatureConfig( + WWBlocks.FRAGILE_ICE.defaultBlockState(), + UniformInt.of(0, 4), + HolderSet.direct() + ), + RandomOffsetPlacement.horizontal(UniformInt.of(-1, 1)), + EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12) + ), + PlacementUtils.inlinePlaced( + FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, + new ColumnFeatureConfig( + WWBlocks.FRAGILE_ICE.defaultBlockState(), + UniformInt.of(0, 4), + HolderSet.direct() + ), + RandomOffsetPlacement.horizontal(UniformInt.of(-1, 1)), + EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12) + ), + PlacementUtils.inlinePlaced( + FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, + new ColumnFeatureConfig( + WWBlocks.FRAGILE_ICE.defaultBlockState(), + UniformInt.of(0, 4), + HolderSet.direct() + ), + RandomOffsetPlacement.horizontal(UniformInt.of(-1, 1)), + EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12) + ), + PlacementUtils.inlinePlaced( + FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, + new ColumnFeatureConfig( + WWBlocks.FRAGILE_ICE.defaultBlockState(), + UniformInt.of(0, 4), + HolderSet.direct() + ), + RandomOffsetPlacement.horizontal(UniformInt.of(-1, 1)), + EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12) + ) + ) ) ); - ICE_COLUMN.makeAndSetHolder(FrozenLibFeatures.COMBO_FEATURE, + FRAGILE_ICE_COLUMN.makeAndSetHolder(FrozenLibFeatures.COMBO_FEATURE, new ComboFeatureConfig( List.of( PlacementUtils.inlinePlaced( FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(2, 7), HolderSet.direct() ), @@ -1116,7 +1242,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati PlacementUtils.inlinePlaced( FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(0, 4), HolderSet.direct() ), @@ -1126,7 +1252,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati PlacementUtils.inlinePlaced( FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(0, 4), HolderSet.direct() ), @@ -1136,7 +1262,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati PlacementUtils.inlinePlaced( FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(0, 4), HolderSet.direct() ), @@ -1147,21 +1273,21 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati ) ); - SMALL_ICE_COLUMN.makeAndSetHolder(FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, + SMALL_FRAGILE_ICE_COLUMN.makeAndSetHolder(FrozenLibFeatures.UPWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(0, 4), HolderSet.direct() ) ); - DOWNWARDS_ICE_COLUMN.makeAndSetHolder(FrozenLibFeatures.COMBO_FEATURE, + DOWNWARDS_FRAGILE_ICE_COLUMN.makeAndSetHolder(FrozenLibFeatures.COMBO_FEATURE, new ComboFeatureConfig( List.of( PlacementUtils.inlinePlaced( FrozenLibFeatures.DOWNWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(2, 6), HolderSet.direct() ), @@ -1171,7 +1297,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati PlacementUtils.inlinePlaced( FrozenLibFeatures.DOWNWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(0, 4), HolderSet.direct() ), @@ -1181,7 +1307,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati PlacementUtils.inlinePlaced( FrozenLibFeatures.DOWNWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(0, 4), HolderSet.direct() ), @@ -1191,7 +1317,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati PlacementUtils.inlinePlaced( FrozenLibFeatures.DOWNWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(0, 4), HolderSet.direct() ), @@ -1202,65 +1328,21 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati ) ); - SMALL_DOWNWARDS_ICE_COLUMN.makeAndSetHolder(FrozenLibFeatures.DOWNWARDS_COLUMN_FEATURE, + SMALL_DOWNWARDS_FRAGILE_ICE_COLUMN.makeAndSetHolder(FrozenLibFeatures.DOWNWARDS_COLUMN_FEATURE, new ColumnFeatureConfig( - Blocks.ICE.defaultBlockState(), + WWBlocks.FRAGILE_ICE.defaultBlockState(), UniformInt.of(0, 4), HolderSet.direct() ) ); - ICE_PILE.makeAndSetHolder(Feature.BLOCK_PILE, + FRAGILE_ICE_PILE.makeAndSetHolder(Feature.BLOCK_PILE, new BlockPileConfiguration( - BlockStateProvider.simple(Blocks.ICE) + BlockStateProvider.simple(WWBlocks.FRAGILE_ICE) ) ); - SNOW_DISK.makeAndSetHolder(FrozenLibFeatures.FADING_DISK_FEATURE, - new FadingDiskFeatureConfig( - false, - BlockStateProvider.simple(Blocks.SNOW_BLOCK), - BlockStateProvider.simple(Blocks.SNOW_BLOCK), - UniformInt.of(2, 5), - 0.8F, - 0.7F, - 0.325F, - 0.675F, - new HolderSet.Named<>( - BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE - ), - new HolderSet.Named<>( - BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE - ), - Heightmap.Types.OCEAN_FLOOR_WG - ) - ); - - POWDER_SNOW_DISK.makeAndSetHolder(FrozenLibFeatures.FADING_DISK_FEATURE, - new FadingDiskFeatureConfig( - false, - BlockStateProvider.simple(Blocks.POWDER_SNOW), - BlockStateProvider.simple(Blocks.POWDER_SNOW), - UniformInt.of(3, 8), - 0.8F, - 0.7F, - 0.325F, - 0.675F, - new HolderSet.Named<>( - BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE - ), - new HolderSet.Named<>( - BuiltInRegistries.BLOCK.holderOwner(), - WWBlockTags.ICE_FEATURE_REPLACEABLE - ), - Heightmap.Types.OCEAN_FLOOR_WG - ) - ); - - HANGING_ICICLES.makeAndSetHolder(Feature.RANDOM_SELECTOR, + HANGING_ICE.makeAndSetHolder(Feature.RANDOM_SELECTOR, new RandomFeatureConfiguration( List.of( new WeightedPlacedFeature( @@ -1268,7 +1350,7 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati 0.6F ) ), - PlacementUtils.inlinePlaced(DOWNWARDS_ICE_COLUMN.getHolder()) + PlacementUtils.inlinePlaced(DOWNWARDS_FRAGILE_ICE_COLUMN.getHolder()) ) ); @@ -1282,22 +1364,21 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati new WeightedPlacedFeature( PlacementUtils.inlinePlaced(PACKED_ICE_BIG_COLUMN.getHolder()), 0.3F + ), + new WeightedPlacedFeature( + PlacementUtils.inlinePlaced(FRAGILE_ICE_BIG_COLUMN.getHolder()), + 0.35F ) ), - PlacementUtils.inlinePlaced(ICE_COLUMN.getHolder()) + PlacementUtils.inlinePlaced(FRAGILE_ICE_COLUMN.getHolder()) ) ); - ICICLE_PATCH.makeAndSetHolder(Feature.VEGETATION_PATCH, + HANGING_PACKED_ICE.makeAndSetHolder(Feature.VEGETATION_PATCH, new VegetationPatchConfiguration( - WWBlockTags.ICE_FEATURE_REPLACEABLE, - new WeightedStateProvider(SimpleWeightedRandomList.builder() - .add(Blocks.ICE.defaultBlockState(), 5) - .add(Blocks.PACKED_ICE.defaultBlockState(), 8) - .add(Blocks.BLUE_ICE.defaultBlockState(), 3) - .build() - ), - PlacementUtils.inlinePlaced(HANGING_ICICLES.getHolder()), + WWBlockTags.CAVE_ICE_REPLACEABLE, + SimpleStateProvider.simple(Blocks.PACKED_ICE), + PlacementUtils.inlinePlaced(HANGING_ICE.getHolder()), CaveSurface.CEILING, UniformInt.of(2, 3), 0.4F, @@ -1310,14 +1391,13 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati ICE_PATCH_CEILING.makeAndSetHolder(Feature.VEGETATION_PATCH, new VegetationPatchConfiguration( - WWBlockTags.ICE_FEATURE_REPLACEABLE, + WWBlockTags.CAVE_ICE_REPLACEABLE, new WeightedStateProvider(SimpleWeightedRandomList.builder() - .add(Blocks.ICE.defaultBlockState(), 5) - .add(Blocks.PACKED_ICE.defaultBlockState(), 8) - .add(Blocks.BLUE_ICE.defaultBlockState(), 3) + .add(WWBlocks.FRAGILE_ICE.defaultBlockState(), 8) + .add(Blocks.PACKED_ICE.defaultBlockState(), 3) .build() ), - PlacementUtils.inlinePlaced(SMALL_DOWNWARDS_ICE_COLUMN.getHolder()), + PlacementUtils.inlinePlaced(SMALL_DOWNWARDS_FRAGILE_ICE_COLUMN.getHolder()), CaveSurface.FLOOR, UniformInt.of(2, 3), 0.4F, @@ -1328,13 +1408,12 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati ) ); - ICE_COLUMN_PATCH.makeAndSetHolder(Feature.VEGETATION_PATCH, + FRAGILE_ICE_COLUMN_PATCH.makeAndSetHolder(Feature.VEGETATION_PATCH, new VegetationPatchConfiguration( - WWBlockTags.ICE_FEATURE_REPLACEABLE, + WWBlockTags.CAVE_ICE_REPLACEABLE, new WeightedStateProvider(SimpleWeightedRandomList.builder() - .add(Blocks.ICE.defaultBlockState(), 5) + .add(WWBlocks.FRAGILE_ICE.defaultBlockState(), 5) .add(Blocks.PACKED_ICE.defaultBlockState(), 8) - .add(Blocks.BLUE_ICE.defaultBlockState(), 3) .build() ), PlacementUtils.inlinePlaced(ICE_COLUMNS.getHolder()), @@ -1348,16 +1427,15 @@ FrozenLibFeatures.SIMPLE_BLOCK_SCHEDULE_TICK_FEATURE, new SimpleBlockConfigurati ) ); - ICE_PATCH.makeAndSetHolder(Feature.VEGETATION_PATCH, + FRAGILE_ICE_PATCH.makeAndSetHolder(Feature.VEGETATION_PATCH, new VegetationPatchConfiguration( - WWBlockTags.ICE_FEATURE_REPLACEABLE, + WWBlockTags.CAVE_ICE_REPLACEABLE, new WeightedStateProvider(SimpleWeightedRandomList.builder() - .add(Blocks.ICE.defaultBlockState(), 5) + .add(WWBlocks.FRAGILE_ICE.defaultBlockState(), 5) .add(Blocks.PACKED_ICE.defaultBlockState(), 8) - .add(Blocks.BLUE_ICE.defaultBlockState(), 3) .build() ), - PlacementUtils.inlinePlaced(SMALL_ICE_COLUMN.getHolder()), + PlacementUtils.inlinePlaced(SMALL_FRAGILE_ICE_COLUMN.getHolder()), CaveSurface.FLOOR, UniformInt.of(2, 3), 0.4F, diff --git a/src/main/java/net/frozenblock/wilderwild/worldgen/feature/placed/WWCavePlaced.java b/src/main/java/net/frozenblock/wilderwild/worldgen/feature/placed/WWCavePlaced.java index 795cb96396..b1b47347f9 100644 --- a/src/main/java/net/frozenblock/wilderwild/worldgen/feature/placed/WWCavePlaced.java +++ b/src/main/java/net/frozenblock/wilderwild/worldgen/feature/placed/WWCavePlaced.java @@ -33,6 +33,7 @@ import net.minecraft.data.worldgen.features.MiscOverworldFeatures; import net.minecraft.data.worldgen.features.OreFeatures; import net.minecraft.data.worldgen.placement.PlacementUtils; +import net.minecraft.util.valueproviders.ClampedNormalInt; import net.minecraft.util.valueproviders.ConstantInt; import net.minecraft.util.valueproviders.UniformInt; import net.minecraft.world.level.block.Blocks; @@ -100,18 +101,18 @@ public final class WWCavePlaced { public static final FrozenLibPlacedFeature UPSIDE_DOWN_MAGMA = register("upside_down_magma"); // FROZEN CAVES + public static final FrozenLibPlacedFeature ICICLE_CLUSTER = WWPlacementUtils.register("icicle_cluster"); + public static final FrozenLibPlacedFeature CAVE_ICICLES = WWPlacementUtils.register("cave_icicles"); + public static final FrozenLibPlacedFeature ICICLES_SURFACE_WG = WWPlacementUtils.register("icicles_surface_wg"); + public static final FrozenLibPlacedFeature ICICLES_SURFACE = WWPlacementUtils.register("icicles_surface"); public static final FrozenLibPlacedFeature PACKED_ICE_PATH = WWPlacementUtils.register("packed_ice_path"); public static final FrozenLibPlacedFeature PACKED_ICE_DISK = WWPlacementUtils.register("packed_ice_disk"); - public static final FrozenLibPlacedFeature ICE_DISK = WWPlacementUtils.register("ice_disk"); - public static final FrozenLibPlacedFeature ICE_PILE = WWPlacementUtils.register("ice_pile"); - public static final FrozenLibPlacedFeature SNOW_DISK_UPPER = WWPlacementUtils.register("snow_disk_upper"); - public static final FrozenLibPlacedFeature POWDER_SNOW_DISK_UPPER = WWPlacementUtils.register("powder_snow_disk_upper"); - public static final FrozenLibPlacedFeature SNOW_DISK_LOWER = WWPlacementUtils.register("snow_disk_lower"); - public static final FrozenLibPlacedFeature POWDER_SNOW_DISK_LOWER = WWPlacementUtils.register("powder_snow_disk_lower"); - public static final FrozenLibPlacedFeature ICICLE_PATCH = WWPlacementUtils.register("icicle_patch"); + public static final FrozenLibPlacedFeature FRAGILE_ICE_DISK = WWPlacementUtils.register("fragile_ice_disk"); + public static final FrozenLibPlacedFeature FRAGILE_ICE_PILE = WWPlacementUtils.register("fragile_ice_pile"); + public static final FrozenLibPlacedFeature HANGING_PACKED_ICE = WWPlacementUtils.register("hanging_packed_ice"); public static final FrozenLibPlacedFeature ICE_PATCH_CEILING = WWPlacementUtils.register("ice_patch_ceiling"); - public static final FrozenLibPlacedFeature ICE_COLUMN_PATCH = WWPlacementUtils.register("ice_column_patch"); - public static final FrozenLibPlacedFeature ICE_PATCH = WWPlacementUtils.register("ice_patch"); + public static final FrozenLibPlacedFeature FRAGILE_ICE_COLUMN_PATCH = WWPlacementUtils.register("fragile_ice_column_patch"); + public static final FrozenLibPlacedFeature FRAGILE_ICE_PATCH = WWPlacementUtils.register("fragile_ice_patch"); public static final FrozenLibPlacedFeature DIORITE_PATCH = WWPlacementUtils.register("diorite_patch"); public static final FrozenLibPlacedFeature DIORITE_PATCH_CEILING = WWPlacementUtils.register("diorite_patch_ceiling"); public static final FrozenLibPlacedFeature ORE_DIORITE_EXTRA = WWPlacementUtils.register("ore_diorite_extra"); @@ -503,58 +504,65 @@ public static void registerCavePlaced(@NotNull BootstrapContext e // FROZEN CAVES - PACKED_ICE_PATH.makeAndSetHolder(WWCaveConfigured.PACKED_ICE_PATH.getHolder(), - modifiersWithCount(92, PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT) - ); - - PACKED_ICE_DISK.makeAndSetHolder(WWCaveConfigured.PACKED_ICE_DISK.getHolder(), - modifiersWithCount(32, PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT) - ); - - ICE_DISK.makeAndSetHolder(WWCaveConfigured.ICE_DISK.getHolder(), - modifiersWithCount(24, PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT) - ); - - ICE_PILE.makeAndSetHolder(WWCaveConfigured.ICE_PILE.getHolder(), - CountPlacement.of(UniformInt.of(60, 80)), + ICICLE_CLUSTER.makeAndSetHolder(WWCaveConfigured.ICICLE_CLUSTER.getHolder(), + CountPlacement.of(UniformInt.of(24, 48)), InSquarePlacement.spread(), PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT, - EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12), BiomeFilter.biome() ); - POWDER_SNOW_DISK_LOWER.makeAndSetHolder(WWCaveConfigured.POWDER_SNOW_DISK.getHolder(), + CAVE_ICICLES.makeAndSetHolder(WWCaveConfigured.CAVE_ICICLE.getHolder(), + CountPlacement.of(UniformInt.of(56, 192)), InSquarePlacement.spread(), - HeightRangePlacement.uniform(VerticalAnchor.bottom(), VerticalAnchor.absolute(48)), - EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12), + PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT, + CountPlacement.of(UniformInt.of(1, 5)), + RandomOffsetPlacement.of(ClampedNormalInt.of(0F, 3F, -10, 10), ClampedNormalInt.of(0F, 0.6F, -2, 2)), BiomeFilter.biome() ); - SNOW_DISK_LOWER.makeAndSetHolder(WWCaveConfigured.SNOW_DISK.getHolder(), - CountPlacement.of(2), + ICICLES_SURFACE_WG.makeAndSetHolder(WWCaveConfigured.ICICLE.getHolder(), + CountPlacement.of(UniformInt.of(18, 30)), + RarityFilter.onAverageOnceEvery(3), InSquarePlacement.spread(), - HeightRangePlacement.uniform(VerticalAnchor.bottom(), VerticalAnchor.absolute(48)), + PlacementUtils.HEIGHTMAP_WORLD_SURFACE, + HeightRangePlacement.uniform(VerticalAnchor.absolute(62), VerticalAnchor.absolute(127)), EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12), + RandomOffsetPlacement.of(ClampedNormalInt.of(0F, 3F, -10, 10), ClampedNormalInt.of(0F, 0.6F, -2, 2)), BiomeFilter.biome() ); - POWDER_SNOW_DISK_UPPER.makeAndSetHolder(WWCaveConfigured.POWDER_SNOW_DISK.getHolder(), - CountPlacement.of(5), + ICICLES_SURFACE.makeAndSetHolder(WWCaveConfigured.ICICLE.getHolder(), + CountPlacement.of(UniformInt.of(18, 30)), + RarityFilter.onAverageOnceEvery(3), InSquarePlacement.spread(), - HeightRangePlacement.uniform(VerticalAnchor.absolute(48), VerticalAnchor.absolute(256)), + PlacementUtils.HEIGHTMAP, + HeightRangePlacement.uniform(VerticalAnchor.absolute(62), VerticalAnchor.absolute(127)), EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12), + RandomOffsetPlacement.of(ClampedNormalInt.of(0F, 3F, -10, 10), ClampedNormalInt.of(0F, 0.6F, -2, 2)), BiomeFilter.biome() ); - SNOW_DISK_UPPER.makeAndSetHolder(WWCaveConfigured.SNOW_DISK.getHolder(), - CountPlacement.of(10), + PACKED_ICE_PATH.makeAndSetHolder(WWCaveConfigured.PACKED_ICE_PATH.getHolder(), + modifiersWithCount(92, PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT) + ); + + PACKED_ICE_DISK.makeAndSetHolder(WWCaveConfigured.PACKED_ICE_DISK.getHolder(), + modifiersWithCount(32, PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT) + ); + + FRAGILE_ICE_DISK.makeAndSetHolder(WWCaveConfigured.FRAGILE_ICE_DISK.getHolder(), + modifiersWithCount(38, PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT) + ); + + FRAGILE_ICE_PILE.makeAndSetHolder(WWCaveConfigured.FRAGILE_ICE_PILE.getHolder(), + CountPlacement.of(UniformInt.of(60, 80)), InSquarePlacement.spread(), - HeightRangePlacement.uniform(VerticalAnchor.absolute(48), VerticalAnchor.absolute(256)), + PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT, EnvironmentScanPlacement.scanningFor(Direction.DOWN, BlockPredicate.solid(), BlockPredicate.ONLY_IN_AIR_PREDICATE, 12), BiomeFilter.biome() ); - ICICLE_PATCH.makeAndSetHolder(WWCaveConfigured.ICICLE_PATCH.getHolder(), + HANGING_PACKED_ICE.makeAndSetHolder(WWCaveConfigured.HANGING_PACKED_ICE.getHolder(), CountPlacement.of(16), InSquarePlacement.spread(), PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT, @@ -572,7 +580,7 @@ public static void registerCavePlaced(@NotNull BootstrapContext e BiomeFilter.biome() ); - ICE_COLUMN_PATCH.makeAndSetHolder(WWCaveConfigured.ICE_COLUMN_PATCH.getHolder(), + FRAGILE_ICE_COLUMN_PATCH.makeAndSetHolder(WWCaveConfigured.FRAGILE_ICE_COLUMN_PATCH.getHolder(), CountPlacement.of(12), InSquarePlacement.spread(), PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT, @@ -581,7 +589,7 @@ public static void registerCavePlaced(@NotNull BootstrapContext e BiomeFilter.biome() ); - ICE_PATCH.makeAndSetHolder(WWCaveConfigured.ICE_PATCH.getHolder(), + FRAGILE_ICE_PATCH.makeAndSetHolder(WWCaveConfigured.FRAGILE_ICE_PATCH.getHolder(), CountPlacement.of(48), InSquarePlacement.spread(), PlacementUtils.RANGE_BOTTOM_TO_MAX_TERRAIN_HEIGHT, diff --git a/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/IcicleClusterFeature.java b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/IcicleClusterFeature.java new file mode 100644 index 0000000000..9fc2c1a9d4 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/IcicleClusterFeature.java @@ -0,0 +1,198 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.worldgen.impl.features; + +import com.mojang.serialization.Codec; +import net.frozenblock.wilderwild.worldgen.impl.features.config.IcicleClusterConfig; +import net.frozenblock.wilderwild.worldgen.impl.util.IcicleUtils; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.util.Mth; +import net.minecraft.util.RandomSource; +import net.minecraft.util.valueproviders.ClampedNormalFloat; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.levelgen.Column; +import net.minecraft.world.level.levelgen.feature.DripstoneUtils; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; +import org.jetbrains.annotations.NotNull; +import java.util.Optional; +import java.util.OptionalInt; + +public class IcicleClusterFeature extends Feature { + + public IcicleClusterFeature(@NotNull Codec codec) { + super(codec); + } + + @Override + public boolean place(@NotNull FeaturePlaceContext context) { + WorldGenLevel worldGenLevel = context.level(); + BlockPos blockPos = context.origin(); + IcicleClusterConfig config = context.config(); + RandomSource randomSource = context.random(); + if (!IcicleUtils.isEmptyOrWater(worldGenLevel, blockPos)) { + return false; + } else { + int height = config.height.sample(randomSource); + float g = config.density.sample(randomSource); + int j = config.radius.sample(randomSource); + int k = config.radius.sample(randomSource); + + for (int l = -j; l <= j; l++) { + for (int m = -k; m <= k; m++) { + double icicleChance = this.getChanceOfIcicle(j, k, l, m, config); + BlockPos blockPos2 = blockPos.offset(l, 0, m); + this.placeColumn(worldGenLevel, randomSource, blockPos2, l, m, icicleChance, height, g, config); + } + } + + return true; + } + } + + private void placeColumn( + WorldGenLevel worldGenLevel, + RandomSource randomSource, + BlockPos blockPos, + int i, + int j, + double icicleChance, + int height, + float g, + @NotNull IcicleClusterConfig icicleClusterConfig + ) { + Optional optional = Column.scan( + worldGenLevel, blockPos, icicleClusterConfig.floorToCeilingSearchRange, DripstoneUtils::isEmptyOrWater, DripstoneUtils::isNeitherEmptyNorWater + ); + if (optional.isPresent()) { + OptionalInt optionalInt = optional.get().getCeiling(); + OptionalInt optionalInt2 = optional.get().getFloor(); + if (optionalInt.isPresent() || optionalInt2.isPresent()) { + Column column = optional.get(); + + OptionalInt optionalInt3 = column.getFloor(); + boolean canPlaceIcicleA = randomSource.nextDouble() < icicleChance; + int o; + if (optionalInt.isPresent() && canPlaceIcicleA && !this.isLava(worldGenLevel, blockPos.atY(optionalInt.getAsInt()))) { + int m = icicleClusterConfig.iceLayerThickness.sample(randomSource); + this.replaceBlocksWithIceBlocks(worldGenLevel, blockPos.atY(optionalInt.getAsInt()), m, Direction.UP); + int n; + if (optionalInt3.isPresent()) { + n = Math.min(height, optionalInt.getAsInt() - optionalInt3.getAsInt()); + } else { + n = height; + } + + o = this.getIcicleHeight(randomSource, i, j, g, n, icicleClusterConfig); + } else { + o = 0; + } + + boolean canPlaceIcicleB = randomSource.nextDouble() < icicleChance; + int m; + if (optionalInt3.isPresent() && canPlaceIcicleB && !this.isLava(worldGenLevel, blockPos.atY(optionalInt3.getAsInt()))) { + int p = icicleClusterConfig.iceLayerThickness.sample(randomSource); + this.replaceBlocksWithIceBlocks(worldGenLevel, blockPos.atY(optionalInt3.getAsInt()), p, Direction.DOWN); + if (optionalInt.isPresent()) { + m = Math.max( + 0, + o + Mth.randomBetweenInclusive( + randomSource, + -icicleClusterConfig.maxIcicleHeightDiff, + icicleClusterConfig.maxIcicleHeightDiff + ) + ); + } else { + m = this.getIcicleHeight(randomSource, i, j, g, height, icicleClusterConfig); + } + } else { + m = 0; + } + + int w; + int p; + if (optionalInt.isPresent() && optionalInt3.isPresent() && optionalInt.getAsInt() - o <= optionalInt3.getAsInt() + m) { + int q = optionalInt3.getAsInt(); + int r = optionalInt.getAsInt(); + int s = Math.max(r - o, q + 1); + int t = Math.min(q + m, r - 1); + int u = Mth.randomBetweenInclusive(randomSource, s, t + 1); + int v = u - 1; + p = r - u; + w = v - q; + } else { + p = o; + w = m; + } + + boolean bl4 = randomSource.nextBoolean() && p > 0 && w > 0 && column.getHeight().isPresent() && p + w == column.getHeight().getAsInt(); + if (optionalInt.isPresent()) { + IcicleUtils.growIcicle(worldGenLevel, blockPos.atY(optionalInt.getAsInt() - 1), Direction.DOWN, p, bl4); + } + + if (optionalInt3.isPresent()) { + IcicleUtils.growIcicle(worldGenLevel, blockPos.atY(optionalInt3.getAsInt() + 1), Direction.UP, w, bl4); + } + } + } + } + + private boolean isLava(@NotNull LevelReader levelReader, BlockPos blockPos) { + return levelReader.getBlockState(blockPos).is(Blocks.LAVA); + } + + private int getIcicleHeight(@NotNull RandomSource randomSource, int i, int j, float f, int k, IcicleClusterConfig icicleClusterConfig) { + if (randomSource.nextFloat() > f) { + return 0; + } else { + int l = Math.abs(i) + Math.abs(j); + float g = Mth.clampedMap(l, 0F, icicleClusterConfig.maxDistanceFromCenterAffectingHeightBias, (float) k / 2F, 0F); + return (int)randomBetweenBiased(randomSource, 0F, (float)k, g, (float)icicleClusterConfig.heightDeviation); + } + } + + private void replaceBlocksWithIceBlocks(WorldGenLevel worldGenLevel, @NotNull BlockPos blockPos, int i, Direction direction) { + BlockPos.MutableBlockPos mutableBlockPos = blockPos.mutable(); + + for (int j = 0; j < i; j++) { + if (!IcicleUtils.placeIceBlockIfPossible(worldGenLevel, mutableBlockPos)) { + return; + } + + mutableBlockPos.move(direction); + } + } + + private double getChanceOfIcicle(int i, int j, int k, int l, @NotNull IcicleClusterConfig icicleClusterConfig) { + return Mth.clampedMap( + (float)Math.min(i - Math.abs(k), j - Math.abs(l)), + 0F, + (float)icicleClusterConfig.maxDistanceFromEdgeAffectingChanceOfIcicle, + icicleClusterConfig.chanceOfIcicleAtMaxDistanceFromCenter, + 1F + ); + } + + private static float randomBetweenBiased(RandomSource randomSource, float f, float g, float h, float i) { + return ClampedNormalFloat.sample(randomSource, h, i, f, g); + } +} diff --git a/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/IcicleFeature.java b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/IcicleFeature.java new file mode 100644 index 0000000000..99e7f620ee --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/IcicleFeature.java @@ -0,0 +1,95 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.worldgen.impl.features; + +import com.mojang.serialization.Codec; +import net.frozenblock.wilderwild.worldgen.impl.features.config.IcicleConfig; +import net.frozenblock.wilderwild.worldgen.impl.util.IcicleUtils; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.levelgen.feature.DripstoneUtils; +import net.minecraft.world.level.levelgen.feature.Feature; +import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext; +import org.jetbrains.annotations.NotNull; +import java.util.Optional; + +public class IcicleFeature extends Feature { + + public IcicleFeature(Codec codec) { + super(codec); + } + + @Override + public boolean place(@NotNull FeaturePlaceContext featurePlaceContext) { + LevelAccessor levelAccessor = featurePlaceContext.level(); + BlockPos blockPos = featurePlaceContext.origin(); + RandomSource randomSource = featurePlaceContext.random(); + IcicleConfig icicleConfig = featurePlaceContext.config(); + Optional optional = getTipDirection(levelAccessor, blockPos, randomSource); + if (optional.isEmpty()) { + return false; + } else { + BlockPos blockPos2 = blockPos.relative(optional.get().getOpposite()); + if (icicleConfig.placeIceBlocks) { + createPatchOfIceBlocks(levelAccessor, randomSource, blockPos2, icicleConfig); + } + int i = randomSource.nextFloat() < icicleConfig.chanceOfTallerIcicle + && DripstoneUtils.isEmptyOrWater(levelAccessor.getBlockState(blockPos.relative(optional.get()))) + ? 2 + : 1; + IcicleUtils.growIcicle(levelAccessor, blockPos, optional.get(), i, false); + return true; + } + } + + private static Optional getTipDirection(@NotNull LevelAccessor levelAccessor, @NotNull BlockPos blockPos, RandomSource randomSource) { + boolean bl = IcicleUtils.isIcicleBase(levelAccessor.getBlockState(blockPos.above())); + boolean bl2 = IcicleUtils.isIcicleBase(levelAccessor.getBlockState(blockPos.below())); + if (bl && bl2) { + return Optional.of(randomSource.nextBoolean() ? Direction.DOWN : Direction.UP); + } else if (bl) { + return Optional.of(Direction.DOWN); + } else { + return bl2 ? Optional.of(Direction.UP) : Optional.empty(); + } + } + + private static void createPatchOfIceBlocks( + LevelAccessor levelAccessor, RandomSource randomSource, BlockPos blockPos, IcicleConfig icicleConfig + ) { + IcicleUtils.placeIceBlockIfPossible(levelAccessor, blockPos); + + for (Direction direction : Direction.Plane.HORIZONTAL) { + if (!(randomSource.nextFloat() > icicleConfig.chanceOfDirectionalSpread)) { + BlockPos blockPos2 = blockPos.relative(direction); + IcicleUtils.placeIceBlockIfPossible(levelAccessor, blockPos2); + if (!(randomSource.nextFloat() > icicleConfig.chanceOfSpreadRadius2)) { + BlockPos blockPos3 = blockPos2.relative(Direction.getRandom(randomSource)); + IcicleUtils.placeIceBlockIfPossible(levelAccessor, blockPos3); + if (!(randomSource.nextFloat() > icicleConfig.chanceOfSpreadRadius3)) { + BlockPos blockPos4 = blockPos3.relative(Direction.getRandom(randomSource)); + IcicleUtils.placeIceBlockIfPossible(levelAccessor, blockPos4); + } + } + } + } + } +} diff --git a/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/config/IcicleClusterConfig.java b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/config/IcicleClusterConfig.java new file mode 100644 index 0000000000..7b04bbbe93 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/config/IcicleClusterConfig.java @@ -0,0 +1,89 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.worldgen.impl.features.config; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.util.valueproviders.FloatProvider; +import net.minecraft.util.valueproviders.IntProvider; +import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration; + +public class IcicleClusterConfig implements FeatureConfiguration { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + Codec.intRange(1, 512) + .fieldOf("floor_to_ceiling_search_range") + .forGetter(icicleClusterConfig -> icicleClusterConfig.floorToCeilingSearchRange), + IntProvider.codec(1, 128).fieldOf("height").forGetter(icicleClusterConfig -> icicleClusterConfig.height), + IntProvider.codec(1, 128).fieldOf("radius").forGetter(icicleClusterConfig -> icicleClusterConfig.radius), + Codec.intRange(0, 64) + .fieldOf("max_icicle_height_diff") + .forGetter(icicleClusterConfig -> icicleClusterConfig.maxIcicleHeightDiff), + Codec.intRange(1, 64).fieldOf("height_deviation").forGetter(icicleClusterConfig -> icicleClusterConfig.heightDeviation), + IntProvider.codec(0, 128) + .fieldOf("ice_layer_thickness") + .forGetter(icicleClusterConfig -> icicleClusterConfig.iceLayerThickness), + FloatProvider.codec(0F, 2F).fieldOf("density").forGetter(icicleClusterConfig -> icicleClusterConfig.density), + Codec.floatRange(0F, 1F) + .fieldOf("chance_of_icicle_at_max_distance_from_center") + .forGetter(icicleClusterConfig -> icicleClusterConfig.chanceOfIcicleAtMaxDistanceFromCenter), + Codec.intRange(1, 64) + .fieldOf("max_distance_from_edge_affecting_chance_of_icicle") + .forGetter(icicleClusterConfig -> icicleClusterConfig.maxDistanceFromEdgeAffectingChanceOfIcicle), + Codec.intRange(1, 64) + .fieldOf("max_distance_from_center_affecting_height_bias") + .forGetter(icicleClusterConfig -> icicleClusterConfig.maxDistanceFromCenterAffectingHeightBias) + ) + .apply(instance, IcicleClusterConfig::new) + ); + public final int floorToCeilingSearchRange; + public final IntProvider height; + public final IntProvider radius; + public final int maxIcicleHeightDiff; + public final int heightDeviation; + public final IntProvider iceLayerThickness; + public final FloatProvider density; + public final float chanceOfIcicleAtMaxDistanceFromCenter; + public final int maxDistanceFromEdgeAffectingChanceOfIcicle; + public final int maxDistanceFromCenterAffectingHeightBias; + + public IcicleClusterConfig( + int floorToCeilingSearchRange, + IntProvider height, + IntProvider radius, + int maxIcicleHeightDiff, + int heightDeviation, + IntProvider iceLayerThickness, + FloatProvider density, + float chanceOfIcicleAtMaxDistanceFromCenter, + int maxDistanceFromEdgeAffectingChanceOfIcicle, + int maxDistanceFromCenterAffectingHeightBias + ) { + this.floorToCeilingSearchRange = floorToCeilingSearchRange; + this.height = height; + this.radius = radius; + this.maxIcicleHeightDiff = maxIcicleHeightDiff; + this.heightDeviation = heightDeviation; + this.iceLayerThickness = iceLayerThickness; + this.density = density; + this.chanceOfIcicleAtMaxDistanceFromCenter = chanceOfIcicleAtMaxDistanceFromCenter; + this.maxDistanceFromEdgeAffectingChanceOfIcicle = maxDistanceFromEdgeAffectingChanceOfIcicle; + this.maxDistanceFromCenterAffectingHeightBias = maxDistanceFromCenterAffectingHeightBias; + } +} diff --git a/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/config/IcicleConfig.java b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/config/IcicleConfig.java new file mode 100644 index 0000000000..e215d222b1 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/features/config/IcicleConfig.java @@ -0,0 +1,69 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.worldgen.impl.features.config; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration; + +public class IcicleConfig implements FeatureConfiguration { + public static final Codec CODEC = RecordCodecBuilder.create( + instance -> instance.group( + Codec.floatRange(0F, 1F) + .fieldOf("chance_of_taller_icicle") + .orElse(0.2F) + .forGetter(icicleConfig -> icicleConfig.chanceOfTallerIcicle), + Codec.floatRange(0F, 1F) + .fieldOf("chance_of_directional_spread") + .orElse(0.7F) + .forGetter(icicleConfig -> icicleConfig.chanceOfDirectionalSpread), + Codec.floatRange(0F, 1F) + .fieldOf("chance_of_spread_radius2") + .orElse(0.5F) + .forGetter(icicleConfig -> icicleConfig.chanceOfSpreadRadius2), + Codec.floatRange(0F, 1F) + .fieldOf("chance_of_spread_radius3") + .orElse(0.5F) + .forGetter(icicleConfig -> icicleConfig.chanceOfSpreadRadius3), + Codec.BOOL + .fieldOf("place_ice_blocks") + .forGetter(icicleConfig -> icicleConfig.placeIceBlocks) + ) + .apply(instance, IcicleConfig::new) + ); + public final float chanceOfTallerIcicle; + public final float chanceOfDirectionalSpread; + public final float chanceOfSpreadRadius2; + public final float chanceOfSpreadRadius3; + public final boolean placeIceBlocks; + + public IcicleConfig( + float chanceOfTallerIcicle, + float chanceOfDirectionalSpread, + float chanceOfSpreadRadius2, + float chanceOfSpreadRadius3, + boolean placeIceBlocks + ) { + this.chanceOfTallerIcicle = chanceOfTallerIcicle; + this.chanceOfDirectionalSpread = chanceOfDirectionalSpread; + this.chanceOfSpreadRadius2 = chanceOfSpreadRadius2; + this.chanceOfSpreadRadius3 = chanceOfSpreadRadius3; + this.placeIceBlocks = placeIceBlocks; + } +} diff --git a/src/main/java/net/frozenblock/wilderwild/worldgen/impl/util/IcicleUtils.java b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/util/IcicleUtils.java new file mode 100644 index 0000000000..48657ef4b2 --- /dev/null +++ b/src/main/java/net/frozenblock/wilderwild/worldgen/impl/util/IcicleUtils.java @@ -0,0 +1,136 @@ +/* + * Copyright 2023-2025 FrozenBlock + * This file is part of Wilder Wild. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, see . + */ + +package net.frozenblock.wilderwild.worldgen.impl.util; + +import java.util.function.Consumer; +import net.frozenblock.wilderwild.block.IcicleBlock; +import net.frozenblock.wilderwild.registry.WWBlocks; +import net.frozenblock.wilderwild.tag.WWBlockTags; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.tags.BlockTags; +import net.minecraft.util.Mth; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.WorldGenLevel; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.PointedDripstoneBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.DripstoneThickness; +import net.minecraft.world.level.levelgen.feature.DripstoneUtils; +import org.jetbrains.annotations.NotNull; + +public class IcicleUtils { + public static double getIcicleHeight(double d, double e, double f, double g) { + if (d < g) { + d = g; + } + + double i = d / e * 0.384D; + double j = 0.75D * Math.pow(i, 1.3333333333333333D); + double k = Math.pow(i, 0.6666666666666666D); + double l = 0.3333333333333333D * Math.log(i); + double m = f * (j - k - l); + m = Math.max(m, 0D); + return m / 0.384D * e; + } + + public static boolean isCircleMostlyEmbeddedInStone(WorldGenLevel worldGenLevel, BlockPos blockPos, int i) { + if (isEmptyOrWaterOrLava(worldGenLevel, blockPos)) { + return false; + } else { + float g = 6F / (float)i; + + for (float h = 0F; h < (float) (Math.PI * 2F); h += g) { + int j = (int)(Mth.cos(h) * (float)i); + int k = (int)(Mth.sin(h) * (float)i); + if (isEmptyOrWaterOrLava(worldGenLevel, blockPos.offset(j, 0, k))) { + return false; + } + } + + return true; + } + } + + public static boolean isEmptyOrWater(@NotNull LevelAccessor levelAccessor, BlockPos blockPos) { + return levelAccessor.isStateAtPosition(blockPos, DripstoneUtils::isEmptyOrWater); + } + + public static boolean isEmptyOrWaterOrLava(@NotNull LevelAccessor levelAccessor, BlockPos blockPos) { + return levelAccessor.isStateAtPosition(blockPos, DripstoneUtils::isEmptyOrWaterOrLava); + } + + public static void buildBaseToTipColumn(Direction direction, int length, boolean merge, Consumer consumer) { + if (length >= 3) { + consumer.accept(createIcicle(direction, DripstoneThickness.BASE)); + + for (int j = 0; j < length - 3; j++) { + consumer.accept(createIcicle(direction, DripstoneThickness.MIDDLE)); + } + } + + if (length >= 2) { + consumer.accept(createIcicle(direction, DripstoneThickness.FRUSTUM)); + } + + if (length >= 1) { + consumer.accept(createIcicle(direction, merge ? DripstoneThickness.TIP_MERGE : DripstoneThickness.TIP)); + } + } + + public static void growIcicle(@NotNull LevelAccessor levelAccessor, @NotNull BlockPos blockPos, @NotNull Direction direction, int i, boolean merge) { + if (isIcicleBase(levelAccessor.getBlockState(blockPos.relative(direction.getOpposite())))) { + BlockPos.MutableBlockPos mutableBlockPos = blockPos.mutable(); + buildBaseToTipColumn(direction, i, merge, blockState -> { + if (blockState.is(WWBlocks.ICICLE)) { + blockState = blockState.setValue(IcicleBlock.WATERLOGGED, levelAccessor.isWaterAt(mutableBlockPos)); + } + + levelAccessor.setBlock(mutableBlockPos, blockState, Block.UPDATE_CLIENTS); + mutableBlockPos.move(direction); + }); + } + } + + public static boolean placeIceBlockIfPossible(@NotNull LevelAccessor levelAccessor, BlockPos blockPos) { + BlockState blockState = levelAccessor.getBlockState(blockPos); + if (blockState.is(WWBlockTags.CAVE_ICE_REPLACEABLE)) { + levelAccessor.setBlock(blockPos, WWBlocks.FRAGILE_ICE.defaultBlockState(), Block.UPDATE_CLIENTS); + return true; + } else { + return false; + } + } + + private static @NotNull BlockState createIcicle(Direction direction, DripstoneThickness icicleThickness) { + return WWBlocks.ICICLE + .defaultBlockState() + .setValue(PointedDripstoneBlock.TIP_DIRECTION, direction) + .setValue(PointedDripstoneBlock.THICKNESS, icicleThickness); + } + + public static boolean isIcicleBaseOrLava(BlockState blockState) { + return isIcicleBase(blockState) || blockState.is(Blocks.LAVA); + } + + public static boolean isIcicleBase(@NotNull BlockState blockState) { + return blockState.is(WWBlockTags.ICICLE_GROWS_WHEN_UNDER) || blockState.is(BlockTags.ICE) || blockState.is(WWBlockTags.CAVE_ICE_REPLACEABLE); + } +} diff --git a/src/main/java/net/frozenblock/wilderwild/worldgen/modification/WWMiscGeneration.java b/src/main/java/net/frozenblock/wilderwild/worldgen/modification/WWMiscGeneration.java index b08e278efb..3349509647 100644 --- a/src/main/java/net/frozenblock/wilderwild/worldgen/modification/WWMiscGeneration.java +++ b/src/main/java/net/frozenblock/wilderwild/worldgen/modification/WWMiscGeneration.java @@ -245,6 +245,11 @@ public static void generateMisc() { if (biomeSelectionContext.hasTag(WWBiomeTags.HAS_COMMON_PUMPKIN)) { generationSettings.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WWPlacedFeatures.PATCH_PUMPKIN_COMMON.getKey()); } + + if (biomeSelectionContext.hasTag(WWBiomeTags.HAS_ICICLES)) { + generationSettings.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WWCavePlaced.ICICLES_SURFACE_WG.getKey()); + generationSettings.addFeature(GenerationStep.Decoration.VEGETAL_DECORATION, WWCavePlaced.ICICLES_SURFACE.getKey()); + } } }); diff --git a/src/main/resources/assets/wilderwild/lang/en_us.json b/src/main/resources/assets/wilderwild/lang/en_us.json index 35d4f8c620..00ef5b2dda 100644 --- a/src/main/resources/assets/wilderwild/lang/en_us.json +++ b/src/main/resources/assets/wilderwild/lang/en_us.json @@ -288,6 +288,9 @@ "subtitles.particle.floating_sculk_bubble.big_pop": "Big Floating Sculk Bubble pops", "subtitles.particle.floating_sculk_bubble.pop": "Floating Sculk Bubble pops", + "block.wilderwild.icicle": "Icicle", + "block.wilderwild.fragile_ice": "Fragile Ice", + "block.wilderwild.lantanas": "Lantanas", "block.wilderwild.potted_lantanas": "Potted Lantanas", diff --git a/src/main/resources/assets/wilderwild/textures/block/fragile_ice_0.png b/src/main/resources/assets/wilderwild/textures/block/fragile_ice_0.png new file mode 100644 index 0000000000000000000000000000000000000000..b226109d1c87bb1c0db14c794bfca416797e8a7b GIT binary patch literal 493 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc4H=#;jv*HQv6l_KnH@z~9_%%4^>ElCaKuZ8 z$*e5wC*wc6`rf7`n*^*KTN;u?S-4#VHU{|b?^W(*p8jU<+?n6Y%wFo{wcmVQt@-?O zKhy5$#hW$pR%Ue8`&3}c{^#$(N zR9!s|O;CO+Q88=9<1bbM9BNNkSUj$s>AcIK++QWXe1a`c@~8S7-poHUUa{E4h;M1? zxg*!Fap*&}ye`Ki3q|Fmt<$PY3|8^(+Wb0k+HO@dyBlZf51pt?zwxj9-@1u6)FccW z-QLXhxFL95Szzhr*N%CDhQUo{`n#+ckFzkpEsQcWR*dpj|JMGAH*JwnQOts)iol5A fOO5bM^YvxW0bjCFr}WkUdqVE2nt<_}NEd8Btvf%@(y*9wW@mZ2`2No++%ikbC8qP9D=Y9TRqk40^{SKH ztULDFug?=;jM(bj(=08qh2`$ky9Vd)3e9G>IAgvrMfc_Wg{JrY<~Iu7ZWb~Q&^G?8 zVDzRVn%nGTPl~+3mpKasd!9dCBUx}JVagomwjO1%(_81AQIUPc|7fmoc+&g3Q-Be{ gmm1-j=IhI#1!QvoF$i1=o(!TqUHx3vIVCg!0L3-OfB*mh literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/block/fragile_ice_2.png b/src/main/resources/assets/wilderwild/textures/block/fragile_ice_2.png new file mode 100644 index 0000000000000000000000000000000000000000..1aaf420ec065dde0875d7917f032227812e475ee GIT binary patch literal 494 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1quc4Vj)Ujv*HQzLyNWnH>dKAM7=5^>ElCpfWXr zCFjkWPt1R6|4FfWrYe>-aWEd$;t=Z+IHFYb>+R1caxHhyoT<)F`!?%!d)~fZI#07U z>KV-Ld&Sw=_~Y*;ZTHE`j(y&5x%jnZ{8o!LtyNhuWA(TBao47L^d!Gp_Iqicgc1NxV zK4&Kpxy|_W+VukIuJ0HRKIu^UVW+Sxv>{21*;7bn(ov&#IbJ)o?R94f%|D*{@h>nY g_);T0(|mmyw18|5AO?X;!IMFhr>mdKI;Vst0K|LAL;wH) literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/block/icicle_down_base.png b/src/main/resources/assets/wilderwild/textures/block/icicle_down_base.png new file mode 100644 index 0000000000000000000000000000000000000000..63184d91f2e03cf70c57ba4572215acd074f739d GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|s0G|-og@^x7+WD__?T?zJUkawbI&tU!o-6->l0|B3<^d^=k|4j}{}8}% zuX%4IP>i#{BeIx*f$uN~Gak=hkpdJf^K@|x(FnFZ@5t0*z{BLQpzY89NS%G|s0G|-og@^y|x$^(So&PmUzZ6V=HEHL+*0n!?l6$O;4S^I#NswRge+Xc> z*St3pD8^af5n0T@z;_sg8IR|$NC65adb&7m;8~GW|{~cQkx_7JNfVyhOQC%Dka-#RS$_XWp8g75IGo%Hc`# um6Z0$b==sSKfyKbz?)q*{1)}n$xKJNSi=n$zT^d3#^CAd=d#Wzp$Pyfz+kTc literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/block/icicle_down_middle.png b/src/main/resources/assets/wilderwild/textures/block/icicle_down_middle.png new file mode 100644 index 0000000000000000000000000000000000000000..cd7b9a559a5438cc37caf554ded5a9c257285c6f GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|s0G|-oNjv{7JpBK}o&PmUzwEj4zjf`8g6Xe-lFL`zUkao+N`m}?|3d)7 zz2?1M1MG8Fg{ zfUi%Er@_7VIkR&fL*}_gk%D}UCc%$?CUhy}G=`qtn_1AAWwq6D(p2LEQ5)y!A8?Iu wSX}f>#bauLL%qg~D2)q6f46Awc`!%3<2uVxhJ`yX1Fd85boFyt=akR{0J#cdx&QzG literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/block/icicle_down_tip.png b/src/main/resources/assets/wilderwild/textures/block/icicle_down_tip.png new file mode 100644 index 0000000000000000000000000000000000000000..55db9646bc9f822c19334ae2aef0b6de9a08a463 GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|^0G|-o6L<5Z) z7I;J!GcfQS24TkI`72U@f}Wl(jv*SsrM-@P2NXD161V^UuP-hdt$4B7=a}NGM>AxO zEI9Z%Nwn+GYK0FvUV_r09d8zizc~8uNrdMQF147}pKWvgd;7(5y<`n5VriW6eA7;# Op$wj`elF{r5}E*y8d1~$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/block/icicle_down_tip_merge.png b/src/main/resources/assets/wilderwild/textures/block/icicle_down_tip_merge.png new file mode 100644 index 0000000000000000000000000000000000000000..55db9646bc9f822c19334ae2aef0b6de9a08a463 GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|^0G|-o6L<5Z) z7I;J!GcfQS24TkI`72U@f}Wl(jv*SsrM-@P2NXD161V^UuP-hdt$4B7=a}NGM>AxO zEI9Z%Nwn+GYK0FvUV_r09d8zizc~8uNrdMQF147}pKWvgd;7(5y<`n5VriW6eA7;# Op$wj`elF{r5}E*y8d1~$ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/block/icicle_up_base.png b/src/main/resources/assets/wilderwild/textures/block/icicle_up_base.png new file mode 100644 index 0000000000000000000000000000000000000000..3a5770d3732ab10ecb73ddb7c535311e1fc714d1 GIT binary patch literal 271 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|s0G|-oNjv|wuKiK7^h?3?R|^mS-*e^vi97#+k|$LouLCKLk|4j}{}8}% zuX%4IP>i#{BeIx*f$uN~Gak=hkpdLV@pN$v(Fk_!cN99Hz`^X?@aw<4`Nc2`i%o}` zBDh={&fF=NPjL~ca8z5lit%o2>>geJ@P!7VRqR^J4(;SIUV0_bNY}`#sLE`^MN#`7 zK}Xpe*4lkN*Jz&RVYalKK^33yV)7+Jz%uGX{M3}`Qdr>mdKI;Vst E0J2wMNS%G|s0G|-oNjv|wuKiK7^vj+r{}&$qf8x&ng6Xe-k}=&`(}5I6NswRge+Xc> z*St3pD8^af5n0T@z;_sg8IR|$NC67Qd%8G=XatA$1qv}JayXf4zOR4my5{Ca{=?!+ zrdg%!TlY%4;ro(Z%w{rg(pwtc^%CqEdEQOpJ!K&C$D}|-I_Dg#3hR|yzTt_Bp8Z+S s)?@ps*5c5Mk4p_@S025tc;XMk)e2V4f3*?1K&u!$UHx3vIVCg!09{pJod5s; literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/block/icicle_up_middle.png b/src/main/resources/assets/wilderwild/textures/block/icicle_up_middle.png new file mode 100644 index 0000000000000000000000000000000000000000..ac3a315768fa4592f6ed28c5ed436a249e57edd5 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G|s0G|-oJy-rOJp6ys&VQ|If7C4fQZW71i97#+k~5dyx(=i`N`m}?|3d)7 zz2?1M1MG8eWIa4#jcU6<4?`#n#XEZ@iMf^X*^euB$9pt@Bi-0Ig&2boFyt=akR{08!Op?*IS* literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/block/icicle_up_tip.png b/src/main/resources/assets/wilderwild/textures/block/icicle_up_tip.png new file mode 100644 index 0000000000000000000000000000000000000000..717e5e6405b00cf9136fd71618c1ef12fef2a6eb GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}f0G|-o6LZTCtZOQdr6RA@P9C1kn(1B z0}62#ctjR6Fz_7)VaDV6D^h@huAVNAAsWG@y%)I{6gZf3r~UtblGV>uG2Z5w?@<@ Mp00i_>zopr02-}LiU0rr literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/block/icicle_up_tip_merge.png b/src/main/resources/assets/wilderwild/textures/block/icicle_up_tip_merge.png new file mode 100644 index 0000000000000000000000000000000000000000..717e5e6405b00cf9136fd71618c1ef12fef2a6eb GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}f0G|-o6LZTCtZOQdr6RA@P9C1kn(1B z0}62#ctjR6Fz_7)VaDV6D^h@huAVNAAsWG@y%)I{6gZf3r~UtblGV>uG2Z5w?@<@ Mp00i_>zopr02-}LiU0rr literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/wilderwild/textures/item/icicle.png b/src/main/resources/assets/wilderwild/textures/item/icicle.png new file mode 100644 index 0000000000000000000000000000000000000000..717e5e6405b00cf9136fd71618c1ef12fef2a6eb GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NS%G}f0G|-o6LZTCtZOQdr6RA@P9C1kn(1B z0}62#ctjR6Fz_7)VaDV6D^h@huAVNAAsWG@y%)I{6gZf3r~UtblGV>uG2Z5w?@<@ Mp00i_>zopr02-}LiU0rr literal 0 HcmV?d00001 diff --git a/src/main/resources/wilderwild.mixins.json b/src/main/resources/wilderwild.mixins.json index 60bfde4772..8138b0633c 100644 --- a/src/main/resources/wilderwild.mixins.json +++ b/src/main/resources/wilderwild.mixins.json @@ -18,7 +18,10 @@ "block.frozen_vegetation.EatBlockGoalMixin", "block.frozen_vegetation.GrassBlockMixin", "block.frozen_vegetation.ShearsItemMixin", + "block.ice.EntityMixin", "block.ice.FrostedIceBlockMixin", + "block.ice.SpawnUtilStrategyMixin", + "block.ice.WalkNodeEvaluatorMixin", "block.lava.LavaFluidMixin", "block.leaves.LeavesBlockMixin", "block.mesoglea.BlockBehaviourMixin",