diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7dba9f9ff5..68a2e75f84 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,14 +93,14 @@ jobs: fabric_server_url: https://meta.fabricmc.net/v2/versions/loader/1.21.5/0.16.13/1.0.3/server/jar fabric_api_url: https://cdn.modrinth.com/data/P7dR8mSH/versions/FZ4q3wQK/fabric-api-0.119.9%2B1.21.5.jar packtest_url: https://cdn.modrinth.com/data/XsKUhp45/versions/Swh7th09/packtest-2.1-mc1.21.5.jar - - version: '1.21.7' - fabric_server_url: https://meta.fabricmc.net/v2/versions/loader/1.21.7/0.16.14/1.0.3/server/jar - fabric_api_url: https://cdn.modrinth.com/data/P7dR8mSH/versions/sLmbxWpX/fabric-api-0.128.1%2B1.21.7.jar - packtest_url: https://cdn.modrinth.com/data/XsKUhp45/versions/PAYctH3X/packtest-2.2-mc1.21.7.jar - - version: '1.21.8' + - version: '1.21.7' fabric_server_url: https://meta.fabricmc.net/v2/versions/loader/1.21.7/0.16.14/1.0.3/server/jar fabric_api_url: https://cdn.modrinth.com/data/P7dR8mSH/versions/sLmbxWpX/fabric-api-0.128.1%2B1.21.7.jar packtest_url: https://cdn.modrinth.com/data/XsKUhp45/versions/PAYctH3X/packtest-2.2-mc1.21.7.jar + - version: '1.21.10' + fabric_server_url: https://meta.fabricmc.net/v2/versions/loader/1.21.10/0.18.1/1.1.0/server/jar + fabric_api_url: https://cdn.modrinth.com/data/P7dR8mSH/versions/dQ3p80zK/fabric-api-0.138.3%2B1.21.10.jar + packtest_url: https://cdn.modrinth.com/data/XsKUhp45/versions/11yGLsYO/packtest-2.3-beta1-mc1.21.10.jar name: 'test-${{ matrix.version }}' runs-on: ubuntu-24.04 steps: diff --git a/base/data/gm4/tags/block/no_collision.json b/base/data/gm4/tags/block/no_collision.json index 16594909de..0f68d3adbb 100644 --- a/base/data/gm4/tags/block/no_collision.json +++ b/base/data/gm4/tags/block/no_collision.json @@ -27,6 +27,7 @@ "minecraft:cave_vines_plant", "minecraft:cherry_sapling", "minecraft:cobweb", + {"id": "minecraft:copper_torch", "required": false}, "minecraft:crimson_fungus", "minecraft:crimson_roots", "minecraft:dark_oak_sapling", diff --git a/base/data/gm4/tags/block/waterloggable.json b/base/data/gm4/tags/block/waterloggable.json index c8dd82f56c..f0fc5f6291 100644 --- a/base/data/gm4/tags/block/waterloggable.json +++ b/base/data/gm4/tags/block/waterloggable.json @@ -1,18 +1,25 @@ { "values": [ - "#minecraft:rails", + "#minecraft:all_signs", + {"id": "#minecraft:bars", "required": false}, "#minecraft:campfires", "#minecraft:candles", + {"id": "#minecraft:chains", "required": false}, + {"id": "#minecraft:copper_chests", "required": false}, + {"id": "#minecraft:copper_golem_statues", "required": false}, + "#minecraft:corals", "#minecraft:fences", + {"id": "#minecraft:lanterns", "required": false}, "#minecraft:leaves", - "#minecraft:all_signs", + {"id": "#minecraft:lightning_rods", "required": false}, + "#minecraft:rails", "#minecraft:slabs", "#minecraft:stairs", "#minecraft:trapdoors", - "#minecraft:corals", "#minecraft:wall_corals", "#minecraft:wall_signs", "#minecraft:walls", + {"id": "#minecraft:wooden_shelves", "required": false}, "minecraft:amethyst_cluster", "minecraft:big_dripleaf", "minecraft:big_dripleaf_stem", @@ -20,7 +27,7 @@ "minecraft:blue_stained_glass_pane", "minecraft:brown_stained_glass_pane", "minecraft:calibrated_sculk_sensor", - "minecraft:chain", + { "id": "minecraft:chain", "required": false }, "minecraft:chest", "minecraft:conduit", "minecraft:cyan_stained_glass_pane", diff --git a/base/data/gm4/tags/entity_type/passive.json b/base/data/gm4/tags/entity_type/passive.json index c40f449fea..18f67939b6 100644 --- a/base/data/gm4/tags/entity_type/passive.json +++ b/base/data/gm4/tags/entity_type/passive.json @@ -8,10 +8,12 @@ "minecraft:cat", "minecraft:chicken", "minecraft:cod", + {"id": "minecraft:copper_golem", "required": false}, "minecraft:cow", "minecraft:donkey", "minecraft:frog", "minecraft:glow_squid", + {"id": "minecraft:happy_ghast", "required": false}, "minecraft:horse", "minecraft:mooshroom", "minecraft:mule", diff --git a/gm4/modeldata_registry.json b/gm4/modeldata_registry.json index 3887abd244..430a974d53 100644 --- a/gm4/modeldata_registry.json +++ b/gm4/modeldata_registry.json @@ -240,12 +240,77 @@ "gm4_fulcio_shamir:shamir/fulcio": 115, "gm4_animi_shamir:shamir/animi": 124 }, + "copper_axe": { + "gm4_metallurgy:shamir/hypexperia": 110, + "gm4_metallurgy:shamir/arborenda": 112, + "gm4_metallurgy:shamir/moneo": 113, + "gm4_percurro_shamir:shamir/percurro": 117, + "gm4_audere_shamir:shamir/audere": 120, + "gm4_animi_shamir:shamir/animi": 124 + }, "copper_block": { "gm4_auto_crafting:guidebook_icon/auto_crafting": 1 }, + "copper_boots": { + "gm4_weighted_armour:shamir/helious": 103, + "gm4_metallurgy:shamir/defuse": 106, + "gm4_desire_lines:shamir/celaro": 118, + "gm4_vecto_shamir:shamir/vecto": 121, + "gm4_metallurgy:shamir/vibro": 123, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_chestplate": { + "gm4_weighted_armour:shamir/helious": 103, + "gm4_metallurgy:shamir/defuse": 106, + "gm4_iacio_shamir:shamir/iacio": 122, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_helmet": { + "gm4_weighted_armour:shamir/helious": 103, + "gm4_metallurgy:shamir/defuse": 106, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_hoe": { + "gm4_metallurgy:shamir/gemini": 109, + "gm4_metallurgy:shamir/tinker": 111, + "gm4_metallurgy:shamir/moneo": 113, + "gm4_audere_shamir:shamir/audere": 120, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_leggings": { + "gm4_weighted_armour:shamir/helious": 103, + "gm4_metallurgy:shamir/defuse": 106, + "gm4_animi_shamir:shamir/animi": 124 + }, "copper_ore": { "gm4_smelteries:block/ore_display/copper_ore": 2 }, + "copper_pickaxe": { + "gm4_metallurgy:shamir/forterra": 107, + "gm4_metallurgy:shamir/hypexperia": 110, + "gm4_metallurgy:shamir/tinker": 111, + "gm4_metallurgy:shamir/moneo": 113, + "gm4_lumos_shamir:shamir/lumos": 114, + "gm4_audere_shamir:shamir/audere": 120, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_shovel": { + "gm4_metallurgy:shamir/hypexperia": 110, + "gm4_metallurgy:shamir/tinker": 111, + "gm4_metallurgy:shamir/moneo": 113, + "gm4_lumos_shamir:shamir/lumos": 114, + "gm4_audere_shamir:shamir/audere": 120, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_sword": { + "gm4_metallurgy:shamir/ender_bolt": 105, + "gm4_metallurgy:shamir/musical": 108, + "gm4_metallurgy:shamir/hypexperia": 110, + "gm4_metallurgy:shamir/tinker": 111, + "gm4_orb_of_ankou:shamir/corripio": 116, + "gm4_percurro_shamir:shamir/percurro": 117, + "gm4_animi_shamir:shamir/animi": 124 + }, "crafting_table": { "gm4_custom_crafters:block/custom_crafter": 1, "gm4_standard_crafting:guidebook_icon/standard_crafting": 2, diff --git a/gm4/plugins/backwards.py b/gm4/plugins/backwards.py index ec018eaf9b..ecbcf93cd6 100644 --- a/gm4/plugins/backwards.py +++ b/gm4/plugins/backwards.py @@ -1,7 +1,6 @@ import logging from typing import Any, Tuple, Callable from beet import Context, Pack, NamespaceFile, ItemModel -from beet.core.utils import SupportedFormats logger = logging.getLogger("gm4.backwards") @@ -55,8 +54,7 @@ def backport(pack: Pack[Any], format: int, run: Callable[[str, NamespaceFile], N resources[(file_type, path)] = proxy[path] for overlay in pack.overlays.values(): - overlay_formats = overlay.supported_formats or overlay.pack_format - if check_formats(overlay_formats, format): + if check_formats(overlay, format): for file_type in overlay.resolve_scope_map().values(): proxy = overlay[file_type] for path in proxy.keys(): @@ -70,17 +68,29 @@ def backport(pack: Pack[Any], format: int, run: Callable[[str, NamespaceFile], N raise e if new_resource: overlay = pack.overlays[f"backport_{format}"] - overlay.supported_formats = { "min_inclusive": 0, "max_inclusive": format } + overlay.supported_formats = { "min_inclusive": 1, "max_inclusive": format } + overlay.min_format = 1 + overlay.max_format = format overlay[path] = new_resource -def check_formats(supported: SupportedFormats, format: int): - match supported: - case int(value): - return value == format - case [min, max]: - return min <= format <= max - case { "min_inclusive": min, "max_inclusive": max }: - return min <= format <= max - case _: - raise ValueError(f"Unknown supported_formats structure {supported}") +def check_formats(overlay: Pack[Any], format: int): + if overlay.min_format and overlay.max_format: + return get_major(overlay.min_format) <= format <= get_major(overlay.max_format) + if overlay.supported_formats: + match overlay.supported_formats: + case int(value): + return value == format + case [min, max]: + return min <= format <= max + case { "min_inclusive": min, "max_inclusive": max }: + return min <= format <= max + case _: + raise ValueError(f"Unknown supported_formats structure {overlay.supported_formats}") + if overlay.pack_format: + return overlay.pack_format == format + return False + + +def get_major(format: int | tuple[int] | tuple[int, int]): + return format if isinstance(format, int) else format[0] diff --git a/gm4/plugins/manifest.py b/gm4/plugins/manifest.py index dba404fe1d..1fd56e3a54 100644 --- a/gm4/plugins/manifest.py +++ b/gm4/plugins/manifest.py @@ -21,7 +21,7 @@ parent_logger = logging.getLogger("gm4.manifest") -SUPPORTED_GAME_VERSIONS = ["1.21.5", "1.21.6", "1.21.7", "1.21.8"] +SUPPORTED_GAME_VERSIONS = ["1.21.5", "1.21.6", "1.21.7", "1.21.8", "1.21.9", "1.21.10"] # config models for beet.yaml metas CreditsModel = dict[str, list[str]] diff --git a/gm4/plugins/resource_pack.py b/gm4/plugins/resource_pack.py index 10c80ff25c..0cb72b79f5 100644 --- a/gm4/plugins/resource_pack.py +++ b/gm4/plugins/resource_pack.py @@ -68,7 +68,7 @@ JsonType = dict[str,Any] CUSTOM_MODEL_PREFIX = 3420000 -MINECRAFT_REFERENECE_VERSION = "1.21.6" +MINECRAFT_REFERENECE_VERSION = "1.21.9" parent_logger = logging.getLogger("gm4.resource_pack") diff --git a/gm4/plugins/write_mcmeta.py b/gm4/plugins/write_mcmeta.py index c804a9fb0e..26395a1a1c 100644 --- a/gm4/plugins/write_mcmeta.py +++ b/gm4/plugins/write_mcmeta.py @@ -10,16 +10,21 @@ def beet_default(ctx: Context): manifest_entry = {v.id:v for v in (manifest.modules|manifest.libraries).values()}.get(ctx.project_id, NoneAttribute()) ctx.data.pack_format = 71 - ctx.data.supported_formats = {"min_inclusive": 71, "max_inclusive": 81} + ctx.data.supported_formats = {"min_inclusive": 71, "max_inclusive": 88} + ctx.data.min_format = 71 + ctx.data.max_format = (88, 0) + ctx.assets.pack_format = 55 - ctx.assets.supported_formats = {"min_inclusive": 55, "max_inclusive": 64} + ctx.assets.supported_formats = {"min_inclusive": 55, "max_inclusive": 69} + ctx.assets.min_format = 55 + ctx.assets.max_format = (69, 0) for pack in ctx.packs: pack.description = [ ctx.project_name, "\n", { - "text": f"Gamemode 4 (1.21.5 - 1.21.8)", + "text": f"Gamemode 4 (1.21.5 - 1.21.9)", "color": "#4AA0C7" } ] diff --git a/gm4/skin_cache.json b/gm4/skin_cache.json index 505748697a..d20053013e 100644 --- a/gm4/skin_cache.json +++ b/gm4/skin_cache.json @@ -956,6 +956,39 @@ "value": "eyd0ZXh0dXJlcyc6IHsnU0tJTic6IHsndXJsJzogJ2h0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYzA1YTY0N2YzYmY2YzMzZGQwNWI5M2JkZTJiNzRlYzViOWE5YTMxODQxM2FlZWRkZGE3ZDFhYjk3NDVkZmE5OCd9fX0=", "hash": "b1173eacf6e07f062e2301d25669acc1a3a0ac20", "parent_module": "gm4_metallurgy" + }, + "gm4_lightning_in_a_bottle:texture_connector_exposed": { + "uuid": [ + 1105086427, + -2014818885, + -2050456398, + 1819890536 + ], + "value": "eyd0ZXh0dXJlcyc6IHsnU0tJTic6IHsndXJsJzogJ2h0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjU0ZTFmZmZlNzNiMjljMGU1NzVhOTg2OTI3OTJhZTIxYzQwNDUzZmMxNDRiYjYxZjE4ZDBmZjhmMjY3N2IxMSd9fX0=", + "hash": "3ba0bc3626c0acf3c8c19ecd9801db477e5f4ef4", + "parent_module": "gm4_lightning_in_a_bottle" + }, + "gm4_lightning_in_a_bottle:texture_connector_weathered": { + "uuid": [ + -53579126, + -1276100194, + -1254675310, + 1810892024 + ], + "value": "eyd0ZXh0dXJlcyc6IHsnU0tJTic6IHsndXJsJzogJ2h0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTExYjlhYjJlZmY4ZDMzYzU3ZWUyMjVjYWQ5ZmNkMTFmN2JmN2I4MzI2YWJlMTVhOWQ1MzUwNjNmOTZkOGZjMCd9fX0=", + "hash": "4ae3138c18bcb10d5074aa45c403f7a2192a79b8", + "parent_module": "gm4_lightning_in_a_bottle" + }, + "gm4_lightning_in_a_bottle:texture_connector_oxidized": { + "uuid": [ + -1160792602, + 948128354, + -1355641425, + 1430620480 + ], + "value": "eyd0ZXh0dXJlcyc6IHsnU0tJTic6IHsndXJsJzogJ2h0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDY1ZGQ5Njg5MzIyNDZjZjgwODA3Y2E2NmY4M2Y0MThjNjc5YTIzMjI5MDdiYmNkMWYxN2I4ZTQ3NWUwYzE4J319fQ==", + "hash": "0ec19a60309722db4e5d57cba06c29bc62d5051f", + "parent_module": "gm4_lightning_in_a_bottle" } }, "nonnative_references": { diff --git a/gm4_audere_shamir/data/gm4_audere_shamir/function/active_tool.mcfunction b/gm4_audere_shamir/data/gm4_audere_shamir/function/active_tool.mcfunction index 04373d55d4..1472f582ea 100644 --- a/gm4_audere_shamir/data/gm4_audere_shamir/function/active_tool.mcfunction +++ b/gm4_audere_shamir/data/gm4_audere_shamir/function/active_tool.mcfunction @@ -13,6 +13,7 @@ execute if score $tool_max_damage gm4_ml_data matches 1561 if predicate gm4_aude # activate audere execute if score $tool_max_damage gm4_ml_data matches 59 run function gm4_audere_shamir:tools/materials/wood execute if score $tool_max_damage gm4_ml_data matches 131 run function gm4_audere_shamir:tools/materials/stone +execute if score $tool_max_damage gm4_ml_data matches 190 run function gm4_audere_shamir:tools/materials/copper execute if score $tool_max_damage gm4_ml_data matches 250 run function gm4_audere_shamir:tools/materials/iron execute if score $tool_max_damage gm4_ml_data matches 1561 run function gm4_audere_shamir:tools/materials/diamond execute if score $tool_max_damage gm4_ml_data matches 2031 run function gm4_audere_shamir:tools/materials/netherite diff --git a/gm4_audere_shamir/data/gm4_audere_shamir/function/tools/materials/copper.mcfunction b/gm4_audere_shamir/data/gm4_audere_shamir/function/tools/materials/copper.mcfunction new file mode 100644 index 0000000000..6925868d69 --- /dev/null +++ b/gm4_audere_shamir/data/gm4_audere_shamir/function/tools/materials/copper.mcfunction @@ -0,0 +1,10 @@ +# @s = player holding an Audere tool +# at @s +# run from active_tool + +scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data + +execute if score $tool_max_damage gm4_ml_data matches 52..139 run effect give @s minecraft:haste 2 0 +execute if score $tool_max_damage gm4_ml_data matches 20..51 run effect give @s minecraft:haste 2 1 +execute if score $tool_max_damage gm4_ml_data matches 8..19 run effect give @s minecraft:haste 2 2 +execute if score $tool_max_damage gm4_ml_data matches ..7 run effect give @s minecraft:haste 2 3 diff --git a/gm4_block_compressors/data/gm4_block_compressors/test/destroy.mcfunction b/gm4_block_compressors/data/gm4_block_compressors/test/destroy.mcfunction index acbf57abe0..1e0f00c1dc 100644 --- a/gm4_block_compressors/data/gm4_block_compressors/test/destroy.mcfunction +++ b/gm4_block_compressors/data/gm4_block_compressors/test/destroy.mcfunction @@ -1,5 +1,6 @@ # @template gm4:test_platform # @dummy ~ ~1 ~ +# @optional execute positioned ~1.5 ~1.5 ~1.5 run function gm4_block_compressors:machine/create give @s diamond_pickaxe diff --git a/gm4_cooler_caves/backport_81/data/minecraft/worldgen/noise_settings/overworld.json b/gm4_cooler_caves/backport_81/data/minecraft/worldgen/noise_settings/overworld.json new file mode 100644 index 0000000000..ec796ebbe1 --- /dev/null +++ b/gm4_cooler_caves/backport_81/data/minecraft/worldgen/noise_settings/overworld.json @@ -0,0 +1,2621 @@ +{ + "sea_level": 63, + "disable_mob_generation": false, + "aquifers_enabled": true, + "ore_veins_enabled": true, + "legacy_random_source": false, + "default_block": { + "Name": "minecraft:stone" + }, + "default_fluid": { + "Name": "minecraft:water", + "Properties": { + "level": "0" + } + }, + "noise": { + "min_y": -64, + "height": 384, + "size_horizontal": 1, + "size_vertical": 2 + }, + "noise_router": { + "barrier": { + "type": "minecraft:noise", + "noise": "minecraft:aquifer_barrier", + "xz_scale": 1, + "y_scale": 0.5 + }, + "fluid_level_floodedness": { + "type": "minecraft:noise", + "noise": "minecraft:aquifer_fluid_level_floodedness", + "xz_scale": 1, + "y_scale": 0.67 + }, + "fluid_level_spread": { + "type": "minecraft:noise", + "noise": "minecraft:aquifer_fluid_level_spread", + "xz_scale": 1, + "y_scale": 0.7142857142857143 + }, + "lava": { + "type": "minecraft:noise", + "noise": "minecraft:aquifer_lava", + "xz_scale": 1, + "y_scale": 1 + }, + "temperature": { + "type": "minecraft:shifted_noise", + "noise": "minecraft:temperature", + "xz_scale": 0.25, + "y_scale": 0, + "shift_x": "minecraft:shift_x", + "shift_y": 0, + "shift_z": "minecraft:shift_z" + }, + "vegetation": { + "type": "minecraft:shifted_noise", + "noise": "minecraft:vegetation", + "xz_scale": 0.25, + "y_scale": 0, + "shift_x": "minecraft:shift_x", + "shift_y": 0, + "shift_z": "minecraft:shift_z" + }, + "continents": "minecraft:overworld/continents", + "erosion": "minecraft:overworld/erosion", + "depth": "minecraft:overworld/depth", + "ridges": "minecraft:overworld/ridges", + "initial_density_without_jaggedness": { + "type": "minecraft:add", + "argument1": 0.1171875, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_y": -64, + "to_y": -40, + "from_value": 0, + "to_value": 1 + }, + "argument2": { + "type": "minecraft:add", + "argument1": -0.1171875, + "argument2": { + "type": "minecraft:add", + "argument1": -0.078125, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_y": 240, + "to_y": 256, + "from_value": 1, + "to_value": 0 + }, + "argument2": { + "type": "minecraft:add", + "argument1": 0.078125, + "argument2": { + "type": "minecraft:clamp", + "input": { + "type": "minecraft:add", + "argument1": -0.703125, + "argument2": { + "type": "minecraft:mul", + "argument1": 4, + "argument2": { + "type": "minecraft:quarter_negative", + "argument": { + "type": "minecraft:mul", + "argument1": "minecraft:overworld/depth", + "argument2": { + "type": "minecraft:cache_2d", + "argument": "minecraft:overworld/factor" + } + } + } + } + }, + "min": -64, + "max": 64 + } + } + } + } + } + } + }, + "final_density": { + "type": "minecraft:min", + "argument1": { + "type": "minecraft:squeeze", + "argument": { + "type": "minecraft:mul", + "argument1": 0.64, + "argument2": { + "type": "minecraft:interpolated", + "argument": { + "type": "minecraft:blend_density", + "argument": { + "type": "minecraft:add", + "argument1": 0.1171875, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_y": -64, + "to_y": -40, + "from_value": 0, + "to_value": 1 + }, + "argument2": { + "type": "minecraft:add", + "argument1": -0.1171875, + "argument2": { + "type": "minecraft:add", + "argument1": -0.078125, + "argument2": { + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_y": 240, + "to_y": 256, + "from_value": 1, + "to_value": 0 + }, + "argument2": { + "type": "minecraft:add", + "argument1": 0.078125, + "argument2": { + "type": "minecraft:range_choice", + "input": "minecraft:overworld/sloped_cheese", + "min_inclusive": -1000000, + "max_exclusive": 1.5625, + "when_in_range": { + "type": "minecraft:min", + "argument1": "minecraft:overworld/sloped_cheese", + "argument2": { + "type": "minecraft:mul", + "argument1": 5, + "argument2": "minecraft:overworld/caves/entrances" + } + }, + "when_out_of_range": { + "type": "minecraft:max", + "argument1": { + "type": "minecraft:min", + "argument1": { + "type": "minecraft:min", + "argument1": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:mul", + "argument1": 4, + "argument2": { + "type": "minecraft:square", + "argument": { + "type": "minecraft:noise", + "noise": "minecraft:cave_layer", + "xz_scale": 1, + "y_scale": 8 + } + } + }, + "argument2": { + "type": "minecraft:add", + "argument1": { + "type": "minecraft:clamp", + "input": { + "type": "minecraft:add", + "argument1": 0.27, + "argument2": { + "type": "minecraft:noise", + "noise": "minecraft:cave_cheese", + "xz_scale": 1, + "y_scale": 0.6666666666666666 + } + }, + "min": -1, + "max": 1 + }, + "argument2": { + "type": "minecraft:clamp", + "input": { + "type": "minecraft:add", + "argument1": 1.5, + "argument2": { + "type": "minecraft:mul", + "argument1": -0.64, + "argument2": "minecraft:overworld/sloped_cheese" + } + }, + "min": 0, + "max": 0.5 + } + } + }, + "argument2": "minecraft:overworld/caves/entrances" + }, + "argument2": { + "type": "minecraft:add", + "argument1": "minecraft:overworld/caves/spaghetti_2d", + "argument2": "minecraft:overworld/caves/spaghetti_roughness_function" + } + }, + "argument2": { + "type": "minecraft:range_choice", + "input": "minecraft:overworld/caves/pillars", + "min_inclusive": -1000000, + "max_exclusive": 0.03, + "when_in_range": -1000000, + "when_out_of_range": "minecraft:overworld/caves/pillars" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "argument2": "minecraft:overworld/caves/noodle" + }, + "vein_toggle": { + "type": "minecraft:interpolated", + "argument": { + "type": "minecraft:range_choice", + "input": "minecraft:y", + "min_inclusive": -60, + "max_exclusive": 51, + "when_in_range": { + "type": "minecraft:noise", + "noise": "minecraft:ore_veininess", + "xz_scale": 1.5, + "y_scale": 1.5 + }, + "when_out_of_range": 0 + } + }, + "vein_ridged": { + "type": "minecraft:add", + "argument1": -0.07999999821186066, + "argument2": { + "type": "minecraft:max", + "argument1": { + "type": "minecraft:abs", + "argument": { + "type": "minecraft:interpolated", + "argument": { + "type": "minecraft:range_choice", + "input": "minecraft:y", + "min_inclusive": -60, + "max_exclusive": 51, + "when_in_range": { + "type": "minecraft:noise", + "noise": "minecraft:ore_vein_a", + "xz_scale": 4, + "y_scale": 4 + }, + "when_out_of_range": 0 + } + } + }, + "argument2": { + "type": "minecraft:abs", + "argument": { + "type": "minecraft:interpolated", + "argument": { + "type": "minecraft:range_choice", + "input": "minecraft:y", + "min_inclusive": -60, + "max_exclusive": 51, + "when_in_range": { + "type": "minecraft:noise", + "noise": "minecraft:ore_vein_b", + "xz_scale": 4, + "y_scale": 4 + }, + "when_out_of_range": 0 + } + } + } + } + }, + "vein_gap": { + "type": "minecraft:noise", + "noise": "minecraft:ore_gap", + "xz_scale": 1, + "y_scale": 1 + } + }, + "spawn_target": [ + { + "temperature": [ + -1, + 1 + ], + "humidity": [ + -1, + 1 + ], + "continentalness": [ + -0.11, + 1 + ], + "erosion": [ + -1, + 1 + ], + "weirdness": [ + -1, + -0.16 + ], + "depth": 0, + "offset": 0 + }, + { + "temperature": [ + -1, + 1 + ], + "humidity": [ + -1, + 1 + ], + "continentalness": [ + -0.11, + 1 + ], + "erosion": [ + -1, + 1 + ], + "weirdness": [ + 0.16, + 1 + ], + "depth": 0, + "offset": 0 + } + ], + "surface_rule": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:vertical_gradient", + "random_name": "minecraft:bedrock_floor", + "true_at_and_below": { + "above_bottom": 0 + }, + "false_at_and_above": { + "above_bottom": 5 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:bedrock" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:above_preliminary_surface" + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "floor", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:wooded_badlands" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 97 + }, + "surface_depth_multiplier": 2, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": -0.909, + "max_threshold": -0.5454 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:coarse_dirt" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": -0.1818, + "max_threshold": 0.1818 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:coarse_dirt" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.5454, + "max_threshold": 0.909 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:coarse_dirt" + } + } + }, + { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:grass_block", + "Properties": { + "snowy": "false" + } + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:dirt" + } + } + ] + } + ] + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:swamp" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 62 + }, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 63 + }, + "surface_depth_multiplier": 0, + "add_stone_depth": false + } + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface_swamp", + "min_threshold": 0, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:water", + "Properties": { + "level": "0" + } + } + } + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:mangrove_swamp" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 60 + }, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 63 + }, + "surface_depth_multiplier": 0, + "add_stone_depth": false + } + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface_swamp", + "min_threshold": 0, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:water", + "Properties": { + "level": "0" + } + } + } + } + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:badlands", + "minecraft:eroded_badlands", + "minecraft:wooded_badlands" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "floor", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 256 + }, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:orange_terracotta" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 74 + }, + "surface_depth_multiplier": 1, + "add_stone_depth": true + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": -0.909, + "max_threshold": -0.5454 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:terracotta" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": -0.1818, + "max_threshold": 0.1818 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:terracotta" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.5454, + "max_threshold": 0.909 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:terracotta" + } + } + }, + { + "type": "minecraft:bandlands" + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": -1, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:red_sandstone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:red_sand" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:hole" + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:orange_terracotta" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": -6, + "surface_depth_multiplier": -1, + "add_stone_depth": true + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:white_terracotta" + } + } + }, + { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:gravel" + } + } + ] + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 63 + }, + "surface_depth_multiplier": -1, + "add_stone_depth": true + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 63 + }, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:not", + "invert": { + "type": "minecraft:y_above", + "anchor": { + "absolute": 74 + }, + "surface_depth_multiplier": 1, + "add_stone_depth": true + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:orange_terracotta" + } + } + } + }, + { + "type": "minecraft:bandlands" + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "floor", + "add_surface_depth": true, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": -6, + "surface_depth_multiplier": -1, + "add_stone_depth": true + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:white_terracotta" + } + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "floor", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": -1, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:frozen_ocean", + "minecraft:deep_frozen_ocean" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:hole" + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:air" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:temperature" + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:ice" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:water", + "Properties": { + "level": "0" + } + } + } + ] + } + } + }, + { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:frozen_peaks" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:steep" + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:packed_ice" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:packed_ice", + "min_threshold": 0, + "max_threshold": 0.2 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:packed_ice" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:ice", + "min_threshold": 0, + "max_threshold": 0.025 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:ice" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:snow_block" + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:snowy_slopes" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:steep" + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:powder_snow", + "min_threshold": 0.35, + "max_threshold": 0.6 + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:powder_snow" + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:snow_block" + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:jagged_peaks" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:steep" + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:snow_block" + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:grove" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:powder_snow", + "min_threshold": 0.35, + "max_threshold": 0.6 + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:powder_snow" + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:snow_block" + } + } + } + ] + } + }, + { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:stony_peaks" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:calcite", + "min_threshold": -0.0125, + "max_threshold": 0.0125 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:calcite" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:stony_shore" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:gravel", + "min_threshold": -0.05, + "max_threshold": 0.05 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:gravel" + } + } + ] + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:windswept_hills" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.12121212121212122, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:warm_ocean", + "minecraft:beach", + "minecraft:snowy_beach" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sandstone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sand" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:desert" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sandstone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sand" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:dripstone_caves" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + } + ] + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:windswept_savanna" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.21212121212121213, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": -0.06060606060606061, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:coarse_dirt" + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:windswept_gravelly_hills" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.24242424242424243, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:gravel" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.12121212121212122, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": -0.12121212121212122, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:grass_block", + "Properties": { + "snowy": "false" + } + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:dirt" + } + } + ] + } + }, + { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:gravel" + } + } + ] + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:old_growth_pine_taiga", + "minecraft:old_growth_spruce_taiga" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.21212121212121213, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:coarse_dirt" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": -0.11515151515151514, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:podzol", + "Properties": { + "snowy": "false" + } + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:frozen_river", + "minecraft:grove", + "minecraft:ice_spikes", + "minecraft:snowy_beach", + "minecraft:snowy_plains", + "minecraft:snowy_slopes", + "minecraft:snowy_taiga" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:snow_block" + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:mangrove_swamp" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:mud" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:mushroom_fields" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:mycelium", + "Properties": { + "snowy": "false" + } + } + } + }, + { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:grass_block", + "Properties": { + "snowy": "false" + } + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:dirt" + } + } + ] + } + ] + } + ] + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": -6, + "surface_depth_multiplier": -1, + "add_stone_depth": true + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "floor", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:frozen_ocean", + "minecraft:deep_frozen_ocean" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:hole" + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:water", + "Properties": { + "level": "0" + } + } + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "floor", + "add_surface_depth": true, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:frozen_peaks" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:steep" + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:packed_ice" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:packed_ice", + "min_threshold": -0.5, + "max_threshold": 0.2 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:packed_ice" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:ice", + "min_threshold": -0.0625, + "max_threshold": 0.025 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:ice" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:snow_block" + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:snowy_slopes" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:steep" + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:powder_snow", + "min_threshold": 0.45, + "max_threshold": 0.58 + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:powder_snow" + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:snow_block" + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:jagged_peaks" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:grove" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:powder_snow", + "min_threshold": 0.45, + "max_threshold": 0.58 + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:water", + "offset": 0, + "surface_depth_multiplier": 0, + "add_stone_depth": false + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:powder_snow" + } + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:packed_ice" + } + } + ] + } + }, + { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:stony_peaks" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:calcite", + "min_threshold": -0.0125, + "max_threshold": 0.0125 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:calcite" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:stony_shore" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:gravel", + "min_threshold": -0.05, + "max_threshold": 0.05 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:gravel" + } + } + ] + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:windswept_hills" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.12121212121212122, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:warm_ocean", + "minecraft:beach", + "minecraft:snowy_beach" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sandstone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sand" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:desert" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sandstone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sand" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:dripstone_caves" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + } + ] + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:windswept_savanna" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.21212121212121213, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:windswept_gravelly_hills" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.24242424242424243, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:gravel" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": 0.12121212121212122, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:noise_threshold", + "noise": "minecraft:surface", + "min_threshold": -0.12121212121212122, + "max_threshold": 1.7976931348623157e+308 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:dirt" + } + } + }, + { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:gravel" + } + } + ] + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:mangrove_swamp" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:mud" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:frozen_river", + "minecraft:ice_spikes", + "minecraft:snowy_beach", + "minecraft:snowy_plains", + "minecraft:snowy_taiga" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:packed_ice" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:dirt" + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:warm_ocean", + "minecraft:beach", + "minecraft:snowy_beach" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "floor", + "add_surface_depth": true, + "secondary_depth_range": 6 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sandstone" + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:desert" + ] + }, + "then_run": { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "floor", + "add_surface_depth": true, + "secondary_depth_range": 30 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sandstone" + } + } + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "floor", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:frozen_peaks", + "minecraft:jagged_peaks" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:warm_ocean", + "minecraft:lukewarm_ocean", + "minecraft:deep_lukewarm_ocean" + ] + }, + "then_run": { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sandstone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sand" + } + } + ] + } + }, + { + "type": "minecraft:sequence", + "sequence": [ + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:stone_depth", + "offset": 0, + "surface_type": "ceiling", + "add_surface_depth": false, + "secondary_depth_range": 0 + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:stone" + } + } + }, + { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:gravel" + } + } + ] + } + ] + } + } + ] + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:vertical_gradient", + "random_name": "minecraft:deepslate", + "true_at_and_below": { + "absolute": 0 + }, + "false_at_and_above": { + "absolute": 8 + } + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:deepslate", + "Properties": { + "axis": "y" + } + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:desert" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:sandstone" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:frozen_peaks", + "minecraft:frozen_river", + "minecraft:grove", + "minecraft:ice_spikes", + "minecraft:snowy_beach", + "minecraft:snowy_plains", + "minecraft:snowy_slopes", + "minecraft:snowy_taiga" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:snow_block" + } + } + }, + { + "type": "minecraft:condition", + "if_true": { + "type": "minecraft:biome", + "biome_is": [ + "minecraft:badlands", + "minecraft:eroded_badlands", + "minecraft:wooded_badlands" + ] + }, + "then_run": { + "type": "minecraft:block", + "result_state": { + "Name": "minecraft:terracotta" + } + } + } + ] + } +} diff --git a/gm4_cooler_caves/beet.yaml b/gm4_cooler_caves/beet.yaml index 7df3c56769..a5241832cd 100644 --- a/gm4_cooler_caves/beet.yaml +++ b/gm4_cooler_caves/beet.yaml @@ -4,6 +4,13 @@ version: 2.5.X data_pack: load: . + overlays: + - formats: + min_inclusive: 1 + max_inclusive: 81 + min_format: 1 + max_format: 81 + directory: backport_81 pipeline: - gm4.plugins.extend.module diff --git a/gm4_cooler_caves/data/minecraft/worldgen/noise_settings/overworld.json b/gm4_cooler_caves/data/minecraft/worldgen/noise_settings/overworld.json index ec796ebbe1..b434eaae2a 100644 --- a/gm4_cooler_caves/data/minecraft/worldgen/noise_settings/overworld.json +++ b/gm4_cooler_caves/data/minecraft/worldgen/noise_settings/overworld.json @@ -66,59 +66,65 @@ "erosion": "minecraft:overworld/erosion", "depth": "minecraft:overworld/depth", "ridges": "minecraft:overworld/ridges", - "initial_density_without_jaggedness": { - "type": "minecraft:add", - "argument1": 0.1171875, - "argument2": { - "type": "minecraft:mul", - "argument1": { - "type": "minecraft:y_clamped_gradient", - "from_y": -64, - "to_y": -40, - "from_value": 0, - "to_value": 1 - }, + "preliminary_surface_level": { + "type": "minecraft:find_top_surface", + "cell_height": 8, + "lower_bound": -64, + "upper_bound": 320, + "density": { + "type": "minecraft:add", + "argument1": 0.1171875, "argument2": { - "type": "minecraft:add", - "argument1": -0.1171875, + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_y": -64, + "to_y": -40, + "from_value": 0, + "to_value": 1 + }, "argument2": { "type": "minecraft:add", - "argument1": -0.078125, + "argument1": -0.1171875, "argument2": { - "type": "minecraft:mul", - "argument1": { - "type": "minecraft:y_clamped_gradient", - "from_y": 240, - "to_y": 256, - "from_value": 1, - "to_value": 0 - }, + "type": "minecraft:add", + "argument1": -0.078125, "argument2": { - "type": "minecraft:add", - "argument1": 0.078125, + "type": "minecraft:mul", + "argument1": { + "type": "minecraft:y_clamped_gradient", + "from_y": 240, + "to_y": 256, + "from_value": 1, + "to_value": 0 + }, "argument2": { - "type": "minecraft:clamp", - "input": { - "type": "minecraft:add", - "argument1": -0.703125, - "argument2": { - "type": "minecraft:mul", - "argument1": 4, + "type": "minecraft:add", + "argument1": 0.078125, + "argument2": { + "type": "minecraft:clamp", + "input": { + "type": "minecraft:add", + "argument1": -0.703125, "argument2": { - "type": "minecraft:quarter_negative", - "argument": { - "type": "minecraft:mul", - "argument1": "minecraft:overworld/depth", - "argument2": { - "type": "minecraft:cache_2d", - "argument": "minecraft:overworld/factor" + "type": "minecraft:mul", + "argument1": 4, + "argument2": { + "type": "minecraft:quarter_negative", + "argument": { + "type": "minecraft:mul", + "argument1": "minecraft:overworld/depth", + "argument2": { + "type": "minecraft:cache_2d", + "argument": "minecraft:overworld/factor" + } } } } - } - }, - "min": -64, - "max": 64 + }, + "min": -64, + "max": 64 + } } } } diff --git a/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction new file mode 100644 index 0000000000..9e2a59342c --- /dev/null +++ b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction @@ -0,0 +1,33 @@ +# Check item in offhand to shoot +# @s = player using the crossbow +# at arrow +# run from shoot/any_arrow + +# tripwire +execute if entity @s[gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/string,x_rotation=-15..15] align xyz positioned ~0.5 ~ ~0.5 run function gm4_crossbow_cartridges:cables/shoot_arrow + +# bucket with fish/axolotl +execute if entity @s[tag=!gm4_cb_use,predicate=gm4_crossbow_cartridges:items/bucket] run function gm4_crossbow_cartridges:projectile/bucket + +# torch +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/torch] run function gm4_crossbow_cartridges:projectile/torch +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/redstone_torch] run function gm4_crossbow_cartridges:projectile/redstone_torch +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/soul_torch] run function gm4_crossbow_cartridges:projectile/soul_torch + +# potions +execute if entity @s[tag=!gm4_cb_use,predicate=gm4_crossbow_cartridges:items/potions] run function gm4_crossbow_cartridges:projectile/potions + +# fireball +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/fire_charge] run function gm4_crossbow_cartridges:projectile/fireball + +# wind charge +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/wind_charge] run function gm4_crossbow_cartridges:projectile/wind_charge + +# tnt +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/tnt] run function gm4_crossbow_cartridges:projectile/tnt + +# beehive +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/beehive] run function gm4_crossbow_cartridges:projectile/beehive + +tag @s remove gm4_cb_use +data remove storage gm4_crossbow_cartridges:temp projectile diff --git a/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction new file mode 100644 index 0000000000..a0bc60df4a --- /dev/null +++ b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction @@ -0,0 +1,6 @@ +# Check blocks, to place or drop copper torch +# @s = arrow with tag gm4_cb_ctorch, in a block +# at @s +# run from projectile/copper_torch/loop + +# EMPTY TO AVOID ERRORS diff --git a/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction new file mode 100644 index 0000000000..7e91ca513a --- /dev/null +++ b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction @@ -0,0 +1,6 @@ +# Place copper torch on a valid adjacent block +# @s = arrow with tag gm4_cb_ctorch, in a block +# at @s +# run from projectile/copper_torch/check + +# EMPTY TO AVOID ERRORS diff --git a/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json new file mode 100644 index 0000000000..208cd14970 --- /dev/null +++ b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json @@ -0,0 +1,11 @@ +{ + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "offhand": { + "items": [] + } + } + } +} diff --git a/gm4_crossbow_cartridges/beet.yaml b/gm4_crossbow_cartridges/beet.yaml index 9e1ada4a69..769aa3e521 100644 --- a/gm4_crossbow_cartridges/beet.yaml +++ b/gm4_crossbow_cartridges/beet.yaml @@ -4,6 +4,13 @@ version: 1.8.X data_pack: load: . + overlays: + - formats: + min_inclusive: 1 + max_inclusive: 81 + min_format: 1 + max_format: 81 + directory: backport_81 pipeline: - gm4.plugins.extend.module diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction index 7dd5dd7827..a5525466f2 100644 --- a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction @@ -1,7 +1,7 @@ # Check item in offhand to shoot # @s = player using the crossbow # at arrow -# run from functions in shoot/ +# run from shoot/any_arrow # tripwire execute if entity @s[gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/string,x_rotation=-15..15] align xyz positioned ~0.5 ~ ~0.5 run function gm4_crossbow_cartridges:cables/shoot_arrow @@ -13,6 +13,7 @@ execute if entity @s[tag=!gm4_cb_use,predicate=gm4_crossbow_cartridges:items/buc execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/torch] run function gm4_crossbow_cartridges:projectile/torch execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/redstone_torch] run function gm4_crossbow_cartridges:projectile/redstone_torch execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/soul_torch] run function gm4_crossbow_cartridges:projectile/soul_torch +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/copper_torch] run function gm4_crossbow_cartridges:projectile/copper_torch # potions execute if entity @s[tag=!gm4_cb_use,predicate=gm4_crossbow_cartridges:items/potions] run function gm4_crossbow_cartridges:projectile/potions diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch.mcfunction new file mode 100644 index 0000000000..ad725c9fd1 --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch.mcfunction @@ -0,0 +1,22 @@ +# Shoot copper torch +# @s = player using the crossbow +# at arrow +# run from check_projectile and projectile/copper_torch + +tag @s add gm4_cb_use + +# add tag to arrow +tag @e[tag=gm4_cb_arrow,distance=..1,sort=nearest,limit=1] add gm4_cb_ctorch + +# add fire to arrow +data merge entity @e[tag=gm4_cb_arrow,tag=gm4_cb_ctorch,distance=..1,sort=nearest,limit=1] {Fire:2000s} +tag @e[tag=gm4_cb_arrow,tag=gm4_cb_ctorch,distance=..1,sort=nearest,limit=1] remove gm4_cb_arrow + +# clear copper torch from player +item modify entity @s[gamemode=!creative] weapon.offhand gm4_crossbow_cartridges:remove_item + +# repeat +execute if entity @e[tag=gm4_cb_arrow,distance=..1,sort=nearest,limit=1] if entity @s[predicate=gm4_crossbow_cartridges:items/copper_torch] run function gm4_crossbow_cartridges:projectile/copper_torch + +# start loop to check if arrow is in ground +schedule function gm4_crossbow_cartridges:projectile/copper_torch/loop 4t diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction new file mode 100644 index 0000000000..44ce788df3 --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction @@ -0,0 +1,19 @@ +# Check blocks, to place or drop copper torch +# @s = arrow with tag gm4_cb_ctorch, in a block +# at @s +# run from projectile/copper_torch/loop + +# summon torch item if torch already exists at this block +execute if block ~ ~ ~ #gm4_crossbow_cartridges:torch run loot spawn ~ ~ ~ loot minecraft:blocks/copper_torch + +# place torch if possible +execute if block ~ ~ ~ #gm4:replaceable run function gm4_crossbow_cartridges:projectile/copper_torch/place + +# summon torch item if placing torch failed +execute unless block ~ ~ ~ #gm4_crossbow_cartridges:torch run loot spawn ~ ~ ~ loot minecraft:blocks/copper_torch + +# place block sound +playsound minecraft:block.wood.place block @a[distance=..15] + +# kill arrow +kill @s diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/loop.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/loop.mcfunction new file mode 100644 index 0000000000..b79d883595 --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/loop.mcfunction @@ -0,0 +1,6 @@ +# Check arrow with tag gm4_cb_ctorch +# run from projectile/copper_torch +# scheduled by projectile/copper_torch/loop + +execute as @e[tag=gm4_cb_ctorch,nbt={inGround:1b}] at @s run function gm4_crossbow_cartridges:projectile/copper_torch/check +execute if entity @e[tag=gm4_cb_ctorch,limit=1] run schedule function gm4_crossbow_cartridges:projectile/copper_torch/loop 4t diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction new file mode 100644 index 0000000000..844f3d744f --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction @@ -0,0 +1,10 @@ +# Place copper torch on a valid adjacent block +# @s = arrow with tag gm4_cb_ctorch, in a block +# at @s +# run from projectile/copper_torch/check + +execute positioned ~.1 ~ ~ if predicate gm4_crossbow_cartridges:check_block/east run setblock ~-.15 ~ ~ minecraft:copper_wall_torch[facing=west] +execute positioned ~ ~ ~.1 if predicate gm4_crossbow_cartridges:check_block/south run setblock ~ ~ ~-.15 minecraft:copper_wall_torch[facing=north] +execute positioned ~-.1 ~ ~ if predicate gm4_crossbow_cartridges:check_block/west run setblock ~.15 ~ ~ minecraft:copper_wall_torch[facing=east] +execute positioned ~ ~ ~-.1 if predicate gm4_crossbow_cartridges:check_block/north run setblock ~ ~ ~.15 minecraft:copper_wall_torch[facing=south] +execute positioned ~ ~-.1 ~ if predicate gm4_crossbow_cartridges:check_block/below run setblock ~ ~.15 ~ minecraft:copper_torch diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json new file mode 100644 index 0000000000..6f62ab1ad8 --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json @@ -0,0 +1,13 @@ +{ + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "offhand": { + "items": [ + "minecraft:copper_torch" + ] + } + } + } +} diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/tags/block/torch.json b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/tags/block/torch.json index c83f4ba735..aac4b1bf51 100644 --- a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/tags/block/torch.json +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/tags/block/torch.json @@ -3,8 +3,10 @@ "minecraft:torch", "minecraft:soul_torch", "minecraft:redstone_torch", + {"id": "minecraft:copper_torch", "required": false}, "minecraft:wall_torch", "minecraft:soul_wall_torch", - "minecraft:redstone_wall_torch" + "minecraft:redstone_wall_torch", + {"id": "minecraft:copper_wall_torch", "required": false} ] } diff --git a/gm4_desire_lines/data/gm4/tags/item/boots.json b/gm4_desire_lines/data/gm4/tags/item/boots.json deleted file mode 100644 index 6e94be5e38..0000000000 --- a/gm4_desire_lines/data/gm4/tags/item/boots.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "values": [ - "minecraft:netherite_boots", - "minecraft:diamond_boots", - "minecraft:golden_boots", - "minecraft:chainmail_boots", - "minecraft:iron_boots", - "minecraft:leather_boots" - ] -} diff --git a/gm4_desire_lines/data/gm4_celaro_shamir/predicate/shamir_active.json b/gm4_desire_lines/data/gm4_celaro_shamir/predicate/shamir_active.json index 0a924ec8de..46c5da00f3 100644 --- a/gm4_desire_lines/data/gm4_celaro_shamir/predicate/shamir_active.json +++ b/gm4_desire_lines/data/gm4_celaro_shamir/predicate/shamir_active.json @@ -4,7 +4,7 @@ "predicate": { "equipment": { "feet": { - "items": "#gm4:boots", + "items": "#minecraft:foot_armor", "predicates": { "minecraft:custom_data": "{gm4_metallurgy:{active_shamir:\"celaro\"}}" } diff --git a/gm4_desire_lines/data/gm4_desire_lines/function/init.mcfunction b/gm4_desire_lines/data/gm4_desire_lines/function/init.mcfunction index c822a9105a..1cfbfa707d 100644 --- a/gm4_desire_lines/data/gm4_desire_lines/function/init.mcfunction +++ b/gm4_desire_lines/data/gm4_desire_lines/function/init.mcfunction @@ -4,8 +4,8 @@ scoreboard objectives add gm4_dl_affcoarse dummy # constants scoreboard players set #base_probability gm4_desire_lines 1 scoreboard players set #sneak_penality gm4_desire_lines -5 -scoreboard players set #sprint_penalty gm4_desire_lines 5 -scoreboard players set #impact_penalty gm4_desire_lines 15 +scoreboard players set #sprint_penalty gm4_desire_lines 3 +scoreboard players set #impact_penalty gm4_desire_lines 8 execute unless score desire_lines gm4_modules matches 1 run data modify storage gm4:log queue append value {type:"install",module:"Desire Lines"} execute unless score desire_lines gm4_earliest_version < desire_lines gm4_modules run scoreboard players operation desire_lines gm4_earliest_version = desire_lines gm4_modules diff --git a/gm4_disassemblers/beet.yaml b/gm4_disassemblers/beet.yaml index 33bebe4206..95e6b309d8 100644 --- a/gm4_disassemblers/beet.yaml +++ b/gm4_disassemblers/beet.yaml @@ -4,6 +4,19 @@ version: 2.5.X data_pack: load: . + overlays: + - formats: + min_inclusive: 88 + max_inclusive: 88 + min_format: 88 + max_format: 88 + directory: since_88 + - formats: + min_inclusive: 81 + max_inclusive: 88 + min_format: 81 + max_format: 88 + directory: empty resource_pack: load: . diff --git a/gm4_disassemblers/generate_disassembly.py b/gm4_disassemblers/generate_disassembly.py index fcde183c3b..c5a9faa03a 100644 --- a/gm4_disassemblers/generate_disassembly.py +++ b/gm4_disassemblers/generate_disassembly.py @@ -4,6 +4,16 @@ from typing import Any ITEMS = { + "copper_sword": 191, + "copper_pickaxe": 191, + "copper_axe": 191, + "copper_shovel": 191, + "copper_hoe": 191, + "copper_helmet": 122, + "copper_chestplate": 177, + "copper_leggings": 166, + "copper_boots": 144, + "diamond_sword": 1562, "diamond_pickaxe": 1562, "diamond_axe": 1562, @@ -51,10 +61,12 @@ def beet_default(ctx: Context): """Creates a loot table for dropping the 9 result items when disassembling an item.""" vanilla = ctx.inject(Vanilla) - vanilla.minecraft_version = '1.21.5' + vanilla.minecraft_version = '1.21.9' recipes = vanilla.data.recipes for item, durability in ITEMS.items(): + output_pack = ctx.data.overlays["since_88"] if "copper" in item else ctx.data + recipe = recipes[f"minecraft:{item}"].data ingredients: list[tuple[str, int]] = [] if recipe["type"] == "minecraft:crafting_shaped": @@ -117,13 +129,14 @@ def beet_default(ctx: Context): }] }) - ctx.data[f"{ctx.project_id}:disassembleables/{item}"] = LootTable({ + output_pack[f"{ctx.project_id}:disassembleables/{item}"] = LootTable({ "__comment": "Generated by generate_disassembly.py", "type": "minecraft:generic", "pools": pools }) - caller: Any = { + # base pack + caller: dict[str, Any] = { "__comment": "Generated by generate_disassembly.py", "type": "minecraft:fishing", "pools": [{ @@ -132,6 +145,8 @@ def beet_default(ctx: Context): }] } for item in ITEMS: + if "copper" in item: + continue caller["pools"][0]["entries"][0]["children"].append({ "type": "minecraft:loot_table", "value": f'gm4_disassemblers:disassembleables/{item}', @@ -150,3 +165,32 @@ def beet_default(ctx: Context): }) ctx.data[f"{ctx.project_id}:caller"] = LootTable(caller) + + # since 88 overlay + caller_88: dict[str, Any] = { + "__comment": "Generated by generate_disassembly.py", + "type": "minecraft:fishing", + "pools": [{ + "rolls": 1, + "entries": [{"type":"minecraft:alternatives","children":[]}] + }] + } + for item in ITEMS: + caller_88["pools"][0]["entries"][0]["children"].append({ + "type": "minecraft:loot_table", + "value": f'gm4_disassemblers:disassembleables/{item}', + "conditions": [{ + "condition": "match_tool", + "predicate": { + "items": [f"minecraft:{item}"] + } + }] + }) + if item.startswith("diamond_"): + caller_88["pools"][0]["entries"][0]["children"][-1]["conditions"].append({ + "condition": "value_check", + "range": 1, + "value": {"type":"score","target":{"type":"fixed","name":"disassemble_diamonds"},"score":"gm4_disassembler"} + }) + + ctx.data.overlays["since_88"][f"{ctx.project_id}:caller"] = LootTable(caller_88) diff --git a/gm4_display_frames/data/gm4_display_frames/test/splash.mcfunction b/gm4_display_frames/data/gm4_display_frames/test/splash.mcfunction index 1b789d20aa..085a9cb49a 100644 --- a/gm4_display_frames/data/gm4_display_frames/test/splash.mcfunction +++ b/gm4_display_frames/data/gm4_display_frames/test/splash.mcfunction @@ -1,5 +1,6 @@ # @template gm4:test_platform # @dummy ~ ~1 ~ +# @optional fill ~2 ~1 ~ ~2 ~1 ~2 gray_concrete give @s item_frame diff --git a/gm4_everstone/data/gm4_everstone/function/age_locking/lock_age.mcfunction b/gm4_everstone/data/gm4_everstone/function/age_locking/lock_age.mcfunction index 1ce13c36e9..fe48aa2177 100644 --- a/gm4_everstone/data/gm4_everstone/function/age_locking/lock_age.mcfunction +++ b/gm4_everstone/data/gm4_everstone/function/age_locking/lock_age.mcfunction @@ -5,7 +5,7 @@ data merge entity @s[type=!#gm4_everstone:aging_mob] {Age:-2147483647} tag @s add gm4_everstone_locked kill @e[type=item,tag=gm4_everstone_used,distance=..1,limit=1] -particle minecraft:flash ~ ~2 ~ 0 0 0 0 20 +particle minecraft:flash{color:-1} ~ ~2 ~ 0 0 0 0 20 particle minecraft:explosion ~ ~ ~ 0 0 0 0 0 playsound minecraft:entity.illusioner.cast_spell master @a[distance=..8] ~ ~ ~ 0.3 0.6 advancement grant @a[distance=..4] only gm4:everstone diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/advancement/place_lightning_rod.json b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/advancement/place_lightning_rod.json index ca8c517f15..3e774cd4ef 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/advancement/place_lightning_rod.json +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/advancement/place_lightning_rod.json @@ -7,9 +7,7 @@ { "condition": "minecraft:match_tool", "predicate": { - "items": [ - "minecraft:lightning_rod" - ] + "items": "#gm4_lightning_in_a_bottle:lightning_rod" } }, { diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/check_structure.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/check_structure.mcfunction deleted file mode 100644 index 684bcb99ae..0000000000 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/check_structure.mcfunction +++ /dev/null @@ -1,7 +0,0 @@ -# checks for the existence of a connected lightning rod and a connector texture entity -# @s = @e[type=marker,tag=gm4_brewing_stand] -# at @s -# run from main - -execute if block ~ ~1 ~ lightning_rod[facing=up] align xyz unless entity @e[tag=gm4_lightning_rod_texture_connector,dy=0.01,limit=1] run summon item_display ~0.5 ~1 ~0.5 {Tags:["gm4_lightning_rod_texture_connector"],item:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":"$texture_connector"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.25,0.25,0.25]}} -execute unless block ~ ~1 ~ lightning_rod[facing=up] align xyz run kill @e[type=item_display,tag=gm4_lightning_rod_texture_connector,dy=0.01] diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/force_update.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/force_update.mcfunction index 1396a71280..f740a56f23 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/force_update.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/force_update.mcfunction @@ -6,5 +6,6 @@ # revoke advancement advancement revoke @s only gm4_lightning_in_a_bottle:place_lightning_rod -# update nearby brewing stands to check for texture connectors -execute as @e[type=marker,tag=gm4_brewing_stand,distance=..8] at @s run function gm4_lightning_in_a_bottle:brewing_stand/texture_connector/check_structure +# add texture connectors to nearby brewing stands +execute as @e[type=marker,tag=gm4_brewing_stand,distance=..8] at @s if block ~ ~1 ~ #gm4_lightning_in_a_bottle:lightning_rod[facing=up] \ + align xyz unless entity @e[tag=gm4_lightning_rod_texture_connector,dy=0.01,limit=1] run function gm4_lightning_in_a_bottle:brewing_stand/texture_connector/summon diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/process.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/process.mcfunction index c6a8b747bb..febe38180a 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/process.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/process.mcfunction @@ -1,6 +1,5 @@ - -# remove texture_connectors that are not in a brewing stand -execute as @e[type=item_display,tag=gm4_lightning_rod_texture_connector] at @s unless block ~ ~-0.1 ~ minecraft:brewing_stand run kill @s - -# self schedule +# scheduled from main and self schedule function gm4_lightning_in_a_bottle:brewing_stand/texture_connector/process 16t + +# process texture connectors for removal or texture change +execute as @e[type=item_display,tag=gm4_lightning_rod_texture_connector] at @s run function gm4_lightning_in_a_bottle:brewing_stand/texture_connector/update diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/summon.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/summon.mcfunction new file mode 100644 index 0000000000..6137b026a8 --- /dev/null +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/summon.mcfunction @@ -0,0 +1,16 @@ +# summons correct texture connector +# @s = @e[type=marker,tag=gm4_brewing_stand] or @e[type=armor_stand,tag=gm4_lightning_rod_texture_connector] +# at @s align xyz +# run from brewing_stand/texture_connector/force_update and main and upgrade_paths/1.4 + +# normal +execute if block ~ ~1 ~ #gm4_lightning_in_a_bottle:normal_lightning_rod run summon item_display ~0.5 ~1 ~0.5 {Tags:["gm4_lightning_rod_texture_connector"],item:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":"$texture_connector"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.25,0.25,0.25]}} + +# exposed +execute if block ~ ~1 ~ #gm4_lightning_in_a_bottle:exposed_lightning_rod run summon item_display ~0.5 ~1 ~0.5 {Tags:["gm4_lightning_rod_texture_connector"],item:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":"$texture_connector_exposed"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.25,0.25,0.25]}} + +# weathered +execute if block ~ ~1 ~ #gm4_lightning_in_a_bottle:weathered_lightning_rod run summon item_display ~0.5 ~1 ~0.5 {Tags:["gm4_lightning_rod_texture_connector"],item:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":"$texture_connector_weathered"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.25,0.25,0.25]}} + +# oxidized +execute if block ~ ~1 ~ #gm4_lightning_in_a_bottle:oxidized_lightning_rod run summon item_display ~0.5 ~1 ~0.5 {Tags:["gm4_lightning_rod_texture_connector"],item:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":"$texture_connector_oxidized"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.25,0.25,0.25]}} diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/update.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/update.mcfunction new file mode 100644 index 0000000000..b0c98d5b7f --- /dev/null +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/brewing_stand/texture_connector/update.mcfunction @@ -0,0 +1,22 @@ +# @s = @e[type=item_display,tag=gm4_lightning_rod_texture_connector] +# at @s +# run from brewing_stand/texture_connector/process + +# kill if unneeded +execute unless block ~ ~-0.1 ~ minecraft:brewing_stand run return run kill @s +execute unless block ~ ~ ~ #gm4_lightning_in_a_bottle:lightning_rod run return run kill @s + +# update texture +scoreboard players set $texture_changed gm4_liab_data 0 +# normal +execute unless score @s gm4_liab.oxidization matches 1 if block ~ ~ ~ #gm4_lightning_in_a_bottle:normal_lightning_rod store success score $texture_changed gm4_liab_data run data modify entity @s item.components merge value {"minecraft:profile":"$texture_connector"} +execute if score $texture_changed gm4_liab_data matches 1 run return run scoreboard players set @s gm4_liab.oxidization 1 +# exposed +execute unless score @s gm4_liab.oxidization matches 2 if block ~ ~ ~ #gm4_lightning_in_a_bottle:exposed_lightning_rod store success score $texture_changed gm4_liab_data run data modify entity @s item.components merge value {"minecraft:profile":"$texture_connector_exposed"} +execute if score $texture_changed gm4_liab_data matches 1 run return run scoreboard players set @s gm4_liab.oxidization 2 +# weathered +execute unless score @s gm4_liab.oxidization matches 3 if block ~ ~ ~ #gm4_lightning_in_a_bottle:weathered_lightning_rod store success score $texture_changed gm4_liab_data run data modify entity @s item.components merge value {"minecraft:profile":"$texture_connector_weathered"} +execute if score $texture_changed gm4_liab_data matches 1 run return run scoreboard players set @s gm4_liab.oxidization 3 +# oxidized +execute unless score @s gm4_liab.oxidization matches 4 if block ~ ~ ~ #gm4_lightning_in_a_bottle:oxidized_lightning_rod store success score $texture_changed gm4_liab_data run data modify entity @s item.components merge value {"minecraft:profile":"$texture_connector_oxidized"} +execute if score $texture_changed gm4_liab_data matches 1 run return run scoreboard players set @s gm4_liab.oxidization 4 diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/init.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/init.mcfunction index 1ac20ae1a7..d0b95108f1 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/init.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/init.mcfunction @@ -1,5 +1,6 @@ scoreboard objectives add gm4_liab_data dummy scoreboard players set #3 gm4_liab_data 3 +scoreboard objectives add gm4_liab.oxidization dummy execute unless score lightning_in_a_bottle gm4_modules matches 1 run data modify storage gm4:log queue append value {type:"install",module:"Lightning in a Bottle"} execute unless score lightning_in_a_bottle gm4_earliest_version < lightning_in_a_bottle gm4_modules run scoreboard players operation lightning_in_a_bottle gm4_earliest_version = lightning_in_a_bottle gm4_modules diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/lightning/check.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/lightning/check.mcfunction index 924441c6b4..bf4231c026 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/lightning/check.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/lightning/check.mcfunction @@ -7,8 +7,8 @@ tag @s add gm4_liab_processed # create Bottles of Lightning from Thick Potions in Brewing Stands under (or above) Lightning Rods -execute if block ~ ~-.01 ~ lightning_rod[facing=up] if block ~ ~-1.01 ~ brewing_stand positioned ~ ~-1.01 ~ run function gm4_lightning_in_a_bottle:brewing_stand/check_fuel -execute if block ~ ~-.01 ~ lightning_rod[facing=down] if block ~ ~.99 ~ brewing_stand positioned ~ ~.99 ~ run function gm4_lightning_in_a_bottle:brewing_stand/check_fuel +execute if block ~ ~-.01 ~ #gm4_lightning_in_a_bottle:lightning_rod[facing=up] if block ~ ~-1.01 ~ brewing_stand positioned ~ ~-1.01 ~ run function gm4_lightning_in_a_bottle:brewing_stand/check_fuel +execute if block ~ ~-.01 ~ #gm4_lightning_in_a_bottle:lightning_rod[facing=down] if block ~ ~.99 ~ brewing_stand positioned ~ ~.99 ~ run function gm4_lightning_in_a_bottle:brewing_stand/check_fuel # Lightning-based mob transformation # Evokers -> Illusioners diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/main.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/main.mcfunction index 239fa5eb60..a7f8046a62 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/main.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/main.mcfunction @@ -2,7 +2,8 @@ # find lightning aecs execute as @e[type=area_effect_cloud,tag=gm4_liab_lingering,predicate=gm4_lightning_in_a_bottle:random_strike] at @s run function gm4_lightning_in_a_bottle:sustain_lingering_lightning -# maintain lightning rod - brewing stand connectors -execute as @e[type=marker,tag=gm4_brewing_stand] at @s run function gm4_lightning_in_a_bottle:brewing_stand/texture_connector/check_structure +# summon lightning rod - brewing stand connectors if needed +execute as @e[type=marker,tag=gm4_brewing_stand] at @s if block ~ ~1 ~ #gm4_lightning_in_a_bottle:lightning_rod[facing=up] \ + align xyz unless entity @e[tag=gm4_lightning_rod_texture_connector,dy=0.01,limit=1] run function gm4_lightning_in_a_bottle:brewing_stand/texture_connector/summon schedule function gm4_lightning_in_a_bottle:main 4s diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/modify_cloud.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/modify_cloud.mcfunction index adda92a6fb..4ba8db33ac 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/modify_cloud.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/modify_cloud.mcfunction @@ -1,6 +1,7 @@ # change the lingering bottle's cloud particle effects # @s = aec with LiaB thrown lingering bottle effects -# run from potion_tracking/verify_landed_potion +# at a nearby gm4_liab_potion_tracker marker +# run from potion_tracking/potion_landed tag @s add gm4_liab_lingering data merge entity @s {custom_particle:{type:"minecraft:electric_spark"},RadiusOnUse:0f,RadiusPerTick:0f} diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/potion_landed.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/potion_landed.mcfunction index 0f65fa9597..166ed95973 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/potion_landed.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/potion_landed.mcfunction @@ -1,8 +1,8 @@ # force-kills tracker markers in case they are in lazy loaded chunks # @s = gm4_liab_potion_tracker markers -# at world spawn -# run from potion_tracker/verify_landed_potion +# at @s +# run from potion_tracking/verify_landed_potion -execute if block ~ ~-1 ~ lightning_rod align y run summon lightning_bolt ~ ~ ~ -execute unless block ~ ~-1 ~ lightning_rod run summon lightning_bolt ~ ~ ~ +execute if block ~ ~-1 ~ #gm4_lightning_in_a_bottle:lightning_rod align y run summon lightning_bolt ~ ~ ~ +execute unless block ~ ~-1 ~ #gm4_lightning_in_a_bottle:lightning_rod run summon lightning_bolt ~ ~ ~ execute as @e[type=area_effect_cloud,distance=..8,limit=1,sort=nearest,nbt={potion_contents:{custom_effects:[{id:'minecraft:night_vision',amplifier:12b,duration:1}]}}] run function gm4_lightning_in_a_bottle:potion_tracking/modify_cloud diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/verify_landed_potion.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/verify_landed_potion.mcfunction index d95fe905e2..6c451469a4 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/verify_landed_potion.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/potion_tracking/verify_landed_potion.mcfunction @@ -1,3 +1,5 @@ +# @s = gm4_liab_potion_tracker markers +# at @s # run from #gm4_potion_tracking/potion_landed execute if data storage gm4_potion_tracking:temp entity_data.Item.components."minecraft:custom_data"{gm4_lightning_in_a_bottle:1b} run function gm4_lightning_in_a_bottle:potion_tracking/potion_landed diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/sustain_lingering_lightning.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/sustain_lingering_lightning.mcfunction index c506c18b5c..11b98711c3 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/sustain_lingering_lightning.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/sustain_lingering_lightning.mcfunction @@ -4,5 +4,5 @@ # run from main # summon lightning; snap to lightning rod if there is one below -execute if block ~ ~-1 ~ lightning_rod align y run summon lightning_bolt ~ ~ ~ -execute unless block ~ ~-1 ~ lightning_rod run summon lightning_bolt ~ ~ ~ +execute if block ~ ~-1 ~ #gm4_lightning_in_a_bottle:lightning_rod align y run summon lightning_bolt ~ ~ ~ +execute unless block ~ ~-1 ~ #gm4_lightning_in_a_bottle:lightning_rod run summon lightning_bolt ~ ~ ~ diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/upgrade_paths/1.4.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/upgrade_paths/1.4.mcfunction index 0140981c8a..5c2dee732c 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/upgrade_paths/1.4.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/function/upgrade_paths/1.4.mcfunction @@ -1,4 +1,7 @@ # upgrades armor-stand gm4_lightning_rod_texture_connector's to item_displays +# @s = player +# at @s +# run via upgrade paths util -execute as @e[type=armor_stand,tag=gm4_lightning_rod_texture_connector] at @s align xyz run summon item_display ~0.5 ~1 ~0.5 {Tags:["gm4_lightning_rod_texture_connector"],item:{id:"minecraft:player_head",count:1,components:{"minecraft:profile":"$texture_connector"}},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.25,0.25,0.25]}} +execute as @e[type=armor_stand,tag=gm4_lightning_rod_texture_connector] at @s align xyz run function gm4_lightning_in_a_bottle:brewing_stand/texture_connector/summon kill @e[type=armor_stand,tag=gm4_lightning_rod_texture_connector] diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/guidebook/lightning_in_a_bottle.json b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/guidebook/lightning_in_a_bottle.json index b30fe4a0d2..725b976946 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/guidebook/lightning_in_a_bottle.json +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/guidebook/lightning_in_a_bottle.json @@ -24,9 +24,7 @@ "conditions": { "items": [ { - "items": [ - "minecraft:lightning_rod" - ] + "items": "#gm4_lightning_in_a_bottle:lightning_rod" } ] } diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/skins/texture_connector_exposed.png b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/skins/texture_connector_exposed.png new file mode 100644 index 0000000000..a5d3037364 Binary files /dev/null and b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/skins/texture_connector_exposed.png differ diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/skins/texture_connector_oxidized.png b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/skins/texture_connector_oxidized.png new file mode 100644 index 0000000000..603a895ff0 Binary files /dev/null and b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/skins/texture_connector_oxidized.png differ diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/skins/texture_connector_weathered.png b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/skins/texture_connector_weathered.png new file mode 100644 index 0000000000..bbe1cd437a Binary files /dev/null and b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/skins/texture_connector_weathered.png differ diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/exposed_lightning_rod.json b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/exposed_lightning_rod.json new file mode 100644 index 0000000000..0c78df4acf --- /dev/null +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/exposed_lightning_rod.json @@ -0,0 +1,6 @@ +{ + "values": [ + {"id": "minecraft:exposed_lightning_rod", "required": false}, + {"id": "minecraft:waxed_exposed_lightning_rod", "required": false} + ] +} diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/lightning_rod.json b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/lightning_rod.json new file mode 100644 index 0000000000..06da699b3e --- /dev/null +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/lightning_rod.json @@ -0,0 +1,12 @@ +{ + "values": [ + "minecraft:lightning_rod", + {"id": "minecraft:exposed_lightning_rod", "required": false}, + {"id": "minecraft:weathered_lightning_rod", "required": false}, + {"id": "minecraft:oxidized_lightning_rod", "required": false}, + {"id": "minecraft:waxed_lightning_rod", "required": false}, + {"id": "minecraft:waxed_exposed_lightning_rod", "required": false}, + {"id": "minecraft:waxed_weathered_lightning_rod", "required": false}, + {"id": "minecraft:waxed_oxidized_lightning_rod", "required": false}, + ] +} diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/normal_lightning_rod.json b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/normal_lightning_rod.json new file mode 100644 index 0000000000..ba7f4dfd3d --- /dev/null +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/normal_lightning_rod.json @@ -0,0 +1,6 @@ +{ + "values": [ + "minecraft:lightning_rod", + {"id": "minecraft:waxed_lightning_rod", "required": false} + ] +} diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/oxidized_lightning_rod.json b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/oxidized_lightning_rod.json new file mode 100644 index 0000000000..8600a54c6e --- /dev/null +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/oxidized_lightning_rod.json @@ -0,0 +1,6 @@ +{ + "values": [ + {"id": "minecraft:oxidized_lightning_rod", "required": false}, + {"id": "minecraft:waxed_oxidized_lightning_rod", "required": false} + ] +} diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/weathered_lightning_rod.json b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/weathered_lightning_rod.json new file mode 100644 index 0000000000..9d04d34759 --- /dev/null +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/block/weathered_lightning_rod.json @@ -0,0 +1,6 @@ +{ + "values": [ + {"id": "minecraft:weathered_lightning_rod", "required": false}, + {"id": "minecraft:waxed_weathered_lightning_rod", "required": false} + ] +} diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/item/lightning_rod.json b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/item/lightning_rod.json new file mode 100644 index 0000000000..06da699b3e --- /dev/null +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/tags/item/lightning_rod.json @@ -0,0 +1,12 @@ +{ + "values": [ + "minecraft:lightning_rod", + {"id": "minecraft:exposed_lightning_rod", "required": false}, + {"id": "minecraft:weathered_lightning_rod", "required": false}, + {"id": "minecraft:oxidized_lightning_rod", "required": false}, + {"id": "minecraft:waxed_lightning_rod", "required": false}, + {"id": "minecraft:waxed_exposed_lightning_rod", "required": false}, + {"id": "minecraft:waxed_weathered_lightning_rod", "required": false}, + {"id": "minecraft:waxed_oxidized_lightning_rod", "required": false}, + ] +} diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw.mcfunction index f1419e4c87..9a8857848d 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw.mcfunction @@ -1,5 +1,6 @@ # @template gm4:test_platform # @dummy ~1 ~1 ~ +# @optional loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning execute at @s run tp @s ~ ~ ~ facing ~ ~-1.5 ~1 diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_evoker.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_evoker.mcfunction index 61e67f3bdb..4691aa16fe 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_evoker.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_evoker.mcfunction @@ -1,5 +1,6 @@ # @template gm4:test_platform # @dummy ~1 ~1 ~ +# @optional summon pillager ~1.5 ~1 ~1.5 loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_guardian.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_guardian.mcfunction index ba588b7e19..5c4034ea2a 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_guardian.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_guardian.mcfunction @@ -1,5 +1,6 @@ # @template gm4:test_platform # @dummy ~1 ~1 ~ +# @optional setblock ~1 ~ ~1 prismarine_bricks loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_illusioner.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_illusioner.mcfunction index 61e67f3bdb..4691aa16fe 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_illusioner.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_illusioner.mcfunction @@ -1,5 +1,6 @@ # @template gm4:test_platform # @dummy ~1 ~1 ~ +# @optional summon pillager ~1.5 ~1 ~1.5 loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning diff --git a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_shulker.mcfunction b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_shulker.mcfunction index 404f77b616..bfde86b1e7 100644 --- a/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_shulker.mcfunction +++ b/gm4_lightning_in_a_bottle/data/gm4_lightning_in_a_bottle/test/throw_shulker.mcfunction @@ -1,5 +1,6 @@ # @template gm4:test_platform # @dummy ~1 ~1 ~ +# @optional setblock ~1 ~ ~1 purpur_block loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning diff --git a/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_mainhand_data.mcfunction b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_mainhand_data.mcfunction new file mode 100644 index 0000000000..c01f3f4493 --- /dev/null +++ b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_mainhand_data.mcfunction @@ -0,0 +1,29 @@ +# stores mainhand item data +# @s = player who right clicked on interaction holding a supported item +# at @s +# run from mechanics/interactions/placement/interact_rcd + +scoreboard players set $mainhand gm4_llp.data 1 + +data modify storage gm4_llp:temp DisplayType set from entity @s SelectedItem.id + +execute if items entity @s weapon.mainhand #gm4_lively_lily_pads:coral_fan run \ + scoreboard players set $item_type gm4_llp.data 1 +execute if items entity @s weapon.mainhand #gm4_lively_lily_pads:dead_coral_fan run \ + scoreboard players set $item_type gm4_llp.data 2 +execute if items entity @s weapon.mainhand minecraft:torch run \ + scoreboard players set $item_type gm4_llp.data 3 +execute if items entity @s weapon.mainhand minecraft:lantern run \ + scoreboard players set $item_type gm4_llp.data 4 +execute if items entity @s weapon.mainhand minecraft:soul_torch run \ + scoreboard players set $item_type gm4_llp.data 5 +execute if items entity @s weapon.mainhand minecraft:soul_lantern run \ + scoreboard players set $item_type gm4_llp.data 6 +execute if items entity @s weapon.mainhand #minecraft:candles run \ + scoreboard players set $item_type gm4_llp.data 7 +execute if items entity @s weapon.mainhand minecraft:cactus_flower run \ + scoreboard players set $item_type gm4_llp.data 8 +execute if items entity @s weapon.mainhand minecraft:redstone_torch run \ + scoreboard players set $item_type gm4_llp.data 9 +execute if items entity @s weapon.mainhand minecraft:spore_blossom run \ + scoreboard players set $item_type gm4_llp.data 10 diff --git a/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_offhand_data.mcfunction b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_offhand_data.mcfunction new file mode 100644 index 0000000000..d70f3eb482 --- /dev/null +++ b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_offhand_data.mcfunction @@ -0,0 +1,29 @@ +# stores offhand item data +# @s = player who right clicked on interaction holding a supported item +# at @s +# run from mechanics/interactions/placement/interact_rcd + +scoreboard players set $offhand gm4_llp.data 1 + +data modify storage gm4_llp:temp DisplayType set from entity @s equipment.offhand.id + +execute if items entity @s weapon.offhand #gm4_lively_lily_pads:coral_fan run \ + scoreboard players set $item_type gm4_llp.data 1 +execute if items entity @s weapon.offhand #gm4_lively_lily_pads:dead_coral_fan run \ + scoreboard players set $item_type gm4_llp.data 2 +execute if items entity @s weapon.offhand minecraft:torch run \ + scoreboard players set $item_type gm4_llp.data 3 +execute if items entity @s weapon.offhand minecraft:lantern run \ + scoreboard players set $item_type gm4_llp.data 4 +execute if items entity @s weapon.offhand minecraft:soul_torch run \ + scoreboard players set $item_type gm4_llp.data 5 +execute if items entity @s weapon.offhand minecraft:soul_lantern run \ + scoreboard players set $item_type gm4_llp.data 6 +execute if items entity @s weapon.offhand #minecraft:candles run \ + scoreboard players set $item_type gm4_llp.data 7 +execute if items entity @s weapon.offhand minecraft:cactus_flower run \ + scoreboard players set $item_type gm4_llp.data 8 +execute if items entity @s weapon.offhand minecraft:redstone_torch run \ + scoreboard players set $item_type gm4_llp.data 9 +execute if items entity @s weapon.offhand minecraft:spore_blossom run \ + scoreboard players set $item_type gm4_llp.data 10 diff --git a/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_mainhand_axe.mcfunction b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_mainhand_axe.mcfunction new file mode 100644 index 0000000000..46da57b435 --- /dev/null +++ b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_mainhand_axe.mcfunction @@ -0,0 +1,6 @@ +# returns 1 if max durability reached +# @s = player holding axe +# at @s +# run from mechanics/interactions/waxed_copper_lantern/used_mainhand_axe + +# EMPTY TO AVOID ERRORS diff --git a/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_offhand_axe.mcfunction b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_offhand_axe.mcfunction new file mode 100644 index 0000000000..53ca7cd773 --- /dev/null +++ b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_offhand_axe.mcfunction @@ -0,0 +1,6 @@ +# returns 1 if max durability reached +# @s = player holding axe +# at @s +# run from mechanics/interactions/waxed_copper_lantern/used_offhand_axe + +# EMPTY TO AVOID ERRORS diff --git a/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/particles/select_type.mcfunction b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/particles/select_type.mcfunction new file mode 100644 index 0000000000..9f389368f9 --- /dev/null +++ b/gm4_lively_lily_pads/backport_81/data/gm4_lively_lily_pads/function/mechanics/particles/select_type.mcfunction @@ -0,0 +1,25 @@ +# dispatches type +# @s = block display, tag=gm4_llp_light +# at @s +# run from tick + +execute if entity @s[tag=gm4_llp_lit_candle] run return run function gm4_lively_lily_pads:mechanics/particles/candle_count + +execute store result score $rand gm4_llp.data run random value 1..10 +execute if entity @s[tag=gm4_llp_smoke_torch] \ + if score $rand gm4_llp.data matches 1..6 run particle smoke ~ ~.6 ~ +execute if data entity @s {block_state:{Name:"minecraft:soul_torch"}} \ + if score $rand gm4_llp.data matches 1..9 run particle soul_fire_flame ~ ~.58 ~ +execute if data entity @s {block_state:{Name:"minecraft:torch"}} \ + if score $rand gm4_llp.data matches 1..9 run particle flame ~ ~.58 ~ +execute if data entity @s {block_state:{Name:"minecraft:redstone_torch"}} \ + if score $rand gm4_llp.data matches 1..8 run particle dust{color:[1,0,0],scale:0.8} ~ ~.58 ~ + +# refresh light block +execute if block ~ ~1 ~ light run setblock ~ ~1 ~ air +execute if entity @s[tag=gm4_llp_light.14] run setblock ~ ~1 ~ light[level=14] keep +execute if entity @s[tag=gm4_llp_light.9] run setblock ~ ~1 ~ light[level=9] keep +execute if entity @s[tag=gm4_llp_light.6] run setblock ~ ~1 ~ light[level=6] keep + +# copper lantern oxidization +execute if entity @s[tag=gm4_llp_unwaxed_copper_lantern] run function gm4_lively_lily_pads:mechanics/interactions/unwaxed_copper_lantern/attempt_oxidization diff --git a/gm4_lively_lily_pads/beet.yaml b/gm4_lively_lily_pads/beet.yaml index a02aa7d918..55ee3bbf3d 100644 --- a/gm4_lively_lily_pads/beet.yaml +++ b/gm4_lively_lily_pads/beet.yaml @@ -1,9 +1,16 @@ id: gm4_lively_lily_pads name: Lively Lily Pads -version: 3.0.X +version: 3.1.X data_pack: load: . + overlays: + - formats: + min_inclusive: 1 + max_inclusive: 81 + min_format: 1 + max_format: 81 + directory: backport_81 pipeline: - gm4.plugins.extend.module diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/punch_candle_rcd.json b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/punch_perma_rcd.json similarity index 85% rename from gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/punch_candle_rcd.json rename to gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/punch_perma_rcd.json index 5e9a7e33fd..49cb45eb21 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/punch_candle_rcd.json +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/punch_perma_rcd.json @@ -24,7 +24,7 @@ "entity": "this", "predicate": { "type": "minecraft:interaction", - "nbt": "{Tags:[\"gm4_llp_candle_rcd\"]}" + "nbt": "{Tags:[\"gm4_llp_perma_rcd\"]}" } } ] @@ -32,6 +32,6 @@ } }, "rewards": { - "function": "gm4_lively_lily_pads:mechanics/attacks/candle/hit_rcd" + "function": "gm4_lively_lily_pads:mechanics/attacks/perma/hit_rcd" } } diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/unwaxed_copper_rcd.json b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/unwaxed_copper_rcd.json new file mode 100644 index 0000000000..1f51ca72a2 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/unwaxed_copper_rcd.json @@ -0,0 +1,37 @@ +{ + "criteria": { + "requirement": { + "trigger": "minecraft:player_interacted_with_entity", + "conditions": { + "player": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type_specific": { + "type": "minecraft:player", + "gamemode": [ + "survival", + "creative" + ] + } + } + } + ], + "entity": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type": "minecraft:interaction", + "nbt": "{Tags:[\"gm4_llp_unwaxed_copper_rcd\"]}" + } + } + ] + } + } + }, + "rewards": { + "function": "gm4_lively_lily_pads:mechanics/interactions/unwaxed_copper_lantern/interact_rcd" + } +} diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/waxed_copper_rcd.json b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/waxed_copper_rcd.json new file mode 100644 index 0000000000..13c92ec645 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/advancement/waxed_copper_rcd.json @@ -0,0 +1,37 @@ +{ + "criteria": { + "requirement": { + "trigger": "minecraft:player_interacted_with_entity", + "conditions": { + "player": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type_specific": { + "type": "minecraft:player", + "gamemode": [ + "survival", + "creative" + ] + } + } + } + ], + "entity": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type": "minecraft:interaction", + "nbt": "{Tags:[\"gm4_llp_waxed_copper_rcd\"]}" + } + } + ] + } + } + }, + "rewards": { + "function": "gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/interact_rcd" + } +} diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/candle/hit_rcd.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/candle/hit_rcd.mcfunction deleted file mode 100644 index 8be3fba01e..0000000000 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/candle/hit_rcd.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -# candle hit, need to break -# @s = player who left clicked on a candle -# at @s -# run from advancement: punch_candle_rcd - -advancement revoke @s only gm4_lively_lily_pads:punch_candle_rcd - -# set creative flag -execute if entity @s[gamemode=creative] run scoreboard players set $creative gm4_llp.data 1 - -# process interaction -execute as @e[type=interaction,tag=gm4_llp_candle_rcd,distance=..8] if data entity @s attack at @s run function gm4_lively_lily_pads:mechanics/attacks/candle/process_interaction diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/perma/hit_rcd.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/perma/hit_rcd.mcfunction new file mode 100644 index 0000000000..94caded479 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/perma/hit_rcd.mcfunction @@ -0,0 +1,12 @@ +# perma rcd hit, need to break +# @s = player who left clicked on a perma rcd +# at @s +# run from advancement: punch_perma_rcd + +advancement revoke @s only gm4_lively_lily_pads:punch_perma_rcd + +# set creative flag +execute if entity @s[gamemode=creative] run scoreboard players set $creative gm4_llp.data 1 + +# process attack +execute as @e[type=interaction,tag=gm4_llp_perma_rcd,distance=..8] if data entity @s attack at @s run function gm4_lively_lily_pads:mechanics/attacks/perma/process_interaction diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/candle/process_interaction.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/perma/process_interaction.mcfunction similarity index 64% rename from gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/candle/process_interaction.mcfunction rename to gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/perma/process_interaction.mcfunction index c3cd415f70..84c8999a45 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/candle/process_interaction.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/attacks/perma/process_interaction.mcfunction @@ -1,6 +1,6 @@ -# @s = punched gm4_llp_candle_rcd interaction +# @s = punched gm4_llp_perma_rcd interaction # at @s -# run from mechanics/attacks/candle/hit_rcd +# run from mechanics/attacks/perma/hit_rcd # store time to check execute store result score $gametime gm4_llp.data run time query gametime @@ -12,8 +12,8 @@ data remove entity @s attack # fail if old attack execute unless score $gametime gm4_llp.data = $check_gametime gm4_llp.data run return fail -# break candle -execute align xyz as @e[type=block_display,tag=gm4_llp_candle,dx=0,limit=1] at @s run function gm4_lively_lily_pads:mechanics/cleanup/kill +# break decoration and perma rcd +execute align xyz as @e[type=block_display,tag=gm4_llp_display,dx=0,limit=1] at @s run function gm4_lively_lily_pads:mechanics/cleanup/kill # reset creative score, was checked in mechanics/cleanup/kill scoreboard players reset $creative gm4_llp.data diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/cleanup/kill.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/cleanup/kill.mcfunction index 87177cd1dc..c1241010a6 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/cleanup/kill.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/cleanup/kill.mcfunction @@ -1,7 +1,7 @@ # cleans up block display and drops item if needed # @s = gm4_llp_display block_display # at @s -# run from main and mechanics/attacks/candle/process_interaction +# run from main and mechanics/attacks/perma/process_interaction # delete light execute if entity @s[tag=gm4_llp_light] run fill ~ ~1 ~ ~ ~1 ~ air replace light @@ -26,5 +26,5 @@ execute if entity @s[tag=gm4_llp_spore_blossom_sound] run playsound minecraft:bl execute if entity @s[tag=gm4_llp_cactus_flower_sound] run playsound minecraft:block.cactus_flower.break block @a[distance=..16] ~ ~ ~ # kill entities -kill @e[type=minecraft:interaction,tag=gm4_llp_candle_rcd,limit=1,distance=..0.1] +kill @e[type=minecraft:interaction,tag=gm4_llp_perma_rcd,limit=1,distance=..0.1] kill @s diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/candles.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/candles.mcfunction index 92ed9ebfe9..17dea5ba05 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/candles.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/candles.mcfunction @@ -19,7 +19,7 @@ $summon minecraft:block_display ~ ~ ~ {\ right_rotation:[0f,0f,0f,1f]\ }\ } -summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,response:1b,Tags:["gm4_llp_candle_rcd","smithed.entity","smithed.strict"]} +summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,response:1b,Tags:["gm4_llp_candle_rcd","gm4_llp_perma_rcd","smithed.entity","smithed.strict"]} # sound playsound minecraft:block.candle.place block @a[distance=..16] ~ ~ ~ diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_lantern.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_lantern.mcfunction new file mode 100644 index 0000000000..24c35344dc --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_lantern.mcfunction @@ -0,0 +1,25 @@ +# places copper lantern displays +# @s = placement rcd +# at lily_pad align xyz positioned ~.5 ~.02 ~.5 +# with {DisplayType} +# run from mechanics/interactions/placement/process_interaction + +$summon minecraft:block_display ~ ~ ~ {\ + Tags:["gm4_llp_display","gm4_llp_light","gm4_llp_light.14","gm4_llp_lantern_sound","gm4_llp_unwaxed_copper_lantern","smithed.entity"],\ + block_state:{\ + Name:"$(DisplayType)"\ + },\ + transformation:{\ + scale:[0.8f,0.8f,0.8f],\ + translation:[-0.4f,0f,-0.4f],\ + left_rotation:[0f,0f,0f,1f],\ + right_rotation:[0f,0f,0f,1f]\ + }\ +} +summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,response:1b,Tags:["gm4_llp_unwaxed_copper_rcd","gm4_llp_perma_rcd","smithed.entity","smithed.strict"]} + +# light block +setblock ~ ~1 ~ light[level=14] keep + +# sound +playsound minecraft:block.lantern.place block @a[distance=..16] ~ ~ ~ diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_torch.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_torch.mcfunction new file mode 100644 index 0000000000..85484114bd --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/copper_torch.mcfunction @@ -0,0 +1,22 @@ +# places copper torch displays +# @s = placement rcd +# at lily_pad align xyz positioned ~.5 ~.02 ~.5 +# run from mechanics/interactions/placement/process_interaction + +summon minecraft:block_display ~ ~ ~ {\ + Tags:["gm4_llp_display","gm4_llp_light","gm4_llp_light.14","gm4_llp_wood_sound","gm4_llp_smoke_torch","smithed.entity"],\ + block_state:{\ + Name:"minecraft:copper_torch"\ + },\ + transformation:{\ + scale:[0.8f,0.8f,0.8f],\ + translation:[-0.4f,0f,-0.4f],\ + left_rotation:[0f,0f,0f,1f],\ + right_rotation:[0f,0f,0f,1f]\ + }\ +} +# light block +setblock ~ ~1 ~ light[level=14] keep + +# sound +playsound minecraft:block.wood.place block @a[distance=..16] ~ ~ ~ diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_mainhand_data.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_mainhand_data.mcfunction index c01f3f4493..55a5329a76 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_mainhand_data.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_mainhand_data.mcfunction @@ -27,3 +27,9 @@ execute if items entity @s weapon.mainhand minecraft:redstone_torch run \ scoreboard players set $item_type gm4_llp.data 9 execute if items entity @s weapon.mainhand minecraft:spore_blossom run \ scoreboard players set $item_type gm4_llp.data 10 +execute if items entity @s weapon.mainhand #gm4_lively_lily_pads:copper_lanterns run \ + scoreboard players set $item_type gm4_llp.data 11 +execute if items entity @s weapon.mainhand #gm4_lively_lily_pads:waxed_copper_lanterns run \ + scoreboard players set $item_type gm4_llp.data 12 +execute if items entity @s weapon.mainhand minecraft:copper_torch run \ + scoreboard players set $item_type gm4_llp.data 13 diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_offhand_data.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_offhand_data.mcfunction index d70f3eb482..4641189177 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_offhand_data.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/get_offhand_data.mcfunction @@ -27,3 +27,9 @@ execute if items entity @s weapon.offhand minecraft:redstone_torch run \ scoreboard players set $item_type gm4_llp.data 9 execute if items entity @s weapon.offhand minecraft:spore_blossom run \ scoreboard players set $item_type gm4_llp.data 10 +execute if items entity @s weapon.offhand #gm4_lively_lily_pads:copper_lanterns run \ + scoreboard players set $item_type gm4_llp.data 11 +execute if items entity @s weapon.offhand #gm4_lively_lily_pads:waxed_copper_lanterns run \ + scoreboard players set $item_type gm4_llp.data 12 +execute if items entity @s weapon.offhand minecraft:copper_torch run \ + scoreboard players set $item_type gm4_llp.data 13 diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/process_interaction.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/process_interaction.mcfunction index 67f601569a..57b06996ca 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/process_interaction.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/process_interaction.mcfunction @@ -24,6 +24,9 @@ execute if score $item_type gm4_llp.data matches 7 run function gm4_lively_lily_ execute if score $item_type gm4_llp.data matches 8 run function gm4_lively_lily_pads:mechanics/interactions/placement/cactus_flower execute if score $item_type gm4_llp.data matches 9 run function gm4_lively_lily_pads:mechanics/interactions/placement/redstone_torch execute if score $item_type gm4_llp.data matches 10 run function gm4_lively_lily_pads:mechanics/interactions/placement/spore_blossom +execute if score $item_type gm4_llp.data matches 11 run function gm4_lively_lily_pads:mechanics/interactions/placement/copper_lantern with storage gm4_llp:temp +execute if score $item_type gm4_llp.data matches 12 run function gm4_lively_lily_pads:mechanics/interactions/placement/waxed_copper_lantern with storage gm4_llp:temp +execute if score $item_type gm4_llp.data matches 13 run function gm4_lively_lily_pads:mechanics/interactions/placement/copper_torch # set flag scoreboard players set $placement_success gm4_llp.data 1 diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/waxed_copper_lantern.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/waxed_copper_lantern.mcfunction new file mode 100644 index 0000000000..252f592042 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/placement/waxed_copper_lantern.mcfunction @@ -0,0 +1,25 @@ +# places waxed copper lantern displays +# @s = placement rcd +# at lily_pad align xyz positioned ~.5 ~.02 ~.5 +# with {DisplayType} +# run from mechanics/interactions/placement/process_interaction + +$summon minecraft:block_display ~ ~ ~ {\ + Tags:["gm4_llp_display","gm4_llp_light","gm4_llp_light.14","gm4_llp_lantern_sound","gm4_llp_waxed_copper_lantern","smithed.entity"],\ + block_state:{\ + Name:"$(DisplayType)"\ + },\ + transformation:{\ + scale:[0.8f,0.8f,0.8f],\ + translation:[-0.4f,0f,-0.4f],\ + left_rotation:[0f,0f,0f,1f],\ + right_rotation:[0f,0f,0f,1f]\ + }\ +} +summon minecraft:interaction ~ ~ ~ {width:0.4f,height:0.4f,response:1b,Tags:["gm4_llp_waxed_copper_rcd","gm4_llp_perma_rcd","smithed.entity","smithed.strict"]} + +# light block +setblock ~ ~1 ~ light[level=14] keep + +# sound +playsound minecraft:block.lantern.place block @a[distance=..16] ~ ~ ~ diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/attempt_oxidization.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/attempt_oxidization.mcfunction new file mode 100644 index 0000000000..706e9fca43 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/attempt_oxidization.mcfunction @@ -0,0 +1,14 @@ +# simple oxidization logic with just a probability +# @s = block display, tag=gm4_llp_light, tag=gm4_llp_unwaxed_copper_lantern +# at @s +# run from mechanics/particles/select_type + +# this is only run once per entity every 8 ticks (0.4 seconds) +# with a 1/6500 chance every 0.4 seconds, in 30 minutes there will be a ~50% chance of oxidization +execute store result score $rand gm4_llp.data run random value 1..6500 +execute if score $rand gm4_llp.data matches 2.. run return fail + +# oxidize +execute if data entity @s {block_state:{Name:"minecraft:copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:exposed_copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:exposed_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:weathered_copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:weathered_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:oxidized_copper_lantern" diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/interact_rcd.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/interact_rcd.mcfunction new file mode 100644 index 0000000000..5512604df4 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/interact_rcd.mcfunction @@ -0,0 +1,27 @@ +# unwaxed copper lantern right click +# @s = player who right clicked on an unwaxed copper lantern +# at @s +# run from advancement: unwaxed_copper_rcd + +advancement revoke @s only gm4_lively_lily_pads:unwaxed_copper_rcd + +# reset scoreboards +scoreboard players set $mainhand gm4_llp.data 0 +scoreboard players set $offhand gm4_llp.data 0 +scoreboard players set $wax_used gm4_llp.data 0 +scoreboard players set $axe_used gm4_llp.data 0 + +# item data, need both mainhand and offhand +execute if items entity @s weapon.mainhand #minecraft:axes run scoreboard players set $mainhand gm4_llp.data 1 +execute if items entity @s weapon.mainhand honeycomb run scoreboard players set $mainhand gm4_llp.data 2 +execute if items entity @s weapon.offhand #minecraft:axes run scoreboard players set $offhand gm4_llp.data 1 +execute if items entity @s weapon.offhand honeycomb run scoreboard players set $offhand gm4_llp.data 2 + +# find interaction +execute as @e[type=interaction,tag=gm4_llp_unwaxed_copper_rcd,distance=..8] if data entity @s interaction at @s run function gm4_lively_lily_pads:mechanics/interactions/unwaxed_copper_lantern/process_interaction + +# item usage +execute if score $wax_used gm4_llp.data matches 1 run item modify entity @s[gamemode=!creative] weapon.mainhand {function:"minecraft:set_count",count:-1,add:1b} +execute if score $wax_used gm4_llp.data matches 2 run item modify entity @s[gamemode=!creative] weapon.offhand {function:"minecraft:set_count",count:-1,add:1b} +execute if score $axe_used gm4_llp.data matches 1 if entity @s[gamemode=!creative] run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/used_mainhand_axe +execute if score $axe_used gm4_llp.data matches 2 if entity @s[gamemode=!creative] run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/used_offhand_axe diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/process_display.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/process_display.mcfunction new file mode 100644 index 0000000000..313cf0c5f1 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/process_display.mcfunction @@ -0,0 +1,27 @@ +# @s = gm4_llp_unwaxed_copper_lantern block display +# at associated interaction +# run from mechanics/interactions/unwaxed_copper_lantern/process_interaction + +scoreboard players set $interaction_processed gm4_llp.data 0 + +# if mainhand honeycomb, wax +execute if score $interaction_processed gm4_llp.data matches 0 if score $mainhand gm4_llp.data matches 2 store success score $interaction_processed gm4_llp.data run scoreboard players set $wax_used gm4_llp.data 1 +# if no neither item in mainhand, but honeycomb in offhand, wax +execute if score $interaction_processed gm4_llp.data matches 0 if score $mainhand gm4_llp.data matches 0 if score $offhand gm4_llp.data matches 2 store success score $interaction_processed gm4_llp.data run scoreboard players set $wax_used gm4_llp.data 2 + +# check if can scrape +execute if score $interaction_processed gm4_llp.data matches 0 store success score $can_scrape gm4_llp.data unless data entity @s {block_state:{Name:"minecraft:copper_lantern"}} +# if cant scrape, but offhand honeycomb, wax +execute if score $interaction_processed gm4_llp.data matches 0 if score $can_scrape gm4_llp.data matches 0 if score $offhand gm4_llp.data matches 2 store success score $interaction_processed gm4_llp.data run scoreboard players set $wax_used gm4_llp.data 2 + +# if can scrape and mainhand axe, scrape +execute if score $interaction_processed gm4_llp.data matches 0 if score $can_scrape gm4_llp.data matches 1 if score $mainhand gm4_llp.data matches 1 store success score $interaction_processed gm4_llp.data run scoreboard players set $axe_used gm4_llp.data 1 +# if can scrape and offhand axe, scrape +execute if score $interaction_processed gm4_llp.data matches 0 if score $can_scrape gm4_llp.data matches 1 if score $offhand gm4_llp.data matches 1 store success score $interaction_processed gm4_llp.data run scoreboard players set $axe_used gm4_llp.data 2 + +# fail if nothing to do +execute if score $interaction_processed gm4_llp.data matches 0 run return fail + +# modify display +execute if score $wax_used gm4_llp.data matches 1..2 run function gm4_lively_lily_pads:mechanics/interactions/unwaxed_copper_lantern/wax_display +execute if score $axe_used gm4_llp.data matches 1..2 run function gm4_lively_lily_pads:mechanics/interactions/unwaxed_copper_lantern/scrape_display diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/process_interaction.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/process_interaction.mcfunction new file mode 100644 index 0000000000..b5c82da796 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/process_interaction.mcfunction @@ -0,0 +1,23 @@ +# @s = gm4_llp_unwaxed_copper_rcd rcd +# at @s +# run from mechanics/interactions/unwaxed_copper_lantern/interact_rcd + +# store time to check +execute store result score $gametime gm4_llp.data run time query gametime +execute store result score $check_gametime gm4_llp.data run data get entity @s interaction.timestamp 1 + +# clean +data remove entity @s interaction + +# fail if old interaction +execute unless score $gametime gm4_llp.data = $check_gametime gm4_llp.data run return fail + +# fail if neither item +execute if score $mainhand gm4_llp.data matches 0 if score $offhand gm4_llp.data matches 0 run return fail + +# redirect to display +execute as @e[type=block_display,tag=gm4_llp_unwaxed_copper_lantern,distance=..0.1,limit=1] run function gm4_lively_lily_pads:mechanics/interactions/unwaxed_copper_lantern/process_display + +# wax +execute if score $wax_used gm4_llp.data matches 1..2 run tag @s remove gm4_llp_unwaxed_copper_rcd +execute if score $wax_used gm4_llp.data matches 1..2 run tag @s add gm4_llp_waxed_copper_rcd diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/scrape_display.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/scrape_display.mcfunction new file mode 100644 index 0000000000..ae1b793263 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/scrape_display.mcfunction @@ -0,0 +1,12 @@ +# @s = gm4_llp_unwaxed_copper_lantern block display +# at associated interaction +# run from mechanics/interactions/unwaxed_copper_lantern/process_display + +# visuals +particle minecraft:scrape ~ ~.2 ~ 0.3 0.3 0.3 1 16 +playsound item.axe.scrape block @a[distance=..16] ~ ~ ~ + +# modify +execute if data entity @s {block_state:{Name:"minecraft:exposed_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:weathered_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:exposed_copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:oxidized_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:weathered_copper_lantern" diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/wax_display.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/wax_display.mcfunction new file mode 100644 index 0000000000..ce34a2873d --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/unwaxed_copper_lantern/wax_display.mcfunction @@ -0,0 +1,17 @@ +# @s = gm4_llp_unwaxed_copper_lantern block display +# at associated interaction +# run from mechanics/interactions/unwaxed_copper_lantern/process_display + +# visuals +particle minecraft:wax_on ~ ~.2 ~ 0.3 0.3 0.3 1 16 +playsound item.honeycomb.wax_on block @a[distance=..16] ~ ~ ~ + +# update tags +tag @s remove gm4_llp_unwaxed_copper_lantern +tag @s add gm4_llp_waxed_copper_lantern + +# modify +execute if data entity @s {block_state:{Name:"minecraft:copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:waxed_copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:exposed_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:waxed_exposed_copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:weathered_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:waxed_weathered_copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:oxidized_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:waxed_oxidized_copper_lantern" diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/damage_mainhand_axe.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/damage_mainhand_axe.mcfunction new file mode 100644 index 0000000000..644841e2c5 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/damage_mainhand_axe.mcfunction @@ -0,0 +1,8 @@ +# damages axe +# @s = player holding axe +# at @s +# run from mechanics/interactions/waxed_copper_lantern/used_mainhand_axe + +execute store result score $damage gm4_llp.data run data get entity @s SelectedItem.components."minecraft:damage" +execute store result storage gm4_llp:temp damage int 1 run scoreboard players add $damage gm4_llp.data 1 +function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/set_damage_mainhand with storage gm4_llp:temp diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/damage_offhand_axe.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/damage_offhand_axe.mcfunction new file mode 100644 index 0000000000..43dece0697 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/damage_offhand_axe.mcfunction @@ -0,0 +1,8 @@ +# damages axe +# @s = player holding axe +# at @s +# run from mechanics/interactions/waxed_copper_lantern/used_offhand_axe + +execute store result score $damage gm4_llp.data run data get entity @s equipment.offhand.components."minecraft:damage" +execute store result storage gm4_llp:temp damage int 1 run scoreboard players add $damage gm4_llp.data 1 +function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/set_damage_offhand with storage gm4_llp:temp diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/interact_rcd.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/interact_rcd.mcfunction new file mode 100644 index 0000000000..9d287252fe --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/interact_rcd.mcfunction @@ -0,0 +1,26 @@ +# waxed copper lantern right click +# @s = player who right clicked on an waxed copper lantern +# at @s +# run from advancement: waxed_copper_rcd + +advancement revoke @s only gm4_lively_lily_pads:waxed_copper_rcd + +# reset scoreboards +scoreboard players set $mainhand gm4_llp.data 0 +scoreboard players set $offhand gm4_llp.data 0 +scoreboard players set $holding_axe gm4_llp.data 0 +scoreboard players set $scraped gm4_llp.data 0 + +# item data, only care about axes +execute if items entity @s weapon.mainhand #minecraft:axes store success score $holding_axe gm4_llp.data run scoreboard players set $mainhand gm4_llp.data 1 +execute unless score $mainhand gm4_llp.data matches 1 if items entity @s weapon.offhand #minecraft:axes store success score $holding_axe gm4_llp.data run scoreboard players set $offhand gm4_llp.data 1 + +# find interaction +execute as @e[type=interaction,tag=gm4_llp_waxed_copper_rcd,distance=..8] if data entity @s interaction at @s run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/process_interaction + +# fail if not scraped +execute if score $scraped gm4_llp.data matches 0 run return fail + +# update axe durability +execute if score $mainhand gm4_llp.data matches 1 if entity @s[gamemode=!creative] run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/used_mainhand_axe +execute if score $offhand gm4_llp.data matches 1 if entity @s[gamemode=!creative] run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/used_offhand_axe diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_mainhand_axe.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_mainhand_axe.mcfunction new file mode 100644 index 0000000000..e73c93df59 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_mainhand_axe.mcfunction @@ -0,0 +1,14 @@ +# returns 1 if max durability reached +# @s = player holding axe +# at @s +# run from mechanics/interactions/waxed_copper_lantern/used_mainhand_axe + +execute if items entity @s weapon.mainhand golden_axe[damage=32] run return 1 +execute if items entity @s weapon.mainhand wooden_axe[damage=59] run return 1 +execute if items entity @s weapon.mainhand stone_axe[damage=131] run return 1 +execute if items entity @s weapon.mainhand copper_axe[damage=190] run return 1 +execute if items entity @s weapon.mainhand iron_axe[damage=250] run return 1 +execute if items entity @s weapon.mainhand diamond_axe[damage=1561] run return 1 +execute if items entity @s weapon.mainhand netherite_axe[damage=2031] run return 1 + +return fail diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_offhand_axe.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_offhand_axe.mcfunction new file mode 100644 index 0000000000..de66dce11c --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/max_durability_offhand_axe.mcfunction @@ -0,0 +1,14 @@ +# returns 1 if max durability reached +# @s = player holding axe +# at @s +# run from mechanics/interactions/waxed_copper_lantern/used_offhand_axe + +execute if items entity @s weapon.offhand golden_axe[damage=32] run return 1 +execute if items entity @s weapon.offhand wooden_axe[damage=59] run return 1 +execute if items entity @s weapon.offhand stone_axe[damage=131] run return 1 +execute if items entity @s weapon.offhand copper_axe[damage=190] run return 1 +execute if items entity @s weapon.offhand iron_axe[damage=250] run return 1 +execute if items entity @s weapon.offhand diamond_axe[damage=1561] run return 1 +execute if items entity @s weapon.offhand netherite_axe[damage=2031] run return 1 + +return fail diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/process_interaction.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/process_interaction.mcfunction new file mode 100644 index 0000000000..b1a461e7c6 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/process_interaction.mcfunction @@ -0,0 +1,26 @@ +# @s = gm4_llp_waxed_copper_rcd rcd +# at @s +# run from mechanics/interactions/waxed_copper_lantern/interact_rcd + +# store time to check +execute store result score $gametime gm4_llp.data run time query gametime +execute store result score $check_gametime gm4_llp.data run data get entity @s interaction.timestamp 1 + +# clean +data remove entity @s interaction + +# fail if old interaction +execute unless score $gametime gm4_llp.data = $check_gametime gm4_llp.data run return fail + +# no axe, no effect +execute if score $holding_axe gm4_llp.data matches 0 run return fail + +# scrape off wax +particle minecraft:wax_off ~ ~.2 ~ 0.3 0.3 0.3 1 16 +playsound item.axe.wax_off block @a[distance=..16] ~ ~ ~ +tag @s remove gm4_llp_waxed_copper_rcd +tag @s add gm4_llp_unwaxed_copper_rcd +# modify display to match +execute as @e[type=minecraft:block_display,tag=gm4_llp_waxed_copper_lantern,distance=..0.1,limit=1] run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/scrape_display +# set flag +scoreboard players set $scraped gm4_llp.data 1 diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/scrape_display.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/scrape_display.mcfunction new file mode 100644 index 0000000000..3bd4791080 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/scrape_display.mcfunction @@ -0,0 +1,13 @@ +# @s = gm4_llp_waxed_copper_lantern block display +# at associated gm4_llp_waxed_copper_rcd rcd +# run from mechanics/interactions/waxed_copper_lantern/process_interaction + +# update tags +tag @s remove gm4_llp_waxed_copper_lantern +tag @s add gm4_llp_unwaxed_copper_lantern + +# modify +execute if data entity @s {block_state:{Name:"minecraft:waxed_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:waxed_exposed_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:exposed_copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:waxed_weathered_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:weathered_copper_lantern" +execute if data entity @s {block_state:{Name:"minecraft:waxed_oxidized_copper_lantern"}} run return run data modify entity @s block_state.Name set value "minecraft:oxidized_copper_lantern" diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/set_damage_mainhand.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/set_damage_mainhand.mcfunction new file mode 100644 index 0000000000..c734d1df74 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/set_damage_mainhand.mcfunction @@ -0,0 +1,5 @@ +# @s = player who scraped wax +# at @s +# run from mechanics/interactions/waxed_copper_lantern/damage_mainhand_axe + +$item modify entity @s weapon.mainhand {function:"minecraft:set_components",components:{"minecraft:damage":$(damage)}} diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/set_damage_offhand.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/set_damage_offhand.mcfunction new file mode 100644 index 0000000000..6c3ca37a5b --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/set_damage_offhand.mcfunction @@ -0,0 +1,5 @@ +# @s = player who scraped wax +# at @s +# run from mechanics/interactions/waxed_copper_lantern/damage_offhand_axe + +$item modify entity @s weapon.offhand {function:"minecraft:set_components",components:{"minecraft:damage":$(damage)}} diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/used_mainhand_axe.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/used_mainhand_axe.mcfunction new file mode 100644 index 0000000000..fb091731ce --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/used_mainhand_axe.mcfunction @@ -0,0 +1,19 @@ +# calculates damage for axe +# @s = player who scraped wax +# at @s +# run from mechanics/interactions/waxed_copper_lantern/interact_rcd and mechanics/interactions/unwaxed_copper_lantern/interact_rcd + +# damage +execute store result score $level gm4_llp.data run data get entity @s SelectedItem.components."minecraft:enchantments"."minecraft:unbreaking" +scoreboard players add $level gm4_llp.data 1 +scoreboard players set $chance gm4_llp.data 100 +scoreboard players operation $chance gm4_llp.data /= $level gm4_llp.data +execute store result score $rand gm4_llp.data run random value 1..100 +execute if score $rand gm4_llp.data < $chance gm4_llp.data run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/damage_mainhand_axe + +# fail if not max durability +execute unless function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/max_durability_mainhand_axe run return fail + +# 0 durability remaining, break item +item replace entity @s weapon.mainhand with air +playsound minecraft:entity.item.break player @a[distance=..16] diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/used_offhand_axe.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/used_offhand_axe.mcfunction new file mode 100644 index 0000000000..aae02c8981 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/interactions/waxed_copper_lantern/used_offhand_axe.mcfunction @@ -0,0 +1,19 @@ +# calculates damage for axe +# @s = player who scraped wax +# at @s +# run from mechanics/interactions/waxed_copper_lantern/interact_rcd and mechanics/interactions/unwaxed_copper_lantern/interact_rcd + +# damage +execute store result score $level gm4_llp.data run data get entity @s equipment.offhand.components."minecraft:enchantments"."minecraft:unbreaking" +scoreboard players add $level gm4_llp.data 1 +scoreboard players set $chance gm4_llp.data 100 +scoreboard players operation $chance gm4_llp.data /= $level gm4_llp.data +execute store result score $rand gm4_llp.data run random value 1..100 +execute if score $rand gm4_llp.data < $chance gm4_llp.data run function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/damage_offhand_axe + +# fail if not max durability +execute unless function gm4_lively_lily_pads:mechanics/interactions/waxed_copper_lantern/max_durability_offhand_axe run return fail + +# 0 durability remaining, break item +item replace entity @s weapon.offhand with air +playsound minecraft:entity.item.break player @a[distance=..16] diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/particles/select_type.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/particles/select_type.mcfunction index efde43ce35..81e534d261 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/particles/select_type.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/mechanics/particles/select_type.mcfunction @@ -12,6 +12,8 @@ execute if data entity @s {block_state:{Name:"minecraft:soul_torch"}} \ if score $rand gm4_llp.data matches 1..9 run particle soul_fire_flame ~ ~.58 ~ execute if data entity @s {block_state:{Name:"minecraft:torch"}} \ if score $rand gm4_llp.data matches 1..9 run particle flame ~ ~.58 ~ +execute if data entity @s {block_state:{Name:"minecraft:copper_torch"}} \ + if score $rand gm4_llp.data matches 1..9 run particle copper_fire_flame ~ ~.58 ~ execute if data entity @s {block_state:{Name:"minecraft:redstone_torch"}} \ if score $rand gm4_llp.data matches 1..8 run particle dust{color:[1,0,0],scale:0.8} ~ ~.58 ~ @@ -20,3 +22,6 @@ execute if block ~ ~1 ~ light run setblock ~ ~1 ~ air execute if entity @s[tag=gm4_llp_light.14] run setblock ~ ~1 ~ light[level=14] keep execute if entity @s[tag=gm4_llp_light.9] run setblock ~ ~1 ~ light[level=9] keep execute if entity @s[tag=gm4_llp_light.6] run setblock ~ ~1 ~ light[level=6] keep + +# copper lantern oxidization +execute if entity @s[tag=gm4_llp_unwaxed_copper_lantern] run function gm4_lively_lily_pads:mechanics/interactions/unwaxed_copper_lantern/attempt_oxidization diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/tick.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/tick.mcfunction index 2417c1051b..9b90c14ed3 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/tick.mcfunction +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/tick.mcfunction @@ -1,5 +1,4 @@ -# handles particles and light_block refreshing - schedule function gm4_lively_lily_pads:tick 8t +# selects displays for particles, light_block refreshing, oxidization execute as @e[type=block_display,tag=gm4_llp_light] at @s run function gm4_lively_lily_pads:mechanics/particles/select_type diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/upgrade_paths/3.1.mcfunction b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/upgrade_paths/3.1.mcfunction new file mode 100644 index 0000000000..9fb342c410 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/function/upgrade_paths/3.1.mcfunction @@ -0,0 +1,6 @@ +# add gm4_llp_perma_rcd tag to gm4_llp_candle_rcd +# @s = player +# at @s +# run via upgrade paths util + +tag @e[type=interaction,tag=gm4_llp_candle_rcd,tag=!gm4_llp_perma_rcd] add gm4_llp_perma_rcd diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/copper_lanterns.json b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/copper_lanterns.json new file mode 100644 index 0000000000..04475cfdba --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/copper_lanterns.json @@ -0,0 +1,8 @@ +{ + "values": [ + {"id": "minecraft:copper_lantern", "required": false}, + {"id": "minecraft:exposed_copper_lantern", "required": false}, + {"id": "minecraft:weathered_copper_lantern", "required": false}, + {"id": "minecraft:oxidized_copper_lantern", "required": false} + ] +} diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/placeable_item.json b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/placeable_item.json index a15c49c3e5..8bccc11b7b 100644 --- a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/placeable_item.json +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/placeable_item.json @@ -1,9 +1,12 @@ { "values": [ + "#gm4_lively_lily_pads:copper_lanterns", "#gm4_lively_lily_pads:coral_fan", "#gm4_lively_lily_pads:dead_coral_fan", + "#gm4_lively_lily_pads:waxed_copper_lanterns", "#minecraft:candles", "minecraft:cactus_flower", + {"id": "minecraft:copper_torch", "required": false}, "minecraft:lantern", "minecraft:redstone_torch", "minecraft:torch", diff --git a/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/waxed_copper_lanterns.json b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/waxed_copper_lanterns.json new file mode 100644 index 0000000000..8dbd085944 --- /dev/null +++ b/gm4_lively_lily_pads/data/gm4_lively_lily_pads/tags/item/waxed_copper_lanterns.json @@ -0,0 +1,8 @@ +{ + "values": [ + {"id": "minecraft:waxed_copper_lantern", "required": false}, + {"id": "minecraft:waxed_exposed_copper_lantern", "required": false}, + {"id": "minecraft:waxed_weathered_copper_lantern", "required": false}, + {"id": "minecraft:waxed_oxidized_copper_lantern", "required": false} + ] +} diff --git a/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction new file mode 100644 index 0000000000..fbc4d71983 --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction @@ -0,0 +1,13 @@ +# @s = unspecified +# at = unspecified +# run from gm4_metallurgy:init + +scoreboard objectives add gm4_use_axe_net minecraft.used:minecraft.netherite_axe +scoreboard objectives add gm4_use_axe_dia minecraft.used:minecraft.diamond_axe +scoreboard objectives add gm4_use_axe_gol minecraft.used:minecraft.golden_axe +scoreboard objectives add gm4_use_axe_iro minecraft.used:minecraft.iron_axe +scoreboard objectives add gm4_use_axe_sto minecraft.used:minecraft.stone_axe +scoreboard objectives add gm4_use_axe_woo minecraft.used:minecraft.wooden_axe +scoreboard objectives add gm4_arb_depth dummy +scoreboard objectives add gm4_arb_data dummy +scoreboard players set #1 gm4_arb_data 1 diff --git a/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction new file mode 100644 index 0000000000..a956ef2250 --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction @@ -0,0 +1,26 @@ +# Calculates the speed of the axe used to break blocks. +# @s = player that just used an axe with arborenda +# at @s +# run from gm4_arborenda:player/chop + +# safe axe nbt (also used to calculate unbreaking numbers in gm4_arborenda_shamir:player/modify_axe_durability) +data modify storage gm4_arborenda_shamir:temp tool set from entity @s SelectedItem + +# set base material speed / breaking delay between block breaks +execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $axe_delay gm4_arb_data 5 +execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $axe_delay gm4_arb_data 6 +execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $axe_delay gm4_arb_data 3 +execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $axe_delay gm4_arb_data 8 +execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $axe_delay gm4_arb_data 13 +execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $axe_delay gm4_arb_data 22 + +# efficiency bonus (simplified formula, does not match vanilla) +execute store result score $efficiency_level gm4_arb_data run data get storage gm4_arborenda_shamir:temp tool.components."minecraft:enchantments"."minecraft:efficiency" +scoreboard players operation $axe_delay gm4_arb_data -= $efficiency_level gm4_arb_data + +# limit to min delay of 1 tick between block breaks +scoreboard players operation $axe_delay gm4_arb_data > #1 gm4_arb_data + +# calculate max depth +scoreboard players set $max_depth gm4_arb_data 32 +scoreboard players operation $max_depth gm4_arb_data *= $axe_delay gm4_arb_data diff --git a/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction new file mode 100644 index 0000000000..11d23e047e --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction @@ -0,0 +1,17 @@ +# Checks whether the player has used an arborenda axe. +# @s = all players +# at world spawn +# run from gm4_metallurgy:tick + +execute if entity @s[scores={gm4_use_axe_net=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_dia=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_gol=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_iro=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_sto=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_woo=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +scoreboard players reset @s gm4_use_axe_net +scoreboard players reset @s gm4_use_axe_dia +scoreboard players reset @s gm4_use_axe_gol +scoreboard players reset @s gm4_use_axe_iro +scoreboard players reset @s gm4_use_axe_sto +scoreboard players reset @s gm4_use_axe_woo diff --git a/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction new file mode 100644 index 0000000000..24d5cba6c8 --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction @@ -0,0 +1,27 @@ +# Reduces the durability on an arborenda axe according to the amount of blocks broken. +# @s = player that just used an axe with arborenda +# at @s +# run from gm4_arborenda:player/chop + +# get max damage - 1 for material type +execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $max_damage gm4_arb_data 2030 +execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $max_damage gm4_arb_data 1560 +execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $max_damage gm4_arb_data 31 +execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $max_damage gm4_arb_data 249 +execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $max_damage gm4_arb_data 130 +execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $max_damage gm4_arb_data 58 + +# get unbreaking level +execute store result score $unbreaking_level gm4_arb_data run data get storage gm4_arborenda_shamir:temp tool.components."minecraft:enchantments"."minecraft:unbreaking" +scoreboard players add $unbreaking_level gm4_arb_data 1 +scoreboard players set $damage_chance gm4_arb_data 100 +scoreboard players operation $damage_chance gm4_arb_data /= $unbreaking_level gm4_arb_data + +# calclulate and apply damage +execute store result score $current_damage gm4_arb_data run data get storage gm4_arborenda_shamir:temp tool.components."minecraft:damage" +execute store result score $incoming_damage gm4_arb_data run loot spawn ~ -4096 ~ loot gm4_arborenda_shamir:roll_binomial_distribution +scoreboard players operation $current_damage gm4_arb_data += $incoming_damage gm4_arb_data +scoreboard players operation $current_damage gm4_arb_data < $max_damage gm4_arb_data + +execute store result storage gm4_arborenda_shamir:temp damage int 1 run scoreboard players get $current_damage gm4_arb_data +function gm4_arborenda_shamir:player/set_damage with storage gm4_arborenda_shamir:temp diff --git a/gm4_metallurgy/backport_81/data/gm4_moneo_shamir/function/store_maximum.mcfunction b/gm4_metallurgy/backport_81/data/gm4_moneo_shamir/function/store_maximum.mcfunction new file mode 100644 index 0000000000..994af3a8ac --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_moneo_shamir/function/store_maximum.mcfunction @@ -0,0 +1,37 @@ +# run from #gm4_metallurgy:apply_band +# @s = moneo tool item + +# used by Audere Shamir as well +execute if items entity @s contents minecraft:wooden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 +execute if items entity @s contents minecraft:wooden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 +execute if items entity @s contents minecraft:wooden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 +execute if items entity @s contents minecraft:wooden_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 + +execute if items entity @s contents minecraft:stone_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 +execute if items entity @s contents minecraft:stone_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 +execute if items entity @s contents minecraft:stone_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 +execute if items entity @s contents minecraft:stone_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 + +execute if items entity @s contents minecraft:iron_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 +execute if items entity @s contents minecraft:iron_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 +execute if items entity @s contents minecraft:iron_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 +execute if items entity @s contents minecraft:iron_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 + +execute if items entity @s contents minecraft:diamond_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 1561 +execute if items entity @s contents minecraft:diamond_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 1561 +execute if items entity @s contents minecraft:diamond_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 1561 +execute if items entity @s contents minecraft:diamond_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 1561 + +execute if items entity @s contents minecraft:netherite_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 +execute if items entity @s contents minecraft:netherite_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 +execute if items entity @s contents minecraft:netherite_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 +execute if items entity @s contents minecraft:netherite_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 + +execute if items entity @s contents minecraft:golden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 +execute if items entity @s contents minecraft:golden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 +execute if items entity @s contents minecraft:golden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 +execute if items entity @s contents minecraft:golden_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 + +execute if items entity @s contents minecraft:shears run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 237 + +execute if items entity @s contents minecraft:elytra run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 432 diff --git a/gm4_metallurgy/beet.yaml b/gm4_metallurgy/beet.yaml index 0e48265243..d0c6ba47cd 100644 --- a/gm4_metallurgy/beet.yaml +++ b/gm4_metallurgy/beet.yaml @@ -4,6 +4,13 @@ version: 1.7.X data_pack: load: . + overlays: + - formats: + min_inclusive: 1 + max_inclusive: 81 + min_format: 1 + max_format: 81 + directory: backport_81 resource_pack: load: . diff --git a/gm4_metallurgy/data/gm4/tags/item/boots.json b/gm4_metallurgy/data/gm4/tags/item/boots.json deleted file mode 100644 index 6e94be5e38..0000000000 --- a/gm4_metallurgy/data/gm4/tags/item/boots.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "values": [ - "minecraft:netherite_boots", - "minecraft:diamond_boots", - "minecraft:golden_boots", - "minecraft:chainmail_boots", - "minecraft:iron_boots", - "minecraft:leather_boots" - ] -} diff --git a/gm4_metallurgy/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction b/gm4_metallurgy/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction new file mode 100644 index 0000000000..e1c63f7066 --- /dev/null +++ b/gm4_metallurgy/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction @@ -0,0 +1,14 @@ +# @s = unspecified +# at = unspecified +# run from gm4_metallurgy:init + +scoreboard objectives add gm4_use_axe_net minecraft.used:minecraft.netherite_axe +scoreboard objectives add gm4_use_axe_dia minecraft.used:minecraft.diamond_axe +scoreboard objectives add gm4_use_axe_gol minecraft.used:minecraft.golden_axe +scoreboard objectives add gm4_use_axe_iro minecraft.used:minecraft.iron_axe +scoreboard objectives add gm4_use_axe_cop minecraft.used:minecraft.copper_axe +scoreboard objectives add gm4_use_axe_sto minecraft.used:minecraft.stone_axe +scoreboard objectives add gm4_use_axe_woo minecraft.used:minecraft.wooden_axe +scoreboard objectives add gm4_arb_depth dummy +scoreboard objectives add gm4_arb_data dummy +scoreboard players set #1 gm4_arb_data 1 diff --git a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction index a956ef2250..1b0f4dda07 100644 --- a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction +++ b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction @@ -11,6 +11,7 @@ execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $axe_ execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $axe_delay gm4_arb_data 6 execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $axe_delay gm4_arb_data 3 execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $axe_delay gm4_arb_data 8 +execute if score @s gm4_use_axe_cop matches 1.. run scoreboard players set $axe_delay gm4_arb_data 10 execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $axe_delay gm4_arb_data 13 execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $axe_delay gm4_arb_data 22 diff --git a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction index 11d23e047e..514285705c 100644 --- a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction +++ b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction @@ -6,12 +6,14 @@ execute if entity @s[scores={gm4_use_axe_net=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_dia=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_gol=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_cop=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_iro=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_sto=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_woo=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop scoreboard players reset @s gm4_use_axe_net scoreboard players reset @s gm4_use_axe_dia scoreboard players reset @s gm4_use_axe_gol +scoreboard players reset @s gm4_use_axe_cop scoreboard players reset @s gm4_use_axe_iro scoreboard players reset @s gm4_use_axe_sto scoreboard players reset @s gm4_use_axe_woo diff --git a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction index 24d5cba6c8..e30fbc0369 100644 --- a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction +++ b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction @@ -8,6 +8,7 @@ execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $max_ execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $max_damage gm4_arb_data 1560 execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $max_damage gm4_arb_data 31 execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $max_damage gm4_arb_data 249 +execute if score @s gm4_use_axe_cop matches 1.. run scoreboard players set $max_damage gm4_arb_data 189 execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $max_damage gm4_arb_data 130 execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $max_damage gm4_arb_data 58 diff --git a/gm4_metallurgy/data/gm4_gemini_shamir/function/breed/check_allay.mcfunction b/gm4_metallurgy/data/gm4_gemini_shamir/function/breed/check_allay.mcfunction index 68746dbb55..bab2d87dbe 100644 --- a/gm4_metallurgy/data/gm4_gemini_shamir/function/breed/check_allay.mcfunction +++ b/gm4_metallurgy/data/gm4_gemini_shamir/function/breed/check_allay.mcfunction @@ -1,5 +1,5 @@ # run from breed_allay.json (advancement) # @s = player who has bred a mob -execute if predicate gm4_gemini_shamir:holding_gemini as @e[type=allay,distance=..10,limit=1,sort=nearest,nbt={DuplicationCooldown:6000L}] at @s run summon allay ~ ~ ~ {DuplicationCooldown:6000L,CanDuplicate:0b} +execute if predicate gm4_gemini_shamir:holding_gemini as @e[type=allay,distance=..10,limit=1,sort=nearest,nbt={DuplicationCooldown:6000L}] at @s run summon allay ~ ~ ~ {DuplicationCooldown:6000L} advancement revoke @s only gm4_gemini_shamir:breed_allay diff --git a/gm4_metallurgy/data/gm4_metallurgy/function/init.mcfunction b/gm4_metallurgy/data/gm4_metallurgy/function/init.mcfunction index 0adfcc9b53..8a5b24f60c 100644 --- a/gm4_metallurgy/data/gm4_metallurgy/function/init.mcfunction +++ b/gm4_metallurgy/data/gm4_metallurgy/function/init.mcfunction @@ -7,15 +7,7 @@ scoreboard objectives add gm4_ml_ore_bi dummy scoreboard objectives add gm4_ml_ore_th dummy #arborenda -scoreboard objectives add gm4_use_axe_net minecraft.used:minecraft.netherite_axe -scoreboard objectives add gm4_use_axe_dia minecraft.used:minecraft.diamond_axe -scoreboard objectives add gm4_use_axe_gol minecraft.used:minecraft.golden_axe -scoreboard objectives add gm4_use_axe_iro minecraft.used:minecraft.iron_axe -scoreboard objectives add gm4_use_axe_sto minecraft.used:minecraft.stone_axe -scoreboard objectives add gm4_use_axe_woo minecraft.used:minecraft.wooden_axe -scoreboard objectives add gm4_arb_depth dummy -scoreboard objectives add gm4_arb_data dummy -scoreboard players set #1 gm4_arb_data 1 +function gm4_arborenda_shamir:init_scoreboards #declare gm4_arborenda_shamir:temp #ender_bolt diff --git a/gm4_metallurgy/data/gm4_metallurgy/function/tick.mcfunction b/gm4_metallurgy/data/gm4_metallurgy/function/tick.mcfunction index f9413a5aa3..d88c3fed6e 100644 --- a/gm4_metallurgy/data/gm4_metallurgy/function/tick.mcfunction +++ b/gm4_metallurgy/data/gm4_metallurgy/function/tick.mcfunction @@ -14,7 +14,7 @@ execute if score $hypexperia_active gm4_ml_data matches 1 run function gm4_hypex # vibro execute as @a[gamemode=!spectator,tag=gm4_has_vibro,predicate=gm4_vibro_shamir:sneak_on_ground] at @s run function gm4_vibro_shamir:jump -scoreboard players reset @a[gamemode=!spectator,tag=gm4_has_vibro,predicate=!gm4_vibro_shamir:sneak_on_ground] gm4_vibro_sneak +execute as @a[gamemode=!spectator,scores={gm4_vibro_sneak=1..},predicate=!gm4_vibro_shamir:sneak_on_ground] run function gm4_vibro_shamir:remove_jump scoreboard players reset @a gm4_vibro_fall scoreboard players reset @a gm4_vibro_hurt scoreboard players reset @a gm4_vibro_absorb diff --git a/gm4_metallurgy/data/gm4_metallurgy/predicate/vibro_active.json b/gm4_metallurgy/data/gm4_metallurgy/predicate/vibro_active.json index c9a844a875..14bf7dfa05 100644 --- a/gm4_metallurgy/data/gm4_metallurgy/predicate/vibro_active.json +++ b/gm4_metallurgy/data/gm4_metallurgy/predicate/vibro_active.json @@ -4,7 +4,7 @@ "predicate": { "equipment": { "feet": { - "items": "#gm4:boots", + "items": "#minecraft:foot_armor", "predicates": { "minecraft:custom_data": "{gm4_metallurgy:{has_shamir:1b,active_shamir:'vibro'}}" } diff --git a/gm4_metallurgy/data/gm4_moneo_shamir/function/active_tool.mcfunction b/gm4_metallurgy/data/gm4_moneo_shamir/function/active_tool.mcfunction index c8d6d0b407..e8c439dc64 100644 --- a/gm4_metallurgy/data/gm4_moneo_shamir/function/active_tool.mcfunction +++ b/gm4_metallurgy/data/gm4_moneo_shamir/function/active_tool.mcfunction @@ -13,6 +13,7 @@ execute if score $tool_max_damage gm4_ml_data matches 1561 if predicate gm4_mone # activate moneo execute if score $tool_max_damage gm4_ml_data matches 59 run function gm4_moneo_shamir:tools/materials/wood execute if score $tool_max_damage gm4_ml_data matches 131 run function gm4_moneo_shamir:tools/materials/stone +execute if score $tool_max_damage gm4_ml_data matches 190 run function gm4_moneo_shamir:tools/materials/copper execute if score $tool_max_damage gm4_ml_data matches 250 run function gm4_moneo_shamir:tools/materials/iron execute if score $tool_max_damage gm4_ml_data matches 1561 run function gm4_moneo_shamir:tools/materials/diamond execute if score $tool_max_damage gm4_ml_data matches 2031 run function gm4_moneo_shamir:tools/materials/netherite diff --git a/gm4_metallurgy/data/gm4_moneo_shamir/function/store_maximum.mcfunction b/gm4_metallurgy/data/gm4_moneo_shamir/function/store_maximum.mcfunction index 994af3a8ac..7ae08dd796 100644 --- a/gm4_metallurgy/data/gm4_moneo_shamir/function/store_maximum.mcfunction +++ b/gm4_metallurgy/data/gm4_moneo_shamir/function/store_maximum.mcfunction @@ -12,6 +12,11 @@ execute if items entity @s contents minecraft:stone_pickaxe run data modify enti execute if items entity @s contents minecraft:stone_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 execute if items entity @s contents minecraft:stone_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 +execute if items entity @s contents minecraft:copper_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 +execute if items entity @s contents minecraft:copper_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 +execute if items entity @s contents minecraft:copper_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 +execute if items entity @s contents minecraft:copper_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 + execute if items entity @s contents minecraft:iron_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 execute if items entity @s contents minecraft:iron_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 execute if items entity @s contents minecraft:iron_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 diff --git a/gm4_metallurgy/data/gm4_moneo_shamir/function/tools/materials/copper.mcfunction b/gm4_metallurgy/data/gm4_moneo_shamir/function/tools/materials/copper.mcfunction new file mode 100644 index 0000000000..dc57284f80 --- /dev/null +++ b/gm4_metallurgy/data/gm4_moneo_shamir/function/tools/materials/copper.mcfunction @@ -0,0 +1,8 @@ +# run from active_tool +# @s = player holding the moneo tool + +scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data + +execute if score $tool_max_damage gm4_ml_data matches 16..30 run effect give @s minecraft:mining_fatigue 2 0 +execute if score $tool_max_damage gm4_ml_data matches ..30 at @s run playsound minecraft:block.lantern.hit master @s ~ ~ ~ 5 1 +execute if score $tool_max_damage gm4_ml_data matches ..15 run effect give @s minecraft:mining_fatigue 2 1 diff --git a/gm4_metallurgy/data/gm4_vibro_shamir/advancement/vibro_fall_damage.json b/gm4_metallurgy/data/gm4_vibro_shamir/advancement/vibro_fall_damage.json index 0a26f74435..ee5875a512 100644 --- a/gm4_metallurgy/data/gm4_vibro_shamir/advancement/vibro_fall_damage.json +++ b/gm4_metallurgy/data/gm4_vibro_shamir/advancement/vibro_fall_damage.json @@ -24,7 +24,7 @@ }, "equipment": { "feet": { - "items": "#gm4:boots", + "items": "#minecraft:foot_armor", "predicates": { "minecraft:custom_data": "{gm4_metallurgy:{active_shamir:'vibro'}}" } diff --git a/gm4_metallurgy/data/gm4_vibro_shamir/function/jump.mcfunction b/gm4_metallurgy/data/gm4_vibro_shamir/function/jump.mcfunction index ee45c12392..29d115abd5 100644 --- a/gm4_metallurgy/data/gm4_vibro_shamir/function/jump.mcfunction +++ b/gm4_metallurgy/data/gm4_vibro_shamir/function/jump.mcfunction @@ -5,10 +5,16 @@ scoreboard players add @s gm4_vibro_sneak 1 # apply jump boost based on sneak number -effect give @s[scores={gm4_vibro_sneak=1..5}] jump_boost 1 3 false -effect give @s[scores={gm4_vibro_sneak=6..10}] jump_boost 1 5 false -effect give @s[scores={gm4_vibro_sneak=11..15}] jump_boost 1 6 false -effect give @s[scores={gm4_vibro_sneak=16..}] jump_boost 1 9 false +attribute @s[scores={gm4_vibro_sneak=1}] jump_strength modifier add gm4_vibro_shamir:jump_boost 0.4 add_value + +attribute @s[scores={gm4_vibro_sneak=6}] jump_strength modifier remove gm4_vibro_shamir:jump_boost +attribute @s[scores={gm4_vibro_sneak=6}] jump_strength modifier add gm4_vibro_shamir:jump_boost 0.6 add_value + +attribute @s[scores={gm4_vibro_sneak=11}] jump_strength modifier remove gm4_vibro_shamir:jump_boost +attribute @s[scores={gm4_vibro_sneak=11}] jump_strength modifier add gm4_vibro_shamir:jump_boost 0.7 add_value + +attribute @s[scores={gm4_vibro_sneak=16}] jump_strength modifier remove gm4_vibro_shamir:jump_boost +attribute @s[scores={gm4_vibro_sneak=16}] jump_strength modifier add gm4_vibro_shamir:jump_boost 1.0 add_value # playsound (A Major Scale) execute if score @s gm4_vibro_sneak matches 1 run playsound minecraft:block.stone.step block @a[distance=..8] ~ ~ ~ 0.6 1.189207 diff --git a/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction b/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction new file mode 100644 index 0000000000..5c74037aca --- /dev/null +++ b/gm4_metallurgy/data/gm4_vibro_shamir/function/remove_jump.mcfunction @@ -0,0 +1,5 @@ +# @s = vibro player no longer sneaking on the ground +# run from gm4_metallurgy:tick + +scoreboard players reset @s gm4_vibro_sneak +attribute @s jump_strength modifier remove gm4_vibro_shamir:jump_boost diff --git a/gm4_metallurgy/shamir_model_template.py b/gm4_metallurgy/shamir_model_template.py index 7ea27736c5..1efd85fd89 100644 --- a/gm4_metallurgy/shamir_model_template.py +++ b/gm4_metallurgy/shamir_model_template.py @@ -12,8 +12,8 @@ parent_logger = logging.getLogger("gm4."+__name__) -TOOL_MATERIALS = ["wooden", "stone", "iron", "golden", "diamond", "netherite"] -ARMOR_MATERIALS = ["leather", "chainmail", "iron", "golden", "diamond", "netherite"] +TOOL_MATERIALS = ["wooden", "stone", "copper", "iron", "golden", "diamond", "netherite"] +ARMOR_MATERIALS = ["leather", "copper", "chainmail", "iron", "golden", "diamond", "netherite"] TOOLS = ["axe", "hoe", "pickaxe", "shovel"] ARMOR = ["boots", "chestplate", "helmet", "leggings"] BUCKETABLE = ["water", "lava", "milk", "powder_snow", "cod", "salmon", "pufferfish", "tropical_fish", "tadpole", "axolotl"] @@ -221,7 +221,7 @@ def beet_default(ctx: Context): # bind context object to a ClassVar so it can be accessed later during template processing ShamirTemplate.bound_ctx = ctx vanilla = ctx.inject(Vanilla) - vanilla.minecraft_version = '1.21.5' + vanilla.minecraft_version = '1.21.9' ShamirTemplate.vanilla_models_jar = vanilla.mount("assets/minecraft/items") merge_policy(ctx) diff --git a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/pearlescent/laser.mcfunction b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/pearlescent/laser.mcfunction index 93eccd1741..23622ec675 100644 --- a/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/pearlescent/laser.mcfunction +++ b/gm4_monsters_unbound/data/gm4_monsters_unbound/function/mob/process/elite/pearlescent/laser.mcfunction @@ -4,7 +4,7 @@ # run from mob/process/elite/pearlescent/process playsound block.campfire.crackle hostile @a ~ ~ ~ 0.5 0.8 -particle flash ~ ~1.8 ~ +particle flash{color:-1} ~ ~1.8 ~ execute on target run tag @s[type=player] add gm4_mu_target execute unless entity @p[tag=gm4_mu_target] run return 0 diff --git a/gm4_orb_of_ankou/beet.yaml b/gm4_orb_of_ankou/beet.yaml index 93753f738a..13aa364384 100644 --- a/gm4_orb_of_ankou/beet.yaml +++ b/gm4_orb_of_ankou/beet.yaml @@ -6,8 +6,10 @@ data_pack: load: . overlays: - formats: - min_inclusive: 0 + min_inclusive: 1 max_inclusive: 71 + min_format: 1 + max_format: 71 directory: backport_71 resource_pack: diff --git a/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/leashable.json b/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/leashable.json index 162cc4b03e..4b68a4729f 100644 --- a/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/leashable.json +++ b/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/leashable.json @@ -11,6 +11,7 @@ "minecraft:camel", "minecraft:cat", "minecraft:chicken", + {"id": "minecraft:copper_golem", "required": false}, "minecraft:cow", "minecraft:dolphin", "minecraft:donkey", diff --git a/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_equipment.json b/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_equipment.json index 4744b7d6be..d834ae2f41 100644 --- a/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_equipment.json +++ b/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_equipment.json @@ -4,6 +4,7 @@ "minecraft:bogged", "minecraft:drowned", "minecraft:husk", + {"id": "minecraft:mannequin", "required": false}, "minecraft:piglin", "minecraft:piglin_brute", "minecraft:player", diff --git a/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_hand.json b/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_hand.json index 1f4b11ed4e..f70540837f 100644 --- a/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_hand.json +++ b/gm4_reeling_rods/data/gm4_reeling_rods/tags/entity_type/steal_hand.json @@ -1,6 +1,7 @@ { "values": [ "minecraft:allay", + {"id": "minecraft:copper_golem", "required": false}, "minecraft:fox", "minecraft:illusioner", "minecraft:panda", diff --git a/gm4_soul_glass/README.md b/gm4_soul_glass/README.md index 9c9f43fa71..e8b91e89fa 100644 --- a/gm4_soul_glass/README.md +++ b/gm4_soul_glass/README.md @@ -3,7 +3,7 @@ Beacons need a bit more corruption. This data pack reverses their effects ### Features -- Crafted by smelting Soul Sand in a Blast Furnace +- Crafted by smelting Soul Sand in a Furnace - Applies an inverted effect when placed on-top of a Beacon - Beacon power can be disabled by either moving the glass block or turning off the beacon - For example: Speed becomes Slowness, Haste becomes Mining Fatigue diff --git a/gm4_soul_glass/assets/translations.csv b/gm4_soul_glass/assets/translations.csv index 06975c1c1c..e834275237 100644 --- a/gm4_soul_glass/assets/translations.csv +++ b/gm4_soul_glass/assets/translations.csv @@ -3,6 +3,6 @@ item.gm4.soul_glass,Soul Glass advancement.gm4.soul_glass.title,Corruption at its Finest advancement.gm4.soul_glass.description,Corrupt the effects of a beacon text.gm4.guidebook.module_desc.soul_glass,"Reverse the effects of beacons with corrupting glass! But be careful, a poison Beacon may sound great at first, but is incredibly painful in pratice." -text.gm4.guidebook.soul_glass.description,"Soul Sand can be smelted in a blast furnace to get Soul Glass.\n\nWhen placed directly over a beacon, soul glass will corrupt the effects." +text.gm4.guidebook.soul_glass.description,"Soul Sand can be smelted in a furnace to get Soul Glass.\n\nWhen placed directly over a beacon, soul glass will corrupt the effects." text.gm4.guidebook.soul_glass.usage,If soul glass is moved from its original location it will lose its properties.\n\nThe exception is moving it with a sticky piston up to one block away. text.gm4.guidebook.soul_glass.corrupted_effects,Corrupted Effects: diff --git a/gm4_soul_glass/beet.yaml b/gm4_soul_glass/beet.yaml index 7ad4cc368a..e0ea1dc2e7 100644 --- a/gm4_soul_glass/beet.yaml +++ b/gm4_soul_glass/beet.yaml @@ -1,6 +1,6 @@ id: gm4_soul_glass name: Soul Glass -version: 1.5.X +version: 1.6.X data_pack: load: . diff --git a/gm4_soul_glass/data/gm4_soul_glass/function/main.mcfunction b/gm4_soul_glass/data/gm4_soul_glass/function/main.mcfunction index 7dea155787..a352af9888 100644 --- a/gm4_soul_glass/data/gm4_soul_glass/function/main.mcfunction +++ b/gm4_soul_glass/data/gm4_soul_glass/function/main.mcfunction @@ -1,7 +1,7 @@ -# Kill old blast furnace markers, remove this later -kill @e[type=marker,tag=gm4_sg_furnace] +schedule function gm4_soul_glass:main 16t # process soul glass execute as @e[type=marker,tag=gm4_soul_glass] at @s run function gm4_soul_glass:process -schedule function gm4_soul_glass:main 16t +# Kill old blast furnace markers, remove this later +kill @e[type=marker,tag=gm4_sg_furnace] diff --git a/gm4_soul_glass/data/gm4_soul_glass/guidebook/soul_glass.json b/gm4_soul_glass/data/gm4_soul_glass/guidebook/soul_glass.json index fd21ff31a4..4fdbebef4a 100644 --- a/gm4_soul_glass/data/gm4_soul_glass/guidebook/soul_glass.json +++ b/gm4_soul_glass/data/gm4_soul_glass/guidebook/soul_glass.json @@ -53,7 +53,7 @@ }, { "translate": "text.gm4.guidebook.soul_glass.description", - "fallback": "Soul Sand can be smelted in a blast furnace to get Soul Glass.\n\nWhen placed directly over a beacon, soul glass will corrupt the effects." + "fallback": "Soul Sand can be smelted in a furnace to get Soul Glass.\n\nWhen placed directly over a beacon, soul glass will corrupt the effects." } ] ] diff --git a/gm4_soul_glass/data/gm4_soul_glass/recipe/soul_glass.json b/gm4_soul_glass/data/gm4_soul_glass/recipe/soul_glass.json index 85837046c8..7f152d11be 100644 --- a/gm4_soul_glass/data/gm4_soul_glass/recipe/soul_glass.json +++ b/gm4_soul_glass/data/gm4_soul_glass/recipe/soul_glass.json @@ -1,5 +1,5 @@ { - "type": "minecraft:blasting", + "type": "minecraft:smelting", "ingredient": "minecraft:soul_sand", "result": { "id": "minecraft:brown_stained_glass", diff --git a/gm4_soul_glass/data/gm4_soul_glass/test/smelt_soul_glass.mcfunction b/gm4_soul_glass/data/gm4_soul_glass/test/smelt_soul_glass.mcfunction index eaed60cba7..7cfbad5c90 100644 --- a/gm4_soul_glass/data/gm4_soul_glass/test/smelt_soul_glass.mcfunction +++ b/gm4_soul_glass/data/gm4_soul_glass/test/smelt_soul_glass.mcfunction @@ -2,10 +2,10 @@ # @dummy ~1.5 ~1 ~0.5 # @timeout 900 -item replace entity @s weapon.mainhand with blast_furnace +item replace entity @s weapon.mainhand with furnace execute at @s run tp @s ~ ~ ~ facing ~ ~-1 ~1 dummy @s use block ~1 ~ ~1 up -assert block ~1 ~1 ~1 blast_furnace +assert block ~1 ~1 ~1 furnace item replace block ~1 ~1 ~1 container.0 with soul_sand item replace block ~1 ~1 ~1 container.1 with coal diff --git a/gm4_standard_crafting/beet.yaml b/gm4_standard_crafting/beet.yaml index 011cd3300a..e24d1dc75a 100644 --- a/gm4_standard_crafting/beet.yaml +++ b/gm4_standard_crafting/beet.yaml @@ -4,6 +4,19 @@ version: 1.6.X data_pack: load: . + overlays: + - formats: + min_inclusive: 88 + max_inclusive: 88 + min_format: 88 + max_format: 88 + directory: since_88 + - formats: + min_inclusive: 81 + max_inclusive: 88 + min_format: 81 + max_format: 88 + directory: empty pipeline: - generate_recipes diff --git a/gm4_standard_crafting/data/gm4_standard_crafting/guidebook/standard_crafting.json b/gm4_standard_crafting/data/gm4_standard_crafting/guidebook/standard_crafting.json index 2b3dc54034..ffd6a5500b 100644 --- a/gm4_standard_crafting/data/gm4_standard_crafting/guidebook/standard_crafting.json +++ b/gm4_standard_crafting/data/gm4_standard_crafting/guidebook/standard_crafting.json @@ -409,7 +409,7 @@ [ { "translate": "text.gm4.guidebook.standard_crafting.horse_armor", - "fallback": "Diamond, iron, and golden armor can be crafted" + "fallback": "Diamond, iron, copper, and golden armor can be crafted" }, "\n", { diff --git a/gm4_standard_crafting/since_88/data/gm4_standard_crafting/advancement/recipes/copper_horse_armor.json b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/advancement/recipes/copper_horse_armor.json new file mode 100644 index 0000000000..7b22ac06eb --- /dev/null +++ b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/advancement/recipes/copper_horse_armor.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "gm4_standard_crafting:copper_horse_armor" + } + }, + "has_materials": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:copper_ingot" + ] + } + ] + } + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_materials" + ] + ], + "rewards": { + "recipes": [ + "gm4_standard_crafting:copper_horse_armor" + ] + } +} diff --git a/gm4_standard_crafting/since_88/data/gm4_standard_crafting/function/check_recipes.mcfunction b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/function/check_recipes.mcfunction new file mode 100644 index 0000000000..a2de04c1e9 --- /dev/null +++ b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/function/check_recipes.mcfunction @@ -0,0 +1,52 @@ +# @s = custom crafters with valid recipe format inside +# run from #gm4_custom_crafters:check_recipes + +# recipes +# sandstones to sand +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:sandstone"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/sand +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:chiseled_sandstone"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/sand +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:cut_sandstone"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/sand +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:smooth_sandstone"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/sand + +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:red_sandstone"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/red_sand +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:chiseled_red_sandstone"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/red_sand +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:cut_red_sandstone"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/red_sand +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:smooth_red_sandstone"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/red_sand + +# red sand +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 9 if score $stack_size gm4_crafting matches ..8 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:sand"},{Slot:1b,id:"minecraft:sand"},{Slot:2b,id:"minecraft:sand"},{Slot:3b,id:"minecraft:sand"},{Slot:4b,id:"minecraft:red_dye"},{Slot:5b,id:"minecraft:sand"},{Slot:6b,id:"minecraft:sand"},{Slot:7b,id:"minecraft:sand"},{Slot:8b,id:"minecraft:sand"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/red_sand_dye + +# flint to gravel +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 4 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:flint"},{Slot:1b,id:"minecraft:flint"},{Slot:3b,id:"minecraft:flint"},{Slot:4b,id:"minecraft:flint"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/gravel + +# cobweb +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 9 if score $stack_size gm4_crafting matches ..64 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:string"},{Slot:1b,id:"minecraft:string"},{Slot:2b,id:"minecraft:string"},{Slot:3b,id:"minecraft:string"},{Slot:4b,id:"minecraft:slime_ball"},{Slot:5b,id:"minecraft:string"},{Slot:6b,id:"minecraft:string"},{Slot:7b,id:"minecraft:string"},{Slot:8b,id:"minecraft:string"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/cobweb + +# horse armour +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 6 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:2b,id:"minecraft:iron_ingot"},{Slot:3b,id:"minecraft:iron_ingot"},{Slot:4b,id:"minecraft:leather"},{Slot:5b,id:"minecraft:iron_ingot"},{Slot:6b,id:"minecraft:iron_ingot"},{Slot:8b,id:"minecraft:iron_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/iron_horse_armor +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 6 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:iron_ingot"},{Slot:3b,id:"minecraft:iron_ingot"},{Slot:4b,id:"minecraft:leather"},{Slot:5b,id:"minecraft:iron_ingot"},{Slot:6b,id:"minecraft:iron_ingot"},{Slot:8b,id:"minecraft:iron_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/iron_horse_armor +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 6 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:2b,id:"minecraft:gold_ingot"},{Slot:3b,id:"minecraft:gold_ingot"},{Slot:4b,id:"minecraft:leather"},{Slot:5b,id:"minecraft:gold_ingot"},{Slot:6b,id:"minecraft:gold_ingot"},{Slot:8b,id:"minecraft:gold_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/golden_horse_armor +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 6 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:gold_ingot"},{Slot:3b,id:"minecraft:gold_ingot"},{Slot:4b,id:"minecraft:leather"},{Slot:5b,id:"minecraft:gold_ingot"},{Slot:6b,id:"minecraft:gold_ingot"},{Slot:8b,id:"minecraft:gold_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/golden_horse_armor +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 6 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:2b,id:"minecraft:diamond"},{Slot:3b,id:"minecraft:diamond"},{Slot:4b,id:"minecraft:leather"},{Slot:5b,id:"minecraft:diamond"},{Slot:6b,id:"minecraft:diamond"},{Slot:8b,id:"minecraft:diamond"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/diamond_horse_armor +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 6 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:diamond"},{Slot:3b,id:"minecraft:diamond"},{Slot:4b,id:"minecraft:leather"},{Slot:5b,id:"minecraft:diamond"},{Slot:6b,id:"minecraft:diamond"},{Slot:8b,id:"minecraft:diamond"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/diamond_horse_armor +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 6 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:2b,id:"minecraft:copper_ingot"},{Slot:3b,id:"minecraft:copper_ingot"},{Slot:4b,id:"minecraft:leather"},{Slot:5b,id:"minecraft:copper_ingot"},{Slot:6b,id:"minecraft:copper_ingot"},{Slot:8b,id:"minecraft:copper_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/copper_horse_armor +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 6 if score $stack_size gm4_crafting matches ..1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:copper_ingot"},{Slot:3b,id:"minecraft:copper_ingot"},{Slot:4b,id:"minecraft:leather"},{Slot:5b,id:"minecraft:copper_ingot"},{Slot:6b,id:"minecraft:copper_ingot"},{Slot:8b,id:"minecraft:copper_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/copper_horse_armor + +# notch apple +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 9 if score $stack_size gm4_crafting matches ..64 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:gold_block"},{Slot:1b,id:"minecraft:gold_block"},{Slot:2b,id:"minecraft:gold_block"},{Slot:3b,id:"minecraft:gold_block"},{Slot:4b,id:"minecraft:apple"},{Slot:5b,id:"minecraft:gold_block"},{Slot:6b,id:"minecraft:gold_block"},{Slot:7b,id:"minecraft:gold_block"},{Slot:8b,id:"minecraft:gold_block"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/enchanted_golden_apple + +# quartz block to nether quartz +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:quartz_block"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/quartz + +# amethyst block to amethyst shards +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:amethyst_block"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/amethyst_shard + +# dripstone block to pointed dripstone +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..16 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:dripstone_block"}]} run loot replace block ~ ~ ~ container.0 loot gm4_standard_crafting:crafting/pointed_dripstone + +# stairs +execute if score $crafted gm4_crafting matches 0 if score $slot_count gm4_crafting matches 4 if score $stack_size gm4_crafting matches ..16 run function gm4_standard_crafting:stairs_recipes +# slabs +execute if score $crafted gm4_crafting matches 0 if score $slot_count gm4_crafting matches 4 if score $stack_size gm4_crafting matches ..32 run function gm4_standard_crafting:slabs_recipes +# string +execute if score $crafted gm4_crafting matches 0 if score $slot_count gm4_crafting matches 1 if score $stack_size gm4_crafting matches ..21 run function gm4_standard_crafting:string_recipes diff --git a/gm4_standard_crafting/since_88/data/gm4_standard_crafting/gm4_recipes/copper_horse_armor.json b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/gm4_recipes/copper_horse_armor.json new file mode 100644 index 0000000000..d825a6298f --- /dev/null +++ b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/gm4_recipes/copper_horse_armor.json @@ -0,0 +1,25 @@ +{ + "input": { + "type": "shaped", + "recipe": [ + " X", + "XLX", + "X X" + ], + "key": { + "X": { + "item": "minecraft:copper_ingot" + }, + "L": { + "item": "minecraft:leather" + } + } + }, + "output": { + "result": { + "type": "item", + "name": "minecraft:copper_horse_armor", + "count": 1 + } + } +} diff --git a/gm4_standard_crafting/since_88/data/gm4_standard_crafting/loot_table/crafting/copper_horse_armor.json b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/loot_table/crafting/copper_horse_armor.json new file mode 100644 index 0000000000..5e03bd3a9a --- /dev/null +++ b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/loot_table/crafting/copper_horse_armor.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:generic", + "pools": [ + { + "rolls": 8, + "entries": [ + { + "type": "minecraft:loot_table", + "value": "gm4:air" + } + ] + }, + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:copper_horse_armor", + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ] + } + ] + } + ] +} diff --git a/gm4_standard_crafting/since_88/data/gm4_standard_crafting/recipe/copper_horse_armor.json b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/recipe/copper_horse_armor.json new file mode 100644 index 0000000000..4746539cb7 --- /dev/null +++ b/gm4_standard_crafting/since_88/data/gm4_standard_crafting/recipe/copper_horse_armor.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + " I", + "ILI", + "I I" + ], + "key": { + "I": "minecraft:copper_ingot", + "L": "minecraft:leather" + }, + "result": { + "id": "minecraft:copper_horse_armor" + } +} diff --git a/gm4_standard_crafting/translations.csv b/gm4_standard_crafting/translations.csv index c5a6d5e5f6..da0565b993 100644 --- a/gm4_standard_crafting/translations.csv +++ b/gm4_standard_crafting/translations.csv @@ -6,4 +6,4 @@ text.gm4.guidebook.standard_crafting.slab_decraft,Slabs can be reverted to their text.gm4.guidebook.standard_crafting.sandstone_decraft,Any sandstone can be converted into sand text.gm4.guidebook.standard_crafting.red_sandstone_decraft,Any red sandstone can be converted into red sand text.gm4.guidebook.standard_crafting.string_craft,Any wool can be ripped into string -text.gm4.guidebook.standard_crafting.horse_armor,"Diamond, iron, and golden armor can be crafted" +text.gm4.guidebook.standard_crafting.horse_armor,"Diamond, iron, copper, and golden armor can be crafted" diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/item/armor.json b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/item/armor.json index 6286d505c1..72ddb5810f 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/item/armor.json +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/item/armor.json @@ -4,6 +4,10 @@ "chainmail_chestplate", "chainmail_helmet", "chainmail_leggings", + {"id": "copper_boots", "required": false}, + {"id": "copper_chestplate", "required": false}, + {"id": "coppper_helmet", "required": false}, + {"id": "copper_leggings", "required": false}, "diamond_boots", "diamond_chestplate", "diamond_helmet", diff --git a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/item/weapon.json b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/item/weapon.json index 670df20aba..ca578763f1 100644 --- a/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/item/weapon.json +++ b/gm4_survival_refightalized/data/gm4_survival_refightalized/tags/item/weapon.json @@ -1,5 +1,9 @@ { "values": [ + {"id": "copper_axe", "required": false}, + {"id": "copper_pickaxe", "required": false}, + {"id": "coppper_shovel", "required": false}, + {"id": "copper_sword", "required": false}, "diamond_axe", "diamond_pickaxe", "diamond_shovel", diff --git a/gm4_tunnel_bores/data/gm4_tunnel_bores/tags/block/not_rail_solid.json b/gm4_tunnel_bores/data/gm4_tunnel_bores/tags/block/not_rail_solid.json index f0d75260b8..29251ed32b 100644 --- a/gm4_tunnel_bores/data/gm4_tunnel_bores/tags/block/not_rail_solid.json +++ b/gm4_tunnel_bores/data/gm4_tunnel_bores/tags/block/not_rail_solid.json @@ -143,7 +143,8 @@ "minecraft:crimson_roots", "minecraft:warped_roots", "minecraft:nether_sprouts", - "minecraft:chain", + { "id": "minecraft:chain", "required": false }, + { "id": "minecraft:iron_chain", "required": false }, "minecraft:warped_fence", "minecraft:crimson_fence_gate", "minecraft:sweet_berry_bush", diff --git a/gm4_vecto_shamir/data/gm4/tags/item/boots.json b/gm4_vecto_shamir/data/gm4/tags/item/boots.json deleted file mode 100644 index 6e94be5e38..0000000000 --- a/gm4_vecto_shamir/data/gm4/tags/item/boots.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "values": [ - "minecraft:netherite_boots", - "minecraft:diamond_boots", - "minecraft:golden_boots", - "minecraft:chainmail_boots", - "minecraft:iron_boots", - "minecraft:leather_boots" - ] -} diff --git a/gm4_vecto_shamir/data/gm4_vecto_shamir/predicate/sneak_validblock.json b/gm4_vecto_shamir/data/gm4_vecto_shamir/predicate/sneak_validblock.json index 46c4811539..8ad16caaa8 100644 --- a/gm4_vecto_shamir/data/gm4_vecto_shamir/predicate/sneak_validblock.json +++ b/gm4_vecto_shamir/data/gm4_vecto_shamir/predicate/sneak_validblock.json @@ -8,7 +8,7 @@ }, "equipment": { "feet": { - "items": "#gm4:boots", + "items": "#minecraft:foot_armor", "predicates": { "minecraft:custom_data": "{gm4_metallurgy:{has_shamir:1b,active_shamir:'vecto'}}" } diff --git a/pyproject.toml b/pyproject.toml index 290bb4f2f9..a1f7e92060 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,9 +7,9 @@ authors = [ ] requires-python = ">= 3.10, < 4.0" dependencies = [ - "beet >= 0.110.1", - "mecha >= 0.98.1", - "bolt >= 0.49.1", + "beet >= 0.112.1", + "mecha >= 0.99.0", + "bolt >= 0.49.2", "PyYAML >= 6.0, < 7.0", "pydantic >= 2.6.1, < 3.0.0", "requests >= 2.28.1, < 3.0.0", diff --git a/resource_pack/beet.yaml b/resource_pack/beet.yaml index fb99db2a03..793290ae87 100644 --- a/resource_pack/beet.yaml +++ b/resource_pack/beet.yaml @@ -8,8 +8,10 @@ resource_pack: # other files are inherited by the full-project build overlays: - formats: - min_inclusive: 0 + min_inclusive: 1 max_inclusive: 63 + min_format: 1 + max_format: 63 directory: backport_63 pipeline: diff --git a/resource_pack/dev_description.py b/resource_pack/dev_description.py index 624ac7a115..7dea90284e 100644 --- a/resource_pack/dev_description.py +++ b/resource_pack/dev_description.py @@ -8,4 +8,7 @@ def beet_default(ctx: Context): "color": "red" } ] - ctx.assets.supported_formats = {"min_inclusive": 55, "max_inclusive": 64} + ctx.assets.supported_formats = {"min_inclusive": 55, "max_inclusive": 69} + ctx.assets.pack_format = 55 + ctx.assets.min_format = 55 + ctx.assets.max_format = (69, 0) diff --git a/spyglass.json b/spyglass.json index 9fcc9458ef..e59b68e68c 100644 --- a/spyglass.json +++ b/spyglass.json @@ -1,6 +1,6 @@ { "env": { - "gameVersion": "1.21.6", + "gameVersion": "1.21.9", "exclude": [ ".*/**", "docs/**", diff --git a/uv.lock b/uv.lock index c1af3d5f5a..b00a0edd94 100644 --- a/uv.lock +++ b/uv.lock @@ -12,7 +12,7 @@ wheels = [ [[package]] name = "beet" -version = "0.110.1" +version = "0.112.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, @@ -26,9 +26,9 @@ dependencies = [ { name = "toml" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/af/88/fbda09a5a3bdc172567eac78495349c8970dc9722b40dbc7d8ed74e13b1f/beet-0.110.1.tar.gz", hash = "sha256:24f060d4fab5ec1b9b32413eba39f0fb4aec2a75ea0a1340d7b9c28cbedadc07", size = 91945 } +sdist = { url = "https://files.pythonhosted.org/packages/b4/51/03ced57f81dd2be86a6d55ec99359eabcf017d5cf8929ef81731f87cef78/beet-0.112.1.tar.gz", hash = "sha256:9014049b804c3ca2766b7cdfea7e64120df952e92b67d22210c70000fe1b36a6", size = 93478 } wheels = [ - { url = "https://files.pythonhosted.org/packages/57/d9/5a1da1856b99fec0876b6da9a609cffecab6e5492d8edc7f769e7bfcee38/beet-0.110.1-py3-none-any.whl", hash = "sha256:93dc57ce3843cc559c38613371afd4925c8e391347c2e06e27fe7637aad8abe8", size = 116679 }, + { url = "https://files.pythonhosted.org/packages/dd/fb/11619fd28c1c923a5237fbaf9bbbf8d35b5b6edbee9608698160c07de458/beet-0.112.1-py3-none-any.whl", hash = "sha256:c3085af65aacc88d2811b772e3c377c023dcc5a864eaa45ec739c2f71ce82cf2", size = 118280 }, ] [[package]] @@ -53,15 +53,15 @@ wheels = [ [[package]] name = "bolt" -version = "0.49.1" +version = "0.49.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "beet" }, { name = "mecha" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/39/95/95561e424e41850389b1e4a03cde86d8ac367878b7aa677dc1ea5de5eedb/bolt-0.49.1.tar.gz", hash = "sha256:40cd165e6eb438161cc8cd91fbebc90672169ee7114a3a79d3351e127a08dec7", size = 53469 } +sdist = { url = "https://files.pythonhosted.org/packages/20/38/afaf49e657d52f90b139aeb54f087b4e09749fa46d60043f6796916da2a8/bolt-0.49.2.tar.gz", hash = "sha256:3f957178aeeecdeaa1bb5e61345692a282e79ab929bf5db01cb459336e566180", size = 53560 } wheels = [ - { url = "https://files.pythonhosted.org/packages/9c/61/a147da5f0278c2b299eed14c7ea4b55420307fbcf794fec8db8b6adface6/bolt-0.49.1-py3-none-any.whl", hash = "sha256:912496abb4ed2593db1e44ec6655685d63d0003ee7218a2740ce91ad8ad9e36e", size = 59364 }, + { url = "https://files.pythonhosted.org/packages/fc/6d/54081d432e9c22163d994a82388c2c03f5568a24348697ce3db82215b45d/bolt-0.49.2-py3-none-any.whl", hash = "sha256:8f831a4fa9de127d7c6c4e973dd024da7231ec5ede74037db88578b93825891c", size = 59441 }, ] [[package]] @@ -199,9 +199,9 @@ dev = [ [package.metadata] requires-dist = [ - { name = "beet", specifier = ">=0.110.1" }, - { name = "bolt", specifier = ">=0.49.1" }, - { name = "mecha", specifier = ">=0.98.1" }, + { name = "beet", specifier = ">=0.112.1" }, + { name = "bolt", specifier = ">=0.49.2" }, + { name = "mecha", specifier = ">=0.99.0" }, { name = "pillow", specifier = ">=10.0.0,<11.0.0" }, { name = "pydantic", specifier = ">=2.6.1,<3.0.0" }, { name = "pyyaml", specifier = ">=6.0,<7.0" }, @@ -306,15 +306,15 @@ wheels = [ [[package]] name = "mecha" -version = "0.98.1" +version = "0.99.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "beet" }, { name = "tokenstream" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/bf/58/aca9ea4f0c22581461de1776ced4cb0f1365c8c99a744acda69d05ccd7e7/mecha-0.98.1.tar.gz", hash = "sha256:f8e308f3c84efb8042ef3944b192402d8ee38021330866a18c70355d51272ba2", size = 137881 } +sdist = { url = "https://files.pythonhosted.org/packages/0d/ed/86ad891d2873d6f2cef0d70ab20e4d3e4a2ad3a4e2b9e43a936546a49607/mecha-0.99.0.tar.gz", hash = "sha256:78b0493d9b2fa010e9083b071939c9359f0804492cd405e0473f88145951b8c6", size = 138433 } wheels = [ - { url = "https://files.pythonhosted.org/packages/af/47/0b558814ab9f8d40b2482200dcb5cc776d5cb47057751838902def8589ef/mecha-0.98.1-py3-none-any.whl", hash = "sha256:d0d953a585406f4027afc011464faa5ad4c6006b3d819d60308110fdd3f5816d", size = 164202 }, + { url = "https://files.pythonhosted.org/packages/5e/fe/58a92a2267d63993e832e6326b37703e543830c8c657fccfbfd8b0dcb533/mecha-0.99.0-py3-none-any.whl", hash = "sha256:9d24fb45dfebe3e31d1631653ff5c409aa09ca11da67e9a442fe400276915f3d", size = 164746 }, ] [[package]]