diff --git a/gm4/modeldata_registry.json b/gm4/modeldata_registry.json index 3d0cd6842e..e93534daee 100644 --- a/gm4/modeldata_registry.json +++ b/gm4/modeldata_registry.json @@ -639,7 +639,6 @@ "gm4_animi_shamir:shamir/animi": 124 }, "golden_chestplate": { - "gm4_scuba_gear:item/scuba_tank": 1, "gm4_zauber_cauldrons:item/zauber_armor/health_boost": 2, "gm4_zauber_cauldrons:item/zauber_armor/attack_boost": 3, "gm4_zauber_cauldrons:item/zauber_armor/speed_boost": 4, @@ -949,7 +948,6 @@ }, "leather_boots": { "gm4_boots_of_ostara:item/boots_of_ostara": 1, - "gm4_scuba_gear:item/flippers": 2, "gm4_boots_of_ostara:gui/advancement/boots_of_ostara": 3, "gm4_boots_of_ostara:item/flippers_of_ostara": 4, "gm4_boots_of_ostara:guidebook_icon/boots_of_ostara": 5, @@ -1257,7 +1255,6 @@ "gm4_heart_canisters:gui/advancement/heart_canisters_max": 6, "gm4_heart_canisters:item/heart_canister_tier_1": 7, "gm4_heart_canisters:item/heart_canister_tier_2": 8, - "gm4_scuba_gear:item/scuba_helmet": 9, "gm4_heart_canisters:guidebook_icon/heart_canisters": 10, "gm4_zauber_cauldrons:item/crystal/speed": 12, "gm4_zauber_cauldrons:item/crystal/regeneration": 13, @@ -1283,7 +1280,6 @@ "gm4_tnt_landmines:item/tnt_landmine_crafting_table": 45, "gm4_tnt_landmines:item/tnt_landmine_netherrack": 46, "gm4_tnt_landmines:item/tnt_landmine_invisible": 47, - "gm4_scuba_gear:gui/advancement/scuba_gear": 48, "gm4_metallurgy:gui/advancement/metallurgy_blast_ore": 49, "gm4_metallurgy:gui/advancement/metallurgy_cast": 50, "gm4_relocators:gui/advancement/relocators": 51, diff --git a/gm4/skin_cache.json b/gm4/skin_cache.json index 505748697a..d063583b23 100644 --- a/gm4/skin_cache.json +++ b/gm4/skin_cache.json @@ -706,13 +706,13 @@ }, "gm4_scuba_gear:scuba_helmet": { "uuid": [ - -68336571, - 19415274, - -1818733955, - -1859858872 + -1411342862, + -1228846809, + -1234065086, + 1387403600 ], - "value": "ewogICJ0aW1lc3RhbXAiIDogMTYyODUzNDg1MTY2MCwKICAicHJvZmlsZUlkIiA6ICJmMGIzYmRkMjEwNDg0Y2VlYjZhNTQyYmZiOGEyNTdiMiIsCiAgInByb2ZpbGVOYW1lIiA6ICJBbm9uaW1ZVFQiLAogICJzaWduYXR1cmVSZXF1aXJlZCIgOiB0cnVlLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDExZTAyOTJlZTgzZDUwZTQzM2MxNTkxNzE5OGZhNDRjYjZkMTMyODhiNmFhNjZmYmUzY2QxZTZkZjY1OGRhNCIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9CiAgfQp9", - "hash": "9b2ea1635d53878417688b505a8875422100d314", + "value": "eyd0ZXh0dXJlcyc6IHsnU0tJTic6IHsndXJsJzogJ2h0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWY2YWVlYzM2ZjQ2MmRlYjUzOTc0NWFhMzY4MThiNmQ0NGIwYzk1OGViNTY4NTJlYTAyZTM0YzMzZmRiZGZmMCd9fX0=", + "hash": "4a257159fd9d30ceff7484d393efe9ed2e399abf", "parent_module": "gm4_scuba_gear" }, "gm4_smelteries:smeltery": { diff --git a/gm4_boots_of_ostara/data/gm4_boots_of_ostara/item_modifier/boots_of_ostara.json b/gm4_boots_of_ostara/data/gm4_boots_of_ostara/item_modifier/boots_of_ostara.json index 3f525e2cc3..e88074bdcc 100644 --- a/gm4_boots_of_ostara/data/gm4_boots_of_ostara/item_modifier/boots_of_ostara.json +++ b/gm4_boots_of_ostara/data/gm4_boots_of_ostara/item_modifier/boots_of_ostara.json @@ -51,47 +51,5 @@ "italic": true } ] - }, - { - "function": "minecraft:set_components", - "components": { - "minecraft:custom_model_data": "gm4_scuba_gear:item/flippers" - }, - "conditions": [ - { - "condition": "minecraft:value_check", - "value": { - "type": "minecraft:score", - "target": { - "type": "minecraft:fixed", - "name": "$boa_flippers" - }, - "score": "gm4_crafting" - }, - "range": 1 - } - ] - }, - { - "function": "minecraft:set_name", - "name": { - "translate": "item.gm4.flippers_of_ostara", - "fallback": "Flippers of Ostara", - "italic": false - }, - "conditions": [ - { - "condition": "minecraft:value_check", - "value": { - "type": "minecraft:score", - "target": { - "type": "minecraft:fixed", - "name": "$boa_flippers" - }, - "score": "gm4_crafting" - }, - "range": 1 - } - ] } ] diff --git a/gm4_scuba_gear/README.md b/gm4_scuba_gear/README.md index 0c0a639b52..5d8f207de8 100644 --- a/gm4_scuba_gear/README.md +++ b/gm4_scuba_gear/README.md @@ -3,6 +3,7 @@ Ease ocean exploration with craftable scuba gear! ### Features -- Adds Flippers which allow players to swim faster in Water. -- Adds the SCUBA Tank and Helmet which gives 4 minutes of conduit power when submerged. -- When worn on land, the player is given a slowness debuff. +- Adds the Wetsuit and Flippers which aids players in underwater movement. +- When wearing Flippers on land, players are given a slowness debuff. +- Adds the SCUBA Tank which adds 4 minutes of submerged air time. +- Adds the SCUBA Helmet which hastens underwater mining. diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/equipment/scuba.json b/gm4_scuba_gear/assets/gm4_scuba_gear/equipment/scuba.json new file mode 100644 index 0000000000..ca6a9f9942 --- /dev/null +++ b/gm4_scuba_gear/assets/gm4_scuba_gear/equipment/scuba.json @@ -0,0 +1,26 @@ +{ + "layers": { + "humanoid": [ + { + "texture": "gm4_scuba_gear:scuba" + }, + { + "dyeable": { + "color_when_undyed": 2321353 + }, + "texture": "gm4_scuba_gear:scuba_overlay" + } + ], + "humanoid_leggings": [ + { + "texture": "gm4_scuba_gear:scuba" + }, + { + "dyeable": { + "color_when_undyed": 2321353 + }, + "texture": "gm4_scuba_gear:scuba_overlay" + } + ] + } +} diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/items/flippers.json b/gm4_scuba_gear/assets/gm4_scuba_gear/items/flippers.json new file mode 100644 index 0000000000..67fcc7c952 --- /dev/null +++ b/gm4_scuba_gear/assets/gm4_scuba_gear/items/flippers.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "gm4_scuba_gear:item/flippers", + "tints": [ + { + "type": "minecraft:dye", + "default": -14455863 + } + ] + } +} diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/items/scuba_helmet.json b/gm4_scuba_gear/assets/gm4_scuba_gear/items/scuba_helmet.json new file mode 100644 index 0000000000..7a978a549a --- /dev/null +++ b/gm4_scuba_gear/assets/gm4_scuba_gear/items/scuba_helmet.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "gm4_scuba_gear:item/scuba_helmet" + } +} diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/items/scuba_tank.json b/gm4_scuba_gear/assets/gm4_scuba_gear/items/scuba_tank.json new file mode 100644 index 0000000000..58623bf574 --- /dev/null +++ b/gm4_scuba_gear/assets/gm4_scuba_gear/items/scuba_tank.json @@ -0,0 +1,6 @@ +{ + "model": { + "type": "minecraft:model", + "model": "gm4_scuba_gear:item/scuba_tank" + } +} diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/items/wetsuit.json b/gm4_scuba_gear/assets/gm4_scuba_gear/items/wetsuit.json new file mode 100644 index 0000000000..bd92a02bc5 --- /dev/null +++ b/gm4_scuba_gear/assets/gm4_scuba_gear/items/wetsuit.json @@ -0,0 +1,12 @@ +{ + "model": { + "type": "minecraft:model", + "model": "gm4_scuba_gear:item/wetsuit", + "tints": [ + { + "type": "minecraft:dye", + "default": -14455863 + } + ] + } +} diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/flippers.json b/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/flippers.json new file mode 100644 index 0000000000..83ce38eea9 --- /dev/null +++ b/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/flippers.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "gm4_scuba_gear:item/flippers", + "layer1": "gm4_scuba_gear:item/flippers_overlay" + } +} diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/scuba_helmet.json b/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/scuba_helmet.json new file mode 100644 index 0000000000..39a60baa69 --- /dev/null +++ b/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/scuba_helmet.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "gm4_scuba_gear:item/scuba_helmet" + } +} diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/scuba_tank.json b/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/scuba_tank.json new file mode 100644 index 0000000000..f5432b691e --- /dev/null +++ b/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/scuba_tank.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "gm4_scuba_gear:item/scuba_tank" + } +} diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/wetsuit.json b/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/wetsuit.json new file mode 100644 index 0000000000..c092406f9c --- /dev/null +++ b/gm4_scuba_gear/assets/gm4_scuba_gear/models/item/wetsuit.json @@ -0,0 +1,7 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "gm4_scuba_gear:item/wetsuit", + "layer1": "gm4_scuba_gear:item/wetsuit_overlay" + } +} diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid/scuba.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid/scuba.png new file mode 100644 index 0000000000..e2ecd8b60f Binary files /dev/null and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid/scuba.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid/scuba_overlay.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid/scuba_overlay.png new file mode 100644 index 0000000000..05d7f0ea47 Binary files /dev/null and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid/scuba_overlay.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid_leggings/scuba.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid_leggings/scuba.png new file mode 100644 index 0000000000..ea43138f0a Binary files /dev/null and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid_leggings/scuba.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid_leggings/scuba_overlay.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid_leggings/scuba_overlay.png new file mode 100644 index 0000000000..e426ea36e3 Binary files /dev/null and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/entity/equipment/humanoid_leggings/scuba_overlay.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/flippers.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/flippers.png index 77b97ce6d9..d5d89c0072 100644 Binary files a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/flippers.png and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/flippers.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/flippers_overlay.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/flippers_overlay.png index 8fca7781bb..100f8a7517 100644 Binary files a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/flippers_overlay.png and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/flippers_overlay.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/scuba_helmet.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/scuba_helmet.png index 1fd07b8c6b..9541c0d028 100644 Binary files a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/scuba_helmet.png and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/scuba_helmet.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/scuba_tank.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/scuba_tank.png index 3df3e0af3f..bfddc22b4c 100644 Binary files a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/scuba_tank.png and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/scuba_tank.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/wetsuit.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/wetsuit.png new file mode 100644 index 0000000000..f508f89e7f Binary files /dev/null and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/wetsuit.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/wetsuit_overlay.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/wetsuit_overlay.png new file mode 100644 index 0000000000..f9a21a7388 Binary files /dev/null and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/item/wetsuit_overlay.png differ diff --git a/gm4_scuba_gear/assets/gm4_scuba_gear/textures/misc/scuba_helmet.png b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/misc/scuba_helmet.png new file mode 100644 index 0000000000..9dee9912b2 Binary files /dev/null and b/gm4_scuba_gear/assets/gm4_scuba_gear/textures/misc/scuba_helmet.png differ diff --git a/gm4_scuba_gear/assets/translations.csv b/gm4_scuba_gear/assets/translations.csv index 4a1251fbe6..1967bd88c0 100644 --- a/gm4_scuba_gear/assets/translations.csv +++ b/gm4_scuba_gear/assets/translations.csv @@ -2,13 +2,20 @@ key,en_us item.gm4.flippers,Flippers item.gm4.scuba_helmet,SCUBA Helmet item.gm4.scuba_tank,SCUBA Tank +item.gm4.wetsuit,Wetsuit advancement.gm4.scuba_gear.title,Things Are Going Swimmingly! advancement.gm4.scuba_gear.description,Suit up with a full set of SCUBA gear text.gm4.guidebook.module_desc.scuba_gear,Ease ocean exploration with craftable scuba gear! -text.gm4.guidebook.scuba_gear.description,SCUBA Gear can be crafted in a Custom Crafter to aid in ocean travel.\n\nScutes and gold are main components for each piece. +text.gm4.guidebook.scuba_gear.description,SCUBA Gear can be crafted to aid in ocean travel.\n\nCopper and dried kelp are main components for each piece. text.gm4.guidebook.scuba_gear.crafting_flippers,Flippers can be crafted with the following recipe: text.gm4.guidebook.scuba_gear.crafting_scuba_helmet,The SCUBA Helmet can be crafted with the following recipe: text.gm4.guidebook.scuba_gear.crafting_scuba_tank,The SCUBA Tank can be crafted with the following recipe: -text.gm4.guidebook.scuba_gear.scuba_tank_extended,"An extended water breathing potion can be used to craft the tank, but it won't provide any extra benefits.\n\nA SCUBA tank and helmet must be used in conjunction." +text.gm4.guidebook.scuba_gear.crafting_wetsuit,The Wetsuit can be crafted with the following recipe: text.gm4.guidebook.scuba_gear.usage_flippers,"Flippers allow the user to swim much faster, but land traversal is greatly slowed." -text.gm4.guidebook.scuba_gear.usage_scuba_tank,Wearing both the scuba tank and helmet will grant 4 minutes of Conduit Power when underwater. +text.gm4.guidebook.scuba_gear.usage_wetsuit,"The Wetsuit allows the user to swim up or down much faster, and maintains their current depth." +text.gm4.guidebook.scuba_gear.usage_scuba_tank,Wearing the scuba tank adds 4 minutes of underwater breathing time. +text.gm4.guidebook.scuba_gear.usage_scuba_helmet,Wearing the scuba helmet increases underwater mining speed by 6 times. +item.modifiers.gm4.scuba_gear.in_water,"When in Water:" +item.modifiers.gm4.scuba_gear.on_land,"When on Land:" +item.modifiers.gm4.scuba_gear.neutral_buoyancy,"Neutral Buoyancy" +item.modifiers.gm4.scuba_gear.vertical_swimming_speed,"Vertical Swimming Speed" diff --git a/gm4_scuba_gear/beet.yaml b/gm4_scuba_gear/beet.yaml index f76d2457f8..ebbc022e48 100644 --- a/gm4_scuba_gear/beet.yaml +++ b/gm4_scuba_gear/beet.yaml @@ -1,6 +1,6 @@ id: gm4_scuba_gear name: SCUBA Gear -version: 1.6.X +version: 2.0.X data_pack: load: . @@ -30,22 +30,9 @@ meta: credits: Creator: - BPR + Updated by: + - TheEpyonProject Textures by: - BPR Icon Design: - DuckJr - model_data: - - item: leather_boots - reference: item/flippers - template: generated_overlay - - item: golden_chestplate - reference: item/scuba_tank - template: generated - - item: player_head - reference: item/scuba_helmet - template: generated - - item: player_head - reference: gui/advancement/scuba_gear - template: - name: advancement - forward: item/scuba_helmet diff --git a/gm4_scuba_gear/data/gm4/advancement/scuba_gear.json b/gm4_scuba_gear/data/gm4/advancement/scuba_gear.json index 1498b67dc3..c4adb57701 100644 --- a/gm4_scuba_gear/data/gm4/advancement/scuba_gear.json +++ b/gm4_scuba_gear/data/gm4/advancement/scuba_gear.json @@ -1,9 +1,9 @@ { "display": { "icon": { - "id": "minecraft:player_head", + "id": "minecraft:leather_helmet", "components": { - "minecraft:custom_model_data": "gui/advancement/scuba_gear", + "minecraft:item_model": "gm4_scuba_gear:scuba_helmet", "minecraft:profile": "$scuba_helmet" } }, diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/flippers.json b/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/flippers.json new file mode 100644 index 0000000000..47e50c3da5 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/flippers.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "conditions": { + "recipe": "gm4_scuba_gear:flippers" + }, + "trigger": "minecraft:recipe_unlocked" + }, + "in_deep_water": { + "conditions": { + "player": [ + { + "condition": "minecraft:reference", + "name": "gm4_scuba_gear:in_deep_water" + } + ] + }, + "trigger": "minecraft:location" + } + }, + "requirements": [ + [ + "has_the_recipe", + "in_deep_water" + ] + ], + "rewards": { + "recipes": [ + "gm4_scuba_gear:flippers" + ] + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/scuba_helmet.json b/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/scuba_helmet.json new file mode 100644 index 0000000000..418d4e1113 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/scuba_helmet.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "conditions": { + "recipe": "gm4_scuba_gear:scuba_helmet" + }, + "trigger": "minecraft:recipe_unlocked" + }, + "in_deep_water": { + "conditions": { + "player": [ + { + "condition": "minecraft:reference", + "name": "gm4_scuba_gear:in_deep_water" + } + ] + }, + "trigger": "minecraft:location" + } + }, + "requirements": [ + [ + "has_the_recipe", + "in_deep_water" + ] + ], + "rewards": { + "recipes": [ + "gm4_scuba_gear:scuba_helmet" + ] + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/scuba_tank.json b/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/scuba_tank.json new file mode 100644 index 0000000000..81c752e33d --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/scuba_tank.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "conditions": { + "recipe": "gm4_scuba_gear:scuba_tank" + }, + "trigger": "minecraft:recipe_unlocked" + }, + "in_deep_water": { + "conditions": { + "player": [ + { + "condition": "minecraft:reference", + "name": "gm4_scuba_gear:in_deep_water" + } + ] + }, + "trigger": "minecraft:location" + } + }, + "requirements": [ + [ + "has_the_recipe", + "in_deep_water" + ] + ], + "rewards": { + "recipes": [ + "gm4_scuba_gear:scuba_tank" + ] + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/wetsuit.json b/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/wetsuit.json new file mode 100644 index 0000000000..7cbea64dde --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/advancement/recipes/wetsuit.json @@ -0,0 +1,33 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_the_recipe": { + "conditions": { + "recipe": "gm4_scuba_gear:wetsuit" + }, + "trigger": "minecraft:recipe_unlocked" + }, + "in_deep_water": { + "conditions": { + "player": [ + { + "condition": "minecraft:reference", + "name": "gm4_scuba_gear:in_deep_water" + } + ] + }, + "trigger": "minecraft:location" + } + }, + "requirements": [ + [ + "has_the_recipe", + "in_deep_water" + ] + ], + "rewards": { + "recipes": [ + "gm4_scuba_gear:wetsuit" + ] + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/enchantment/flippers.json b/gm4_scuba_gear/data/gm4_scuba_gear/enchantment/flippers.json new file mode 100644 index 0000000000..f5f607a2c7 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/enchantment/flippers.json @@ -0,0 +1,48 @@ +{ + "description": "", + "exclusive_set": "minecraft:depth_strider", + "supported_items": "minecraft:leather_boots", + "weight": 1, + "max_level": 1, + "min_cost": { + "base": 0, + "per_level_above_first": 0 + }, + "max_cost": { + "base": 0, + "per_level_above_first": 0 + }, + "anvil_cost": 0, + "slots": [ + "feet" + ], + "effects": { + "minecraft:location_changed": [ + { + "requirements": [ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "location": { + "fluid": { + "fluids": "#minecraft:water" + } + } + } + } + } + ], + "effect": { + "type": "minecraft:attribute", + "attribute": "minecraft:movement_speed", + "id": "gm4_scuba_gear:flippers/on_land", + "amount": -0.25, + "operation": "add_multiplied_base" + } + } + ] + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/enchantment/wetsuit.json b/gm4_scuba_gear/data/gm4_scuba_gear/enchantment/wetsuit.json new file mode 100644 index 0000000000..9cd1e8ccfa --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/enchantment/wetsuit.json @@ -0,0 +1,191 @@ +{ + "description": "", + "supported_items": "minecraft:leather_leggings", + "weight": 1, + "max_level": 1, + "min_cost": { + "base": 0, + "per_level_above_first": 0 + }, + "max_cost": { + "base": 0, + "per_level_above_first": 0 + }, + "anvil_cost": 0, + "slots": [ + "legs" + ], + "effects": { + "minecraft:tick": [ + { + "requirements": [ + { + "condition": "minecraft:all_of", + "terms": [ + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:location_check", + "predicate": { + "fluid": { + "fluids": "#minecraft:water" + } + } + } + }, + { + "condition": "minecraft:entity_scores", + "entity": "this", + "scores": { + "gm4_sg_buoyancy": { + "min": -1, + "max": 1 + } + } + } + ] + } + ], + "effect": { + "type": "minecraft:run_function", + "function": "gm4_scuba_gear:wetsuit_buoyancy/clear" + } + }, + { + "requirements": [ + { + "condition": "minecraft:location_check", + "predicate": { + "fluid": { + "fluids": "#minecraft:water" + } + } + }, + { + "condition": "minecraft:any_of", + "terms": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type_specific": { + "type": "minecraft:player", + "input": { + "jump": false, + "sneak": false + } + } + } + }, + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type_specific": { + "type": "minecraft:player", + "input": { + "jump": true, + "sneak": true + } + } + } + } + ] + }, + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:entity_scores", + "entity": "this", + "scores": { + "gm4_sg_buoyancy": 0 + } + } + } + ], + "effect": { + "type": "minecraft:run_function", + "function": "gm4_scuba_gear:wetsuit_buoyancy/neutral" + } + }, + { + "requirements": [ + { + "condition": "minecraft:location_check", + "predicate": { + "fluid": { + "fluids": "#minecraft:water" + } + } + }, + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:entity_scores", + "entity": "this", + "scores": { + "gm4_sg_buoyancy": -1 + } + } + }, + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type_specific": { + "type": "minecraft:player", + "input": { + "jump": false, + "sneak": true + } + } + } + } + ], + "effect": { + "type": "minecraft:run_function", + "function": "gm4_scuba_gear:wetsuit_buoyancy/negative" + } + }, + { + "requirements": [ + { + "condition": "minecraft:location_check", + "predicate": { + "fluid": { + "fluids": "#minecraft:water" + } + } + }, + { + "condition": "minecraft:inverted", + "term": { + "condition": "minecraft:entity_scores", + "entity": "this", + "scores": { + "gm4_sg_buoyancy": 1 + } + } + }, + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "type_specific": { + "type": "minecraft:player", + "input": { + "jump": true, + "sneak": false + } + } + } + } + ], + "effect": { + "type": "minecraft:run_function", + "function": "gm4_scuba_gear:wetsuit_buoyancy/positive" + } + } + ] + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/breathe.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/breathe.mcfunction deleted file mode 100644 index d0d73c095b..0000000000 --- a/gm4_scuba_gear/data/gm4_scuba_gear/function/breathe.mcfunction +++ /dev/null @@ -1,5 +0,0 @@ -# @s = players with SCUBA helmet and tank equipped -# run from equipped - -effect give @s minecraft:conduit_power 240 -tag @s add gm4_in_water diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/check_gear.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/check_gear.mcfunction deleted file mode 100644 index f7ab37900a..0000000000 --- a/gm4_scuba_gear/data/gm4_scuba_gear/function/check_gear.mcfunction +++ /dev/null @@ -1,5 +0,0 @@ -# @s = player in water -# run from main - -execute unless entity @s[predicate=gm4_scuba_gear:tank_equipped] run function gm4_scuba_gear:remove_effect -execute at @s anchored eyes positioned ^ ^ ^ unless predicate gm4_scuba_gear:in_water run function gm4_scuba_gear:remove_effect diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/check_recipes.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/check_recipes.mcfunction index 6e1f30d2e4..dfd3940db0 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/function/check_recipes.mcfunction +++ b/gm4_scuba_gear/data/gm4_scuba_gear/function/check_recipes.mcfunction @@ -1,4 +1,4 @@ -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 ..64 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:gold_ingot"},{Slot:1b,id:"minecraft:turtle_helmet"},{Slot:2b,id:"minecraft:gold_ingot"},{Slot:3b,id:"minecraft:gold_ingot"},{Slot:4b,id:"minecraft:glass_pane"},{Slot:5b,id:"minecraft:gold_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_scuba_gear:crafting/scuba_helmet -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 1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:gold_ingot"},{Slot:1b,id:"minecraft:potion",components:{"minecraft:potion_contents":{potion:"minecraft:water_breathing"}}},{Slot:2b,id:"minecraft:gold_ingot"},{Slot:3b,id:"minecraft:turtle_scute"},{Slot:4b,id:"minecraft:gold_ingot"},{Slot:5b,id:"minecraft:turtle_scute"},{Slot:6b,id:"minecraft:gold_ingot"},{Slot:7b,id:"minecraft:gold_ingot"},{Slot:8b,id:"minecraft:gold_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_scuba_gear:crafting/scuba_tank -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 1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:gold_ingot"},{Slot:1b,id:"minecraft:potion",components:{"minecraft:potion_contents":{potion:"minecraft:long_water_breathing"}}},{Slot:2b,id:"minecraft:gold_ingot"},{Slot:3b,id:"minecraft:turtle_scute"},{Slot:4b,id:"minecraft:gold_ingot"},{Slot:5b,id:"minecraft:turtle_scute"},{Slot:6b,id:"minecraft:gold_ingot"},{Slot:7b,id:"minecraft:gold_ingot"},{Slot:8b,id:"minecraft:gold_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_scuba_gear:crafting/scuba_tank -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:turtle_scute"},{Slot:2b,id:"minecraft:turtle_scute"},{Slot:3b,id:"minecraft:rabbit_hide"},{Slot:5b,id:"minecraft:rabbit_hide"},{Slot:6b,id:"minecraft:rabbit_hide"},{Slot:8b,id:"minecraft:rabbit_hide"}]} run loot replace block ~ ~ ~ container.0 loot gm4_scuba_gear:crafting/flippers +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:1b,id:"minecraft:copper_ingot"},{Slot:2b,id:"minecraft:copper_ingot"},{Slot:3b,id:"minecraft:copper_ingot"},{Slot:4b,id:"minecraft:glass"},{Slot:5b,id:"minecraft:copper_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_scuba_gear:crafting/scuba_helmet +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 8 if score $stack_size gm4_crafting matches 1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:copper_ingot"},{Slot:2b,id:"minecraft:copper_ingot"},{Slot:3b,id:"minecraft:decorated_pot"},{Slot:4b,id:"minecraft:copper_ingot"},{Slot:5b,id:"minecraft:decorated_pot"},{Slot:6b,id:"minecraft:copper_ingot"},{Slot:7b,id:"minecraft:copper_ingot"},{Slot:8b,id:"minecraft:copper_ingot"}]} run loot replace block ~ ~ ~ container.0 loot gm4_scuba_gear:crafting/scuba_tank +execute if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 7 if score $stack_size gm4_crafting matches 1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:dried_kelp"},{Slot:1b,id:"minecraft:copper_ingot"},{Slot:2b,id:"minecraft:dried_kelp"},{Slot:3b,id:"minecraft:dried_kelp"},{Slot:5b,id:"minecraft:dried_kelp"},{Slot:6b,id:"minecraft:dried_kelp"},{Slot:8b,id:"minecraft:dried_kelp"}]} run loot replace block ~ ~ ~ container.0 loot gm4_scuba_gear:crafting/wetsuit +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 1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:copper_ingot"},{Slot:2b,id:"minecraft:copper_ingot"},{Slot:3b,id:"minecraft:dried_kelp"},{Slot:5b,id:"minecraft:dried_kelp"}]} run loot replace block ~ ~ ~ container.0 loot gm4_scuba_gear:crafting/flippers diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/equipped.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/equipped.mcfunction deleted file mode 100644 index f6eb8a502f..0000000000 --- a/gm4_scuba_gear/data/gm4_scuba_gear/function/equipped.mcfunction +++ /dev/null @@ -1,5 +0,0 @@ -# @s = player wearing a piece of scuba gear -# run from main - -execute if entity @s[tag=!gm4_in_water,predicate=gm4_scuba_gear:tank_equipped] at @s anchored eyes positioned ^ ^ ^ if predicate gm4_scuba_gear:in_water run function gm4_scuba_gear:breathe -effect give @s[scores={gm4_sg_swim=1..},predicate=gm4_scuba_gear:flippers_equipped] dolphins_grace 3 0 true diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/init.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/init.mcfunction index 734dc51f45..b437cf9e7d 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/function/init.mcfunction +++ b/gm4_scuba_gear/data/gm4_scuba_gear/function/init.mcfunction @@ -1,9 +1,7 @@ -scoreboard objectives add gm4_sg_swim minecraft.custom:minecraft.swim_one_cm +scoreboard objectives add gm4_sg_buoyancy dummy execute unless score scuba_gear gm4_modules matches 1 run data modify storage gm4:log queue append value {type:"install",module:"Scuba Gear"} execute unless score scuba_gear gm4_earliest_version < scuba_gear gm4_modules run scoreboard players operation scuba_gear gm4_earliest_version = scuba_gear gm4_modules scoreboard players set scuba_gear gm4_modules 1 -schedule function gm4_scuba_gear:main 1t - #$moduleUpdateList diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/main.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/main.mcfunction deleted file mode 100644 index cb59ce876a..0000000000 --- a/gm4_scuba_gear/data/gm4_scuba_gear/function/main.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -# check if SCUBA gear is in inventory -execute as @a[gamemode=!spectator,predicate=gm4_scuba_gear:scuba_gear_equipped] run function gm4_scuba_gear:equipped - -# reset scores and tags -scoreboard players reset @a gm4_sg_swim -execute as @a[tag=gm4_in_water] run function gm4_scuba_gear:check_gear - -schedule function gm4_scuba_gear:main 16t diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/remove_effect.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/remove_effect.mcfunction deleted file mode 100644 index ffce14b858..0000000000 --- a/gm4_scuba_gear/data/gm4_scuba_gear/function/remove_effect.mcfunction +++ /dev/null @@ -1,5 +0,0 @@ -# @s = players that no longer fit SCUBA requirements (removes gear or out of water) -# run from main - -effect clear @s minecraft:conduit_power -execute at @s anchored eyes positioned ^ ^ ^ unless predicate gm4_scuba_gear:in_water run tag @s remove gm4_in_water diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/clear.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/clear.mcfunction new file mode 100644 index 0000000000..a3e8e056da --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/clear.mcfunction @@ -0,0 +1,8 @@ +# removes wetsuit attributes when out of water +# @s = player wearing wetsuit +# located at @s +# run from enchant, gm4_scuba_gear:enchantment/wetsuit + +item modify entity @s armor.legs gm4_scuba_gear:wetsuit_buoyancy/clear + +scoreboard players reset @s gm4_sg_buoyancy diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/negative.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/negative.mcfunction new file mode 100644 index 0000000000..fe39dd3ba9 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/negative.mcfunction @@ -0,0 +1,8 @@ +# increases player gravity when actively sinking +# @s = player wearing wetsuit, sneak input +# located at @s, in water +# run from enchant, gm4_scuba_gear:enchantment/wetsuit + +item modify entity @s armor.legs gm4_scuba_gear:wetsuit_buoyancy/negative + +scoreboard players set @s gm4_sg_buoyancy -1 diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/neutral.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/neutral.mcfunction new file mode 100644 index 0000000000..dfe48c5eec --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/neutral.mcfunction @@ -0,0 +1,8 @@ +# negates player gravity to maintain vertical position +# @s = player wearing wetsuit, not sneak or jump input +# located at @s, in water +# run from enchant, gm4_scuba_gear:enchantment/wetsuit + +item modify entity @s armor.legs gm4_scuba_gear:wetsuit_buoyancy/neutral + +scoreboard players set @s gm4_sg_buoyancy 0 diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/positive.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/positive.mcfunction new file mode 100644 index 0000000000..659a7fe452 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/function/wetsuit_buoyancy/positive.mcfunction @@ -0,0 +1,8 @@ +# decreases player gravity when actively ascending +# @s = player wearing wetsuit, jump input +# located at @s, in water +# run from enchant, gm4_scuba_gear:enchantment/wetsuit + +item modify entity @s armor.legs gm4_scuba_gear:wetsuit_buoyancy/negative + +scoreboard players set @s gm4_sg_buoyancy 1 diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/flippers.json b/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/flippers.json index dee6bfcba2..2d6c461b99 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/flippers.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/flippers.json @@ -2,16 +2,15 @@ "input": { "type": "shaped", "recipe": [ - "S S", - "R R", - "R R" + "C C", + "K K" ], "key": { - "S": { - "item": "minecraft:turtle_scute" + "C": { + "item": "minecraft:copper_ingot" }, - "R": { - "item": "minecraft:rabbit_hide" + "K": { + "item": "minecraft:dried_kelp" } } }, @@ -21,7 +20,7 @@ "name": "gm4_scuba_gear:items/flippers", "count": 1, "guidebook": { - "display_color": 11009871 + "display_color": 2367281 } } } diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/scuba_helmet.json b/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/scuba_helmet.json index 7d059cd3e5..ad39b0e801 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/scuba_helmet.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/scuba_helmet.json @@ -2,18 +2,15 @@ "input": { "type": "shaped", "recipe": [ - "GTG", - "GPG" + "CCC", + "CGC" ], "key": { - "G": { - "item": "minecraft:gold_ingot" - }, - "T": { - "item": "minecraft:turtle_helmet" + "C": { + "item": "minecraft:copper_ingot" }, - "P": { - "item": "minecraft:glass_pane" + "G": { + "item": "minecraft:glass" } } }, diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/scuba_tank.json b/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/scuba_tank.json index cf062071d8..1445fb1e1b 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/scuba_tank.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/scuba_tank.json @@ -2,33 +2,19 @@ "input": { "type": "shaped", "recipe": [ - "GPG", - "SGS", - "GGG" + "C C", + "PCP", + "CCC" ], "key": { - "G": { - "item": "minecraft:gold_ingot" + "C": { + "item": "minecraft:copper_ingot" }, "P": [ { - "item": "minecraft:potion", - "components": {"minecraft:potion_contents":{"potion":"minecraft:water_breathing"}}, - "guidebook": { - "overlay_color": 10017472 - } - }, - { - "item": "minecraft:potion", - "components": {"minecraft:potion_contents":{"potion":"minecraft:long_water_breathing"}}, - "guidebook": { - "overlay_color": 10017472 - } + "item": "minecraft:decorated_pot" } - ], - "S": { - "item": "minecraft:turtle_scute" - } + ] } }, "output": { diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/wetsuit.json b/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/wetsuit.json new file mode 100644 index 0000000000..5ae5942c2a --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/gm4_recipes/wetsuit.json @@ -0,0 +1,28 @@ +{ + "input": { + "type": "shaped", + "recipe": [ + "KCK", + "K K", + "K K" + ], + "key": { + "K": { + "item": "minecraft:dried_kelp" + }, + "C": { + "item": "minecraft:copper_ingot" + } + } + }, + "output": { + "result": { + "type": "loot_table", + "name": "gm4_scuba_gear:items/wetsuit", + "count": 1, + "guidebook": { + "display_color": 2367281 + } + } + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/guidebook/scuba_gear.json b/gm4_scuba_gear/data/gm4_scuba_gear/guidebook/scuba_gear.json index 36dd9d602b..330681be37 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/guidebook/scuba_gear.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/guidebook/scuba_gear.json @@ -6,68 +6,70 @@ "id": "minecraft:horn_coral" }, "criteria": { - "obtain_scute": { + "obtain_copper": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ - "minecraft:turtle_scute" + "minecraft:copper_ingot" ] } ] } }, - "obtain_water_breathing": { + "obtain_dried_kelp": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { - "items": "minecraft:potion", - "predicates": { - "minecraft:potion_contents": "minecraft:water_breathing" - } + "items": [ + "minecraft:dried_kelp" + ] } ] } }, - "obtain_turtle_helmet": { + "obtain_scuba_helmet": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ - "minecraft:turtle_helmet" - ] + "minecraft:player_head" + ], + "predicates": { + "minecraft:custom_data": "{gm4_scuba_gear:{item:\"helmet\"}}" + } } ] } }, - "obtain_scuba_helmet": { + "obtain_scuba_tank": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ - "minecraft:player_head" + "minecraft:leather_chestplate" ], "predicates": { - "minecraft:custom_data": "{gm4_scuba_gear:{item:\"helmet\"}}" + "minecraft:custom_data": "{gm4_scuba_gear:{item:\"tank\"}}" } } ] } }, - "obtain_scuba_tank": { + "obtain_wetsuit": { "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "items": [ - "minecraft:golden_chestplate" + "minecraft:leather_leggings" ], "predicates": { - "minecraft:custom_data": "{gm4_scuba_gear:{item:\"tank\"}}" + "minecraft:custom_data": "{gm4_scuba_gear:{item:\"wetsuit\"}}" } } ] @@ -101,7 +103,7 @@ }, { "translate": "text.gm4.guidebook.scuba_gear.description", - "fallback": "SCUBA Gear can be crafted in a Custom Crafter to aid in ocean travel.\n\nScutes and gold are main components for each piece." + "fallback": "SCUBA Gear can be crafted to aid in ocean travel.\n\nCopper and dried kelp are main components for each piece." } ] ] @@ -111,7 +113,7 @@ "enable": [], "requirements": [ [ - "obtain_scute" + "obtain_dried_kelp" ] ], "pages": [ @@ -128,12 +130,34 @@ ] ] }, + { + "name": "crafting_wetsuit", + "enable": [], + "requirements": [ + [ + "obtain_dried_kelp" + ] + ], + "pages": [ + [ + { + "translate": "text.gm4.guidebook.scuba_gear.crafting_wetsuit", + "fallback": "The Wetsuit can be crafted with the following recipe:" + }, + "\n", + { + "insert": "recipe", + "recipe": "gm4_scuba_gear:wetsuit" + } + ] + ] + }, { "name": "crafting_scuba_helmet", "enable": [], "requirements": [ [ - "obtain_turtle_helmet" + "obtain_copper" ] ], "pages": [ @@ -155,10 +179,7 @@ "enable": [], "requirements": [ [ - "obtain_scute" - ], - [ - "obtain_water_breathing" + "obtain_copper" ] ], "pages": [ @@ -172,12 +193,6 @@ "insert": "recipe", "recipe": "gm4_scuba_gear:scuba_tank" } - ], - [ - { - "translate": "text.gm4.guidebook.scuba_gear.scuba_tank_extended", - "fallback": "An extended water breathing potion can be used to craft the tank, but it won't provide any extra benefits.\n\nA SCUBA tank and helmet must be used in conjunction." - } ] ] }, @@ -198,12 +213,28 @@ ] ] }, + { + "name": "usage_wetsuit", + "enable": [], + "requirements": [ + [ + "obtain_wetsuit" + ] + ], + "pages": [ + [ + { + "translate": "text.gm4.guidebook.scuba_gear.usage_wetsuit", + "fallback": "The Wetsuit allows the user to swim up or down much faster, and maintains their current depth." + } + ] + ] + }, { "name": "usage_scuba_tank", "enable": [], "requirements": [ [ - "obtain_scuba_helmet", "obtain_scuba_tank" ] ], @@ -211,7 +242,24 @@ [ { "translate": "text.gm4.guidebook.scuba_gear.usage_scuba_tank", - "fallback": "Wearing both the scuba tank and helmet will grant 4 minutes of Conduit Power when underwater." + "fallback": "Wearing the scuba tank adds 4 minutes of underwater breathing time." + } + ] + ] + }, + { + "name": "usage_scuba_helmet", + "enable": [], + "requirements": [ + [ + "obtain_scuba_helmet" + ] + ], + "pages": [ + [ + { + "translate": "text.gm4.guidebook.scuba_gear.usage_scuba_helmet", + "fallback": "Wearing the scuba helmet increases underwater mining speed by 6 times." } ] ] diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/clear.json b/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/clear.json new file mode 100644 index 0000000000..20a9552762 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/clear.json @@ -0,0 +1,13 @@ +{ + "function": "minecraft:set_attributes", + "modifiers": [ + { + "attribute": "minecraft:gravity", + "id": "gm4_scuba_gear:wetsuit_buoyancy", + "amount": 0, + "operation": "add_value", + "slot": "legs" + } + ], + "replace": false +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/negative.json b/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/negative.json new file mode 100644 index 0000000000..026c6bf0f1 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/negative.json @@ -0,0 +1,13 @@ +{ + "function": "minecraft:set_attributes", + "modifiers": [ + { + "attribute": "minecraft:gravity", + "id": "gm4_scuba_gear:wetsuit_buoyancy", + "amount": -1.2, + "operation": "add_multiplied_total", + "slot": "legs" + } + ], + "replace": false +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/neutral.json b/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/neutral.json new file mode 100644 index 0000000000..61482ff4ce --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/neutral.json @@ -0,0 +1,13 @@ +{ + "function": "minecraft:set_attributes", + "modifiers": [ + { + "attribute": "minecraft:gravity", + "id": "gm4_scuba_gear:wetsuit_buoyancy", + "amount": -1, + "operation": "add_multiplied_total", + "slot": "legs" + } + ], + "replace": false +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/positive.json b/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/positive.json new file mode 100644 index 0000000000..f52309c571 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/item_modifier/wetsuit_buoyancy/positive.json @@ -0,0 +1,13 @@ +{ + "function": "minecraft:set_attributes", + "modifiers": [ + { + "attribute": "minecraft:gravity", + "id": "gm4_scuba_gear:wetsuit_buoyancy", + "amount": 1.2, + "operation": "add_multiplied_total", + "slot": "legs" + } + ], + "replace": false +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/flippers.json b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/flippers.json index b617166679..4539fc9033 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/flippers.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/flippers.json @@ -1,29 +1,29 @@ { - "type": "minecraft:generic", - "pools": [ + "type": "minecraft:generic", + "pools": [ + { + "rolls": 8, + "entries": [ { - "rolls": 8, - "entries": [ - { - "type": "minecraft:loot_table", - "value": "gm4:air" - } - ] - }, + "type": "minecraft:loot_table", + "value": "gm4:air" + } + ] + }, + { + "rolls": 1, + "entries": [ { - "rolls": 1, - "entries": [ - { - "type": "minecraft:loot_table", - "value": "gm4_scuba_gear:items/flippers", - "functions": [ - { - "function": "minecraft:set_count", - "count": 1 - } - ] - } - ] + "type": "minecraft:loot_table", + "value": "gm4_scuba_gear:items/flippers", + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ] } - ] + ] + } + ] } diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/scuba_helmet.json b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/scuba_helmet.json index ce285b5b03..65f15e7b23 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/scuba_helmet.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/scuba_helmet.json @@ -1,29 +1,29 @@ { - "type": "minecraft:generic", - "pools": [ + "type": "minecraft:generic", + "pools": [ + { + "rolls": 8, + "entries": [ { - "rolls": 8, - "entries": [ - { - "type": "minecraft:loot_table", - "value": "gm4:air" - } - ] - }, + "type": "minecraft:loot_table", + "value": "gm4:air" + } + ] + }, + { + "rolls": 1, + "entries": [ { - "rolls": 1, - "entries": [ - { - "type": "minecraft:loot_table", - "value": "gm4_scuba_gear:items/scuba_helmet", - "functions": [ - { - "function": "minecraft:set_count", - "count": 1 - } - ] - } - ] + "type": "minecraft:loot_table", + "value": "gm4_scuba_gear:items/scuba_helmet", + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ] } - ] + ] + } + ] } diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/scuba_tank.json b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/scuba_tank.json index 2c3968fa39..93b6f257bb 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/scuba_tank.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/scuba_tank.json @@ -1,29 +1,29 @@ { - "type": "minecraft:generic", - "pools": [ + "type": "minecraft:generic", + "pools": [ + { + "rolls": 8, + "entries": [ { - "rolls": 8, - "entries": [ - { - "type": "minecraft:loot_table", - "value": "gm4:air" - } - ] - }, + "type": "minecraft:loot_table", + "value": "gm4:air" + } + ] + }, + { + "rolls": 1, + "entries": [ { - "rolls": 1, - "entries": [ - { - "type": "minecraft:loot_table", - "value": "gm4_scuba_gear:items/scuba_tank", - "functions": [ - { - "function": "minecraft:set_count", - "count": 1 - } - ] - } - ] + "type": "minecraft:loot_table", + "value": "gm4_scuba_gear:items/scuba_tank", + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ] } - ] + ] + } + ] } diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/wetsuit.json b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/wetsuit.json new file mode 100644 index 0000000000..b028d6a2dd --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/crafting/wetsuit.json @@ -0,0 +1,29 @@ +{ + "type": "minecraft:generic", + "pools": [ + { + "rolls": 8, + "entries": [ + { + "type": "minecraft:loot_table", + "value": "gm4:air" + } + ] + }, + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:loot_table", + "value": "gm4_scuba_gear:items/wetsuit", + "functions": [ + { + "function": "minecraft:set_count", + "count": 1 + } + ] + } + ] + } + ] +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/flippers.json b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/flippers.json index a00523ea6c..4dbbfab8cb 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/flippers.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/flippers.json @@ -10,41 +10,64 @@ { "function": "minecraft:set_components", "components": { - "minecraft:dyed_color": 11009871, - "minecraft:tooltip_display": { - "hidden_components": [ - "minecraft:dyed_color" - ] + "minecraft:item_name": { + "translate": "item.gm4.flippers", + "fallback": "Flippers", + "color": "white", + "italic": false }, "minecraft:attribute_modifiers": [ { "type": "minecraft:armor", - "id": "gm4_scuba_gear:flippers_armor", - "slot": "feet", + "id": "minecraft:generic.armor", "amount": 1, - "operation": "add_value" + "operation": "add_value", + "slot": "feet" }, { - "type": "minecraft:movement_speed", - "id": "gm4_scuba_gear:flippers_movement_speed", - "slot": "feet", - "amount": -0.4, - "operation": "add_multiplied_base" + "type": "minecraft:water_movement_efficiency", + "id": "gm4_scuba_gear:flippers/water_movement_efficiency", + "amount": 1, + "operation": "add_value", + "slot": "feet" } ], - "minecraft:custom_model_data": "item/flippers" - } - }, - { - "function": "minecraft:set_custom_data", - "tag": "{gm4_scuba_gear:{item:'flippers'}}" - }, - { - "function": "minecraft:set_name", - "name": { - "translate": "item.gm4.flippers", - "fallback": "Flippers", - "italic": false + "minecraft:custom_data": { + "gm4_scuba_gear": { + "item": "flippers" + } + }, + "minecraft:item_model": "gm4_scuba_gear:flippers", + "!minecraft:enchantable": {}, + "minecraft:enchantments": { + "gm4_scuba_gear:flippers": 1 + }, + "minecraft:enchantment_glint_override": false, + "minecraft:equippable": { + "slot": "feet", + "asset_id": "gm4_scuba_gear:scuba" + }, + "minecraft:max_damage": 156, + "minecraft:lore": [ + { + "translate": "item.modifiers.gm4.scuba_gear.on_land", + "fallback": "When on Land:", + "color": "gray", + "italic": false + }, + { + "translate": "attribute.modifier.take.1", + "with": [ + "25", + { + "translate": "attribute.name.generic.movement_speed", + "fallback": "Speed" + } + ], + "color": "red", + "italic": false + } + ] } } ] diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/scuba_helmet.json b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/scuba_helmet.json index cace400166..21e839672a 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/scuba_helmet.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/scuba_helmet.json @@ -5,42 +5,48 @@ "entries": [ { "type": "minecraft:item", - "name": "minecraft:player_head", + "name": "minecraft:leather_helmet", "functions": [ { "function": "minecraft:set_components", "components": { + "minecraft:item_name": { + "translate": "item.gm4.scuba_helmet", + "fallback": "SCUBA Helmet", + "italic": false + }, "minecraft:attribute_modifiers": [ { "type": "minecraft:armor", - "id": "gm4_scuba_gear:helmet_armor", + "id": "minecraft:armor.helmet", "slot": "head", - "amount": 2, + "amount": 3, "operation": "add_value" }, { - "type": "minecraft:attack_speed", - "id": "gm4_scuba_gear:helmet_attack_speed", + "type": "minecraft:submerged_mining_speed", + "id": "gm4_scuba_gear:scuba_helmet/submerged_mining_speed", "slot": "head", - "amount": -0.5, - "operation": "add_value" + "amount": 5, + "operation": "add_multiplied_total" } ], - "minecraft:custom_model_data": "item/scuba_helmet", - "minecraft:profile": "$scuba_helmet" - } - }, - { - "function": "minecraft:set_custom_data", - "tag": "{gm4_scuba_gear:{item:'helmet'}}" - }, - { - "function": "minecraft:set_name", - "name": { - "translate": "item.gm4.scuba_helmet", - "fallback": "SCUBA Helmet", - "italic": false, - "color": "white" + "minecraft:custom_data": { + "gm4_scuba_gear": { + "item": "helmet" + } + }, + "!minecraft:enchantable": {}, + "minecraft:equippable": { + "slot": "head", + "asset_id": "gm4_scuba_gear:scuba", + "camera_overlay": "gm4_scuba_gear:misc/scuba_helmet" + }, + "minecraft:max_damage": 132, + "minecraft:max_stack_size": 1, + "minecraft:item_model": "gm4_scuba_gear:scuba_helmet", + "minecraft:profile": "$scuba_helmet", + "minecraft:rarity": "common" } } ] diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/scuba_tank.json b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/scuba_tank.json index 91b00dc533..e6bd917623 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/scuba_tank.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/scuba_tank.json @@ -5,40 +5,49 @@ "entries": [ { "type": "minecraft:item", - "name": "minecraft:golden_chestplate", + "name": "minecraft:leather_chestplate", "functions": [ { "function": "minecraft:set_components", "components": { + "minecraft:item_name": { + "translate": "item.gm4.scuba_tank", + "fallback": "SCUBA Tank", + "italic": false + }, "minecraft:attribute_modifiers": [ - { - "type": "minecraft:movement_speed", - "id": "gm4_scuba_gear:tank_movement_speed", - "slot": "chest", - "amount": -0.1, - "operation": "add_multiplied_base" - }, { "type": "minecraft:armor", "slot": "chest", "id": "gm4_scuba_gear:tank_armor", "amount": 4, "operation": "add_value" + }, + { + "type": "minecraft:oxygen_bonus", + "id": "gm4_scuba_gear:tank/oxygen_bonus", + "amount": 16, + "operation": "add_value", + "slot": "chest" } ], - "minecraft:custom_model_data": "item/scuba_tank" - } - }, - { - "function": "minecraft:set_custom_data", - "tag": "{gm4_scuba_gear:{item:'tank'}}" - }, - { - "function": "minecraft:set_name", - "name": { - "translate": "item.gm4.scuba_tank", - "fallback": "SCUBA Tank", - "italic": false + "minecraft:custom_data": { + "gm4_scuba_gear": { + "item": "tank" + } + }, + "minecraft:item_model": "gm4_scuba_gear:scuba_tank", + "!minecraft:enchantable": {}, + "minecraft:equippable": { + "slot": "chest", + "asset_id": "gm4_scuba_gear:scuba" + }, + "minecraft:max_damage": 192, + "minecraft:tooltip_display": { + "hidden_components": [ + "minecraft:dyed_color" + ] + } } } ] diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/wetsuit.json b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/wetsuit.json new file mode 100644 index 0000000000..7768e605b5 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/loot_table/items/wetsuit.json @@ -0,0 +1,68 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "minecraft:leather_leggings", + "functions": [ + { + "function": "minecraft:set_components", + "components": { + "minecraft:item_name": { + "translate": "item.gm4.wetsuit", + "fallback": "Wetsuit", + "color": "white", + "italic": false + }, + "minecraft:custom_data": { + "gm4_scuba_gear": { + "item": "wetsuit" + } + }, + "minecraft:item_model": "gm4_scuba_gear:wetsuit", + "minecraft:enchantments": { + "gm4_scuba_gear:wetsuit": 1 + }, + "minecraft:enchantment_glint_override": false, + "minecraft:max_damage": 180, + "!minecraft:enchantable": {}, + "minecraft:equippable": { + "slot": "legs", + "asset_id": "gm4_scuba_gear:scuba" + }, + "minecraft:lore": [ + { + "translate": "item.modifiers.gm4.scuba_gear.in_water", + "fallback": "When in Water:", + "color": "gray", + "italic": false + }, + { + "translate": "item.modifiers.gm4.scuba_gear.neutral_buoyancy", + "fallback": "Neutral Buoyancy", + "color": "blue", + "italic": false + }, + { + "translate": "attribute.modifier.plus.1", + "with": [ + "20", + { + "translate": "item.modifiers.gm4.scuba_gear.vertical_swimming_speed", + "fallback": "Vertical Swimming Speed" + } + ], + "color": "blue", + "italic": false + } + ] + } + } + ] + } + ] + } + ] +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/predicate/all_gear_equipped.json b/gm4_scuba_gear/data/gm4_scuba_gear/predicate/all_gear_equipped.json index f1bc0a3403..d5cb801507 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/predicate/all_gear_equipped.json +++ b/gm4_scuba_gear/data/gm4_scuba_gear/predicate/all_gear_equipped.json @@ -13,12 +13,20 @@ }, "chest": { "items": [ - "minecraft:golden_chestplate" + "minecraft:leather_chestplate" ], "predicates": { "minecraft:custom_data": "{gm4_scuba_gear:{item:\"tank\"}}" } }, + "legs": { + "items": [ + "minecraft:leather_chestplate" + ], + "predicates": { + "minecraft:custom_data": "{gm4_scuba_gear:{item:\"wetsuit\"}}" + } + }, "feet": { "items": [ "minecraft:leather_boots" diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/predicate/in_deep_water.json b/gm4_scuba_gear/data/gm4_scuba_gear/predicate/in_deep_water.json new file mode 100644 index 0000000000..9706b30cb9 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/predicate/in_deep_water.json @@ -0,0 +1,47 @@ +[ + { + "condition": "minecraft:location_check", + "offsetY": 0, + "predicate": { + "fluid": { + "fluids": "#minecraft:water" + } + } + }, + { + "condition": "minecraft:location_check", + "offsetY": 1, + "predicate": { + "fluid": { + "fluids": "#minecraft:water" + } + } + }, + { + "condition": "minecraft:location_check", + "offsetY": 2, + "predicate": { + "fluid": { + "fluids": "#minecraft:water" + } + } + }, + { + "condition": "minecraft:location_check", + "offsetY": 3, + "predicate": { + "fluid": { + "fluids": "#minecraft:water" + } + } + }, + { + "condition": "minecraft:location_check", + "offsetY": 4, + "predicate": { + "fluid": { + "fluids": "#minecraft:water" + } + } + } +] diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/predicate/scuba_gear_equipped.json b/gm4_scuba_gear/data/gm4_scuba_gear/predicate/scuba_gear_equipped.json deleted file mode 100644 index 2c03fce34f..0000000000 --- a/gm4_scuba_gear/data/gm4_scuba_gear/predicate/scuba_gear_equipped.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "condition": "minecraft:any_of", - "terms": [ - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "equipment": { - "head": { - "items": [ - "minecraft:player_head" - ], - "predicates": { - "minecraft:custom_data": "{gm4_scuba_gear:{item:\"helmet\"}}" - } - } - } - } - }, - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "equipment": { - "chest": { - "items": [ - "minecraft:golden_chestplate" - ], - "predicates": { - "minecraft:custom_data": "{gm4_scuba_gear:{item:\"tank\"}}" - } - } - } - } - }, - { - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "equipment": { - "feet": { - "items": [ - "minecraft:leather_boots" - ], - "predicates": { - "minecraft:custom_data": "{gm4_scuba_gear:{item:\"flippers\"}}" - } - } - } - } - } - ] -} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/predicate/tank_equipped.json b/gm4_scuba_gear/data/gm4_scuba_gear/predicate/tank_equipped.json deleted file mode 100644 index dd9fa94cf8..0000000000 --- a/gm4_scuba_gear/data/gm4_scuba_gear/predicate/tank_equipped.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "condition": "minecraft:entity_properties", - "entity": "this", - "predicate": { - "equipment": { - "head": { - "items": [ - "minecraft:player_head" - ], - "predicates": { - "minecraft:custom_data": "{gm4_scuba_gear:{item:\"helmet\"}}" - } - }, - "chest": { - "items": [ - "minecraft:golden_chestplate" - ], - "predicates": { - "minecraft:custom_data": "{gm4_scuba_gear:{item:\"tank\"}}" - } - } - } - } -} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/recipe/flippers.json b/gm4_scuba_gear/data/gm4_scuba_gear/recipe/flippers.json new file mode 100644 index 0000000000..ec95bac195 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/recipe/flippers.json @@ -0,0 +1,86 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "C C", + "K K" + ], + "key": { + "C": [ + "minecraft:copper_ingot" + ], + "K": [ + "minecraft:dried_kelp" + ] + }, + "result": { + "id": "minecraft:leather_boots", + "components": { + "minecraft:item_name": { + "translate": "item.gm4.flippers", + "fallback": "Flippers", + "color": "white", + "italic": false + }, + "minecraft:attribute_modifiers": [ + { + "type": "minecraft:armor", + "id": "minecraft:generic.armor", + "amount": 1, + "operation": "add_value", + "slot": "feet" + }, + { + "type": "minecraft:water_movement_efficiency", + "id": "gm4_scuba_gear:flippers/water_movement_efficiency", + "amount": 1, + "operation": "add_value", + "slot": "feet" + } + ], + "minecraft:item_model": "gm4_scuba_gear:flippers", + "minecraft:custom_data": { + "gm4_scuba_gear": { + "item": "flippers" + } + }, + "minecraft:dyed_color": 2367281, + "!minecraft:enchantable": {}, + "minecraft:enchantments": { + "gm4_scuba_gear:flippers": 1 + }, + "minecraft:enchantment_glint_override": false, + "minecraft:equippable": { + "slot": "feet", + "asset_id": "gm4_scuba_gear:scuba" + }, + "minecraft:max_damage": 156, + "minecraft:tooltip_display": { + "hidden_components": [ + "minecraft:dyed_color" + ] + }, + "minecraft:lore": [ + { + "translate": "item.modifiers.gm4.scuba_gear.on_land", + "fallback": "When on Land:", + "color": "gray", + "italic": false + }, + { + "translate": "attribute.modifier.take.1", + "with": [ + "25", + { + "translate": "attribute.name.generic.movement_speed", + "fallback": "Speed" + } + ], + "color": "red", + "italic": false + } + ] + }, + "count": 1 + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/recipe/scuba_helmet.json b/gm4_scuba_gear/data/gm4_scuba_gear/recipe/scuba_helmet.json new file mode 100644 index 0000000000..3b99118074 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/recipe/scuba_helmet.json @@ -0,0 +1,60 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "CCC", + "CGC" + ], + "key": { + "C": [ + "minecraft:copper_ingot" + ], + "G": [ + "minecraft:glass" + ] + }, + "result": { + "id": "minecraft:leather_helmet", + "components": { + "minecraft:item_name": { + "translate": "item.gm4.scuba_helmet", + "fallback": "SCUBA Helmet", + "color": "white", + "italic": false + }, + "minecraft:attribute_modifiers": [ + { + "type": "minecraft:armor", + "id": "minecraft:armor.helmet", + "amount": 3, + "operation": "add_value", + "slot": "head" + }, + { + "type": "minecraft:submerged_mining_speed", + "id": "gm4_scuba_gear:scuba_helmet/submerged_mining_speed", + "amount": 5, + "operation": "add_multiplied_total", + "slot": "head" + } + ], + "minecraft:custom_data": { + "gm4_scuba_gear": { + "item": "helmet" + } + }, + "minecraft:item_model": "gm4_scuba_gear:scuba_helmet", + "!minecraft:enchantable": {}, + "minecraft:equippable": { + "slot": "head", + "asset_id": "gm4_scuba_gear:scuba", + "camera_overlay": "gm4_scuba_gear:misc/scuba_helmet" + }, + "minecraft:max_damage": 132, + "minecraft:max_stack_size": 1, + "minecraft:profile": "$scuba_helmet", + "minecraft:rarity": "common" + }, + "count": 1 + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/recipe/scuba_tank.json b/gm4_scuba_gear/data/gm4_scuba_gear/recipe/scuba_tank.json new file mode 100644 index 0000000000..a15334efdb --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/recipe/scuba_tank.json @@ -0,0 +1,62 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "C C", + "PCP", + "CCC" + ], + "key": { + "C": [ + "minecraft:copper_ingot" + ], + "P": [ + "minecraft:decorated_pot" + ] + }, + "result": { + "id": "minecraft:leather_chestplate", + "components": { + "minecraft:item_name": { + "translate": "item.gm4.scuba_tank", + "fallback": "SCUBA Tank", + "color": "white", + "italic": false + }, + "minecraft:attribute_modifiers": [ + { + "type": "minecraft:armor", + "id": "gm4_scuba_gear:tank/armor", + "amount": 4, + "operation": "add_value", + "slot": "chest" + }, + { + "type": "minecraft:oxygen_bonus", + "id": "gm4_scuba_gear:tank/oxygen_bonus", + "amount": 16, + "operation": "add_value", + "slot": "chest" + } + ], + "minecraft:custom_data": { + "gm4_scuba_gear": { + "item": "tank" + } + }, + "minecraft:item_model": "gm4_scuba_gear:scuba_tank", + "!minecraft:enchantable": {}, + "minecraft:equippable": { + "slot": "chest", + "asset_id": "gm4_scuba_gear:scuba" + }, + "minecraft:max_damage": 192, + "minecraft:tooltip_display": { + "hidden_components": [ + "minecraft:dyed_color" + ] + } + }, + "count": 1 + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/recipe/wetsuit.json b/gm4_scuba_gear/data/gm4_scuba_gear/recipe/wetsuit.json new file mode 100644 index 0000000000..4871f18ed3 --- /dev/null +++ b/gm4_scuba_gear/data/gm4_scuba_gear/recipe/wetsuit.json @@ -0,0 +1,78 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "KCK", + "K K", + "K K" + ], + "key": { + "C": [ + "minecraft:copper_ingot" + ], + "K": [ + "minecraft:dried_kelp" + ] + }, + "result": { + "id": "minecraft:leather_leggings", + "components": { + "minecraft:item_name": { + "translate": "item.gm4.wetsuit", + "fallback": "Wetsuit", + "color": "white", + "italic": false + }, + "minecraft:max_damage": 180, + "!minecraft:enchantable": {}, + "minecraft:dyed_color": 2367281, + "minecraft:custom_data": { + "gm4_scuba_gear": { + "item": "wetsuit" + } + }, + "minecraft:item_model": "gm4_scuba_gear:wetsuit", + "minecraft:enchantments": { + "gm4_scuba_gear:wetsuit": 1 + }, + "minecraft:enchantment_glint_override": false, + "minecraft:equippable": { + "slot": "legs", + "asset_id": "gm4_scuba_gear:scuba" + }, + "minecraft:rarity": "common", + "minecraft:tooltip_display": { + "hidden_components": [ + "minecraft:dyed_color" + ] + }, + "minecraft:lore": [ + { + "translate": "item.modifiers.gm4.scuba_gear.in_water", + "fallback": "When in Water:", + "color": "gray", + "italic": false + }, + { + "translate": "item.modifiers.gm4.scuba_gear.neutral_buoyancy", + "fallback": "Neutral Buoyancy", + "color": "blue", + "italic": false + }, + { + "translate": "attribute.modifier.plus.1", + "with": [ + "20", + { + "translate": "item.modifiers.gm4.scuba_gear.vertical_swimming_speed", + "fallback": "Vertical Swimming Speed" + } + ], + "color": "blue", + "italic": false + } + ] + }, + "count": 1 + } +} diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/skins/scuba_helmet.png b/gm4_scuba_gear/data/gm4_scuba_gear/skins/scuba_helmet.png index 68991f14ba..cfa199451a 100644 Binary files a/gm4_scuba_gear/data/gm4_scuba_gear/skins/scuba_helmet.png and b/gm4_scuba_gear/data/gm4_scuba_gear/skins/scuba_helmet.png differ diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/test/craft_flippers.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/test/craft_flippers.mcfunction index dfd10f20c0..6728c57919 100644 --- a/gm4_scuba_gear/data/gm4_scuba_gear/test/craft_flippers.mcfunction +++ b/gm4_scuba_gear/data/gm4_scuba_gear/test/craft_flippers.mcfunction @@ -1,10 +1,8 @@ # @template gm4_custom_crafters:test_platform -item replace block ~1 ~1 ~1 container.0 with turtle_scute -item replace block ~1 ~1 ~1 container.2 with turtle_scute -item replace block ~1 ~1 ~1 container.3 with rabbit_hide -item replace block ~1 ~1 ~1 container.5 with rabbit_hide -item replace block ~1 ~1 ~1 container.6 with rabbit_hide -item replace block ~1 ~1 ~1 container.8 with rabbit_hide +item replace block ~1 ~1 ~1 container.3 with copper_ingot +item replace block ~1 ~1 ~1 container.5 with copper_ingot +item replace block ~1 ~1 ~1 container.6 with dried_kelp +item replace block ~1 ~1 ~1 container.8 with dried_kelp await items block ~1 ~1 ~1 container.* minecraft:leather_boots[custom_data~{gm4_scuba_gear:{item:"flippers"}}] diff --git a/gm4_scuba_gear/data/gm4_scuba_gear/test/use_helmet_and_tank.mcfunction b/gm4_scuba_gear/data/gm4_scuba_gear/test/use_helmet_and_tank.mcfunction deleted file mode 100644 index 548b8e17a8..0000000000 --- a/gm4_scuba_gear/data/gm4_scuba_gear/test/use_helmet_and_tank.mcfunction +++ /dev/null @@ -1,30 +0,0 @@ -# @template gm4:test_tube -# @dummy ~1.5 ~1 ~1.5 - -setblock ~1 ~1 ~1 water -setblock ~1 ~2 ~1 water -loot replace entity @s armor.head loot gm4_scuba_gear:items/scuba_helmet -loot replace entity @s armor.chest loot gm4_scuba_gear:items/scuba_tank - -await entity @s[nbt={active_effects:[{id:"minecraft:conduit_power"}]}] - -# remove tank -item replace entity @s armor.chest with air - -await not entity @s[nbt={active_effects:[{id:"minecraft:conduit_power"}]}] - -# readd tank -loot replace entity @s armor.chest loot gm4_scuba_gear:items/scuba_tank - -await delay 1s - -assert not entity @s[nbt={active_effects:[{id:"minecraft:conduit_power"}]}] - -# refresh air -setblock ~1 ~2 ~1 air - -await delay 1s - -setblock ~1 ~2 ~1 water - -await entity @s[nbt={active_effects:[{id:"minecraft:conduit_power"}]}] diff --git a/gm4_scuba_gear/data/minecraft/tags/enchantment/curse.json b/gm4_scuba_gear/data/minecraft/tags/enchantment/curse.json new file mode 100644 index 0000000000..c60d1bfddf --- /dev/null +++ b/gm4_scuba_gear/data/minecraft/tags/enchantment/curse.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "gm4_scuba_gear:wetsuit", + "gm4_scuba_gear:flippers" + ] +}