diff --git a/common/src/generated/resources/.cache/9dc2e1bbb6dbc88d629e62ed955e4c156b6652a3 b/common/src/generated/resources/.cache/9dc2e1bbb6dbc88d629e62ed955e4c156b6652a3 index 514a4bf3..c5d89458 100644 --- a/common/src/generated/resources/.cache/9dc2e1bbb6dbc88d629e62ed955e4c156b6652a3 +++ b/common/src/generated/resources/.cache/9dc2e1bbb6dbc88d629e62ed955e4c156b6652a3 @@ -1,4 +1,4 @@ -// 1.20.4 2024-01-02T11:01:06.4961003 Tags for minecraft:item mod id toughasnails +// 1.20.4 2024-01-02T07:25:05.8559215 Tags for minecraft:item mod id toughasnails f05342856fe99891fa5e94bbe8db82a4f75ac41e data/toughasnails/tags/items/cooling_armor.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/cooling_consumed_items.json 7c304628a9c17ca3ba6cd13e199fcf73ad9c974f data/toughasnails/tags/items/cooling_held_items.json @@ -7,19 +7,19 @@ eb101cb126ebd917a2c240ff53e1e6e16ba3bf83 data/toughasnails/tags/items/heating_ar 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/heating_consumed_items.json efe9e0caf089100a228c46379f3aa70d7f602ddc data/toughasnails/tags/items/heating_held_items.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/hydration/100_hydration_drinks.json -9c0dc65d9f036f654b10088e08368b1a58a41237 data/toughasnails/tags/items/hydration/10_hydration_drinks.json -80da436d00c60f0926a75bfc6452ef3e03d0e4cf data/toughasnails/tags/items/hydration/20_hydration_drinks.json +67139859406093c4ec7fb2563184a349cd422c65 data/toughasnails/tags/items/hydration/10_hydration_drinks.json +afb65ee4d43ae8f9cb63112f16629e0e59db5e3d data/toughasnails/tags/items/hydration/20_hydration_drinks.json c3717474b5903bcc644087abd9758494594dc09b data/toughasnails/tags/items/hydration/30_hydration_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/hydration/40_hydration_drinks.json -4fa41e9b41dd839136206b5935757ba390f588a8 data/toughasnails/tags/items/hydration/50_hydration_drinks.json +7fd9471261d08e940601fdecd379217eb90622d1 data/toughasnails/tags/items/hydration/50_hydration_drinks.json a485e913b63b0237e95ef2af66ed886ba820154a data/toughasnails/tags/items/hydration/60_hydration_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/hydration/70_hydration_drinks.json d7b753d45aecdc84f69d294a00dc5271088c2abc data/toughasnails/tags/items/hydration/80_hydration_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/hydration/90_hydration_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/poison_chance/100_poison_chance_drinks.json -fc698dddd5a4b2d4d0ef9438b45036416c380b0f data/toughasnails/tags/items/poison_chance/25_poison_chance_drinks.json +f87a1c4dc42b16f1628cfca591895d987e5dc6ca data/toughasnails/tags/items/poison_chance/25_poison_chance_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/poison_chance/50_poison_chance_drinks.json -ab761c277e9e318f660c08eb4da51946e028f083 data/toughasnails/tags/items/poison_chance/75_poison_chance_drinks.json +cc0aa3bf437ed849deda4e4b64aff3665160dae6 data/toughasnails/tags/items/poison_chance/75_poison_chance_drinks.json 0395ed7d6e3d7510a25d2f4ef8b498b0d8c6c9eb data/toughasnails/tags/items/thirst/10_thirst_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/thirst/11_thirst_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/thirst/12_thirst_drinks.json @@ -30,12 +30,12 @@ ab761c277e9e318f660c08eb4da51946e028f083 data/toughasnails/tags/items/poison_cha 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/thirst/17_thirst_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/thirst/18_thirst_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/thirst/19_thirst_drinks.json -ab761c277e9e318f660c08eb4da51946e028f083 data/toughasnails/tags/items/thirst/1_thirst_drinks.json +cc0aa3bf437ed849deda4e4b64aff3665160dae6 data/toughasnails/tags/items/thirst/1_thirst_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/thirst/20_thirst_drinks.json edb5947f84984a39ab47c98c6fb0b3c3a9a8cc39 data/toughasnails/tags/items/thirst/2_thirst_drinks.json -fc698dddd5a4b2d4d0ef9438b45036416c380b0f data/toughasnails/tags/items/thirst/3_thirst_drinks.json +f87a1c4dc42b16f1628cfca591895d987e5dc6ca data/toughasnails/tags/items/thirst/3_thirst_drinks.json 35133e95f1c8fdd7a1c21afcc231fc0bffefb9a8 data/toughasnails/tags/items/thirst/4_thirst_drinks.json -4fa41e9b41dd839136206b5935757ba390f588a8 data/toughasnails/tags/items/thirst/5_thirst_drinks.json +7fd9471261d08e940601fdecd379217eb90622d1 data/toughasnails/tags/items/thirst/5_thirst_drinks.json 24b02d22d0e3e4abbeed0c96fc20b8dc05dc5f6e data/toughasnails/tags/items/thirst/6_thirst_drinks.json a90844d1583073e1a3538fe5afe6e279aa3073b8 data/toughasnails/tags/items/thirst/7_thirst_drinks.json a8d4693f32c2dabe2f0ff10cb6ccae93882c8530 data/toughasnails/tags/items/thirst/8_thirst_drinks.json diff --git a/common/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/common/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e index b53ba22d..c40aacc5 100644 --- a/common/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e +++ b/common/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -1,4 +1,4 @@ -// 1.20.4 2024-01-02T04:23:10.697763 Recipes +// 1.20.4 2024-01-02T07:25:05.8549215 Recipes 09252bd5a872203de304820e8d5c5493afe96cf4 data/toughasnails/advancements/recipes/combat/leaf_boots.json 2da825265e95f5dfc0dd4026e0dafee70c17512c data/toughasnails/advancements/recipes/combat/leaf_chestplate.json 6d96cd4baff66d426c9405852ceed3aa8a3cde8f data/toughasnails/advancements/recipes/combat/leaf_helmet.json @@ -17,27 +17,53 @@ db0a08a7c6ccc69ca4625db57d678ce644fdfe49 data/toughasnails/advancements/recipes/ 1441a8289dbc285c34bf874d6976315fb41001f0 data/toughasnails/advancements/recipes/food/pumpkin_juice.json 1b3828862b65dcfb0a1e6d99070287e896379558 data/toughasnails/advancements/recipes/food/sweet_berry_juice.json 0c2aa5f66f00c9bb358dcfd2b7b1dd149bdec7ad data/toughasnails/advancements/recipes/redstone/temperature_gauge.json -8b0e1899a965cbcf725172709f9f7f7062c43a5c data/toughasnails/advancements/recipes/tools/empty_canteen.json +44869876c5d15da0418d9a179911a93296cb8f8a data/toughasnails/advancements/recipes/tools/empty_copper_canteen.json +72921dc876362e365bcaa765291ec84bf02b6eeb data/toughasnails/advancements/recipes/tools/empty_diamond_canteen.json +710c937eb23f7b4dcbc915d904fc6a9cb9ca52e1 data/toughasnails/advancements/recipes/tools/empty_gold_canteen.json +c49718f4f3b3c8a7f432c1bd4fa107df604a47f2 data/toughasnails/advancements/recipes/tools/empty_iron_canteen.json +42091e54a271bc4e256aca31c6c0f5f179bd7ecd data/toughasnails/advancements/recipes/tools/empty_leather_canteen.json +2807acbbeb51586ea606fe256b07cf3dfebef97c data/toughasnails/advancements/recipes/tools/empty_netherite_canteen_smithing.json +eb6859b0a41b94e3003405965dadf8f49b465ce0 data/toughasnails/advancements/recipes/tools/netherite_dirty_water_canteen_smithing.json +2ae629d1e33be1d1c4e0b2796298afa806d9246c data/toughasnails/advancements/recipes/tools/netherite_purified_water_canteen_smithing.json +98ac50cc499f0c47fdfdfb9b307120626116a6bb data/toughasnails/advancements/recipes/tools/netherite_water_canteen_smithing.json 9ce52988e0ffa4ebd960125423c6dc331a72aadd data/toughasnails/advancements/recipes/tools/thermometer.json 715184d6dfbadc65234a787d2e8271dce076e7b1 data/toughasnails/recipes/apple_juice.json 7aefc36c9cb1e7393660e57c9bfe2f47e9c472b9 data/toughasnails/recipes/cactus_juice.json c03137fedf80a5cea96fa69ecc23ddcc733b02bf data/toughasnails/recipes/chorus_fruit_juice.json -4d4f65571791ddb5a8ec9f7c271eaf51cf0df667 data/toughasnails/recipes/empty_canteen.json +621a931c624e91f393ca22939253186876e40873 data/toughasnails/recipes/copper_purified_water_canteen.json +96da20c9eb64283df7947e6272c2286d8b8f2af7 data/toughasnails/recipes/copper_water_canteen.json +0f57768f3726aecdb416ccd231a8603dfb52ede3 data/toughasnails/recipes/diamond_purified_water_canteen.json +af7978ffe03960df8f3f685e994be96fcc5009ac data/toughasnails/recipes/diamond_water_canteen.json +69fa128d3bbc0aa152b4c9c248e8ed5d31227e52 data/toughasnails/recipes/empty_copper_canteen.json +eeec0fb0459e002edf6be30744d90f731da6c1aa data/toughasnails/recipes/empty_diamond_canteen.json +fd9753fb1e2dcfee3a36ce1356defc58785f31ee data/toughasnails/recipes/empty_gold_canteen.json +c2f1aadc3c947308ddb2ffa99ff481d3c2702ee3 data/toughasnails/recipes/empty_iron_canteen.json +7be0520988081ed809cf89cf0f9b2c556a020951 data/toughasnails/recipes/empty_leather_canteen.json +6693eef90bf6bdcdfcf4f50e0df05573fd9df858 data/toughasnails/recipes/empty_netherite_canteen_smithing.json af1b982b9d1cc7246035fc73abfd1b34fbb1394d data/toughasnails/recipes/glow_berry_juice.json +20abd8e2a4e8172968eab10fe809720fc0160118 data/toughasnails/recipes/gold_purified_water_canteen.json +a2a23e956fe154b4db870456e6e06b3fb6c0e121 data/toughasnails/recipes/gold_water_canteen.json +11beca7698ade01aa272b18b3314a42e552746b0 data/toughasnails/recipes/iron_purified_water_canteen.json +aa5d7b846a2b506c4d93d2f094834d16d8aeded9 data/toughasnails/recipes/iron_water_canteen.json 6cd4c90a0ccbc67304b76d8fd1890c7559bd3289 data/toughasnails/recipes/leaf_boots.json 0dd60dff91f95a5a821842815b45b8ac48d1d554 data/toughasnails/recipes/leaf_chestplate.json f6b8afa3f1d888f8ae0b390281d275a988a85da5 data/toughasnails/recipes/leaf_helmet.json 124270ddfb0dae3e3c31cdaa521b00047bd8e401 data/toughasnails/recipes/leaf_leggings.json +2b22d9d76f45be7994c9409c236635423ccdf340 data/toughasnails/recipes/leather_purified_water_canteen.json +34ba5d07ce9d0643c108bcf6a6e7d440f672336a data/toughasnails/recipes/leather_water_canteen.json 3832d3998e8c69d60fbd12ae52965337708eddb3 data/toughasnails/recipes/melon_juice.json +9fc8d88fda45a7d46bf4ea80c0f72d88526ce044 data/toughasnails/recipes/netherite_dirty_water_canteen_smithing.json +ad1a5bb6b263d7837b4a30c843cffb7339797487 data/toughasnails/recipes/netherite_purified_water_canteen.json +ce6043b5272c9c6e1dec865399f04e46b038be41 data/toughasnails/recipes/netherite_purified_water_canteen_smithing.json +f67d6861f1202177c42f0d6bf6a1b5b5c54fb59e data/toughasnails/recipes/netherite_water_canteen.json +d15aa59d2053ceaa472b5fad409ca720d37766a5 data/toughasnails/recipes/netherite_water_canteen_smithing.json 23d01cbd22f68c4a24a36a57a11401e9c42d9477 data/toughasnails/recipes/potion.json e4a98b0325be4fb27194eb56a079871cdc8d4114 data/toughasnails/recipes/pumpkin_juice.json 1ed5721002714ae4029126d79a7b73ac58fa755d data/toughasnails/recipes/purified_water_bottle.json -351a2d892d1bc8eaf091aa41c732953c85b661b0 data/toughasnails/recipes/purified_water_canteen.json 454a67d0df9042690154a1b3b372a5fff586b47d data/toughasnails/recipes/rain_collector.json 2512026dc3a027f39db7e77e023a7017de386b9c data/toughasnails/recipes/sweet_berry_juice.json e636bfd4fab8d516083454e872c8115f5c15cf27 data/toughasnails/recipes/temperature_gauge.json b75d1caa0b1dcb9ae14dc02e47bba2a3c4b4a4dc data/toughasnails/recipes/thermometer.json -9e06d792260bac7da2725c0b4ab95e165f6ffbec data/toughasnails/recipes/water_canteen.json 26985bc2361f55479fce0f342c9c2b7573237c7f data/toughasnails/recipes/water_purifier.json 30229579a58927cae7011781b0936f7ca87888a4 data/toughasnails/recipes/wool_boots.json 25ff54ef0230fd94b0f881f7866b571f4729d254 data/toughasnails/recipes/wool_chestplate.json diff --git a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_copper_canteen.json b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_copper_canteen.json new file mode 100644 index 00000000..8467513e --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_copper_canteen.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_copper_ingot": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:copper_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "toughasnails:empty_copper_canteen" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_copper_ingot" + ] + ], + "rewards": { + "recipes": [ + "toughasnails:empty_copper_canteen" + ] + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_diamond_canteen.json b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_diamond_canteen.json new file mode 100644 index 00000000..d11bafe3 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_diamond_canteen.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_diamond": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:diamond" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "toughasnails:empty_diamond_canteen" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_diamond" + ] + ], + "rewards": { + "recipes": [ + "toughasnails:empty_diamond_canteen" + ] + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_gold_canteen.json b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_gold_canteen.json new file mode 100644 index 00000000..a62245d4 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_gold_canteen.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_gold_ingot": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:gold_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "toughasnails:empty_gold_canteen" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_gold_ingot" + ] + ], + "rewards": { + "recipes": [ + "toughasnails:empty_gold_canteen" + ] + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_iron_canteen.json b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_iron_canteen.json new file mode 100644 index 00000000..fe12beb0 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_iron_canteen.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_iron_ingot": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:iron_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "toughasnails:empty_iron_canteen" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_iron_ingot" + ] + ], + "rewards": { + "recipes": [ + "toughasnails:empty_iron_canteen" + ] + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_canteen.json b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_leather_canteen.json similarity index 84% rename from common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_canteen.json rename to common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_leather_canteen.json index c3a5bf3a..64d58f3f 100644 --- a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_canteen.json +++ b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_leather_canteen.json @@ -15,7 +15,7 @@ }, "has_the_recipe": { "conditions": { - "recipe": "toughasnails:empty_canteen" + "recipe": "toughasnails:empty_leather_canteen" }, "trigger": "minecraft:recipe_unlocked" } @@ -28,7 +28,7 @@ ], "rewards": { "recipes": [ - "toughasnails:empty_canteen" + "toughasnails:empty_leather_canteen" ] } } \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_netherite_canteen_smithing.json b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_netherite_canteen_smithing.json new file mode 100644 index 00000000..c14cd342 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/empty_netherite_canteen_smithing.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_netherite_ingot": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:netherite_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "toughasnails:empty_netherite_canteen_smithing" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_netherite_ingot" + ] + ], + "rewards": { + "recipes": [ + "toughasnails:empty_netherite_canteen_smithing" + ] + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/netherite_dirty_water_canteen_smithing.json b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/netherite_dirty_water_canteen_smithing.json new file mode 100644 index 00000000..ab89a8b8 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/netherite_dirty_water_canteen_smithing.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_netherite_ingot": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:netherite_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "toughasnails:netherite_dirty_water_canteen_smithing" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_netherite_ingot" + ] + ], + "rewards": { + "recipes": [ + "toughasnails:netherite_dirty_water_canteen_smithing" + ] + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/netherite_purified_water_canteen_smithing.json b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/netherite_purified_water_canteen_smithing.json new file mode 100644 index 00000000..6ce514cd --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/netherite_purified_water_canteen_smithing.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_netherite_ingot": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:netherite_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "toughasnails:netherite_purified_water_canteen_smithing" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_netherite_ingot" + ] + ], + "rewards": { + "recipes": [ + "toughasnails:netherite_purified_water_canteen_smithing" + ] + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/netherite_water_canteen_smithing.json b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/netherite_water_canteen_smithing.json new file mode 100644 index 00000000..0986d2d6 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/advancements/recipes/tools/netherite_water_canteen_smithing.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_netherite_ingot": { + "conditions": { + "items": [ + { + "items": [ + "minecraft:netherite_ingot" + ] + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "toughasnails:netherite_water_canteen_smithing" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_netherite_ingot" + ] + ], + "rewards": { + "recipes": [ + "toughasnails:netherite_water_canteen_smithing" + ] + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/copper_purified_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/copper_purified_water_canteen.json new file mode 100644 index 00000000..9df77c55 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/copper_purified_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:copper_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 200, + "result": { + "Count": 1, + "id": "toughasnails:copper_purified_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/copper_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/copper_water_canteen.json new file mode 100644 index 00000000..a9f000af --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/copper_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:copper_dirty_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 400, + "result": { + "Count": 1, + "id": "toughasnails:copper_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/diamond_purified_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/diamond_purified_water_canteen.json new file mode 100644 index 00000000..5e735834 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/diamond_purified_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:diamond_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 200, + "result": { + "Count": 1, + "id": "toughasnails:diamond_purified_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/diamond_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/diamond_water_canteen.json new file mode 100644 index 00000000..94ef6bde --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/diamond_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:diamond_dirty_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 400, + "result": { + "Count": 1, + "id": "toughasnails:diamond_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/empty_copper_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/empty_copper_canteen.json new file mode 100644 index 00000000..a6181aa0 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/empty_copper_canteen.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "#": { + "item": "minecraft:copper_ingot" + } + }, + "pattern": [ + " # ", + "# #", + " # " + ], + "result": { + "item": "toughasnails:empty_copper_canteen" + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/empty_diamond_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/empty_diamond_canteen.json new file mode 100644 index 00000000..54c3ffa5 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/empty_diamond_canteen.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "#": { + "item": "minecraft:diamond" + } + }, + "pattern": [ + " # ", + "# #", + " # " + ], + "result": { + "item": "toughasnails:empty_diamond_canteen" + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/empty_gold_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/empty_gold_canteen.json new file mode 100644 index 00000000..bc81b0f6 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/empty_gold_canteen.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "#": { + "item": "minecraft:gold_ingot" + } + }, + "pattern": [ + " # ", + "# #", + " # " + ], + "result": { + "item": "toughasnails:empty_gold_canteen" + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/empty_iron_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/empty_iron_canteen.json new file mode 100644 index 00000000..f7bc3ee6 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/empty_iron_canteen.json @@ -0,0 +1,17 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "#": { + "item": "minecraft:iron_ingot" + } + }, + "pattern": [ + " # ", + "# #", + " # " + ], + "result": { + "item": "toughasnails:empty_iron_canteen" + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/empty_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/empty_leather_canteen.json similarity index 80% rename from common/src/generated/resources/data/toughasnails/recipes/empty_canteen.json rename to common/src/generated/resources/data/toughasnails/recipes/empty_leather_canteen.json index 7f558b1e..5fb2a5c0 100644 --- a/common/src/generated/resources/data/toughasnails/recipes/empty_canteen.json +++ b/common/src/generated/resources/data/toughasnails/recipes/empty_leather_canteen.json @@ -12,6 +12,6 @@ " # " ], "result": { - "item": "toughasnails:empty_canteen" + "item": "toughasnails:empty_leather_canteen" } } \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/empty_netherite_canteen_smithing.json b/common/src/generated/resources/data/toughasnails/recipes/empty_netherite_canteen_smithing.json new file mode 100644 index 00000000..096be2f6 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/empty_netherite_canteen_smithing.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:smithing_transform", + "addition": { + "item": "minecraft:netherite_ingot" + }, + "base": { + "item": "toughasnails:empty_diamond_canteen" + }, + "result": { + "item": "toughasnails:empty_netherite_canteen" + }, + "template": { + "item": "minecraft:netherite_upgrade_smithing_template" + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/purified_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/gold_purified_water_canteen.json similarity index 67% rename from common/src/generated/resources/data/toughasnails/recipes/purified_water_canteen.json rename to common/src/generated/resources/data/toughasnails/recipes/gold_purified_water_canteen.json index a7c5bc6e..8fa127fe 100644 --- a/common/src/generated/resources/data/toughasnails/recipes/purified_water_canteen.json +++ b/common/src/generated/resources/data/toughasnails/recipes/gold_purified_water_canteen.json @@ -2,7 +2,7 @@ "type": "toughasnails:water_purifying", "input": { "Count": 1, - "id": "toughasnails:water_canteen", + "id": "toughasnails:gold_water_canteen", "tag": { "Damage": 0 } @@ -10,7 +10,7 @@ "purifytime": 200, "result": { "Count": 1, - "id": "toughasnails:purified_water_canteen", + "id": "toughasnails:gold_purified_water_canteen", "tag": { "Damage": 0 } diff --git a/common/src/generated/resources/data/toughasnails/recipes/water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/gold_water_canteen.json similarity index 68% rename from common/src/generated/resources/data/toughasnails/recipes/water_canteen.json rename to common/src/generated/resources/data/toughasnails/recipes/gold_water_canteen.json index fb8ec135..7016299b 100644 --- a/common/src/generated/resources/data/toughasnails/recipes/water_canteen.json +++ b/common/src/generated/resources/data/toughasnails/recipes/gold_water_canteen.json @@ -2,7 +2,7 @@ "type": "toughasnails:water_purifying", "input": { "Count": 1, - "id": "toughasnails:dirty_water_canteen", + "id": "toughasnails:gold_dirty_water_canteen", "tag": { "Damage": 0 } @@ -10,7 +10,7 @@ "purifytime": 400, "result": { "Count": 1, - "id": "toughasnails:water_canteen", + "id": "toughasnails:gold_water_canteen", "tag": { "Damage": 0 } diff --git a/common/src/generated/resources/data/toughasnails/recipes/iron_purified_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/iron_purified_water_canteen.json new file mode 100644 index 00000000..0fedeb55 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/iron_purified_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:iron_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 200, + "result": { + "Count": 1, + "id": "toughasnails:iron_purified_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/iron_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/iron_water_canteen.json new file mode 100644 index 00000000..04e9a28c --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/iron_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:iron_dirty_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 400, + "result": { + "Count": 1, + "id": "toughasnails:iron_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/leather_purified_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/leather_purified_water_canteen.json new file mode 100644 index 00000000..09e381a5 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/leather_purified_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:leather_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 200, + "result": { + "Count": 1, + "id": "toughasnails:leather_purified_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/leather_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/leather_water_canteen.json new file mode 100644 index 00000000..1057b4e6 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/leather_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:leather_dirty_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 400, + "result": { + "Count": 1, + "id": "toughasnails:leather_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/netherite_dirty_water_canteen_smithing.json b/common/src/generated/resources/data/toughasnails/recipes/netherite_dirty_water_canteen_smithing.json new file mode 100644 index 00000000..f528d3ec --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/netherite_dirty_water_canteen_smithing.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:smithing_transform", + "addition": { + "item": "minecraft:netherite_ingot" + }, + "base": { + "item": "toughasnails:diamond_dirty_water_canteen" + }, + "result": { + "item": "toughasnails:netherite_dirty_water_canteen" + }, + "template": { + "item": "minecraft:netherite_upgrade_smithing_template" + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/netherite_purified_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/netherite_purified_water_canteen.json new file mode 100644 index 00000000..f4322111 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/netherite_purified_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:netherite_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 200, + "result": { + "Count": 1, + "id": "toughasnails:netherite_purified_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/netherite_purified_water_canteen_smithing.json b/common/src/generated/resources/data/toughasnails/recipes/netherite_purified_water_canteen_smithing.json new file mode 100644 index 00000000..c89000a5 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/netherite_purified_water_canteen_smithing.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:smithing_transform", + "addition": { + "item": "minecraft:netherite_ingot" + }, + "base": { + "item": "toughasnails:diamond_purified_water_canteen" + }, + "result": { + "item": "toughasnails:netherite_purified_water_canteen" + }, + "template": { + "item": "minecraft:netherite_upgrade_smithing_template" + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/netherite_water_canteen.json b/common/src/generated/resources/data/toughasnails/recipes/netherite_water_canteen.json new file mode 100644 index 00000000..77293010 --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/netherite_water_canteen.json @@ -0,0 +1,18 @@ +{ + "type": "toughasnails:water_purifying", + "input": { + "Count": 1, + "id": "toughasnails:netherite_dirty_water_canteen", + "tag": { + "Damage": 0 + } + }, + "purifytime": 400, + "result": { + "Count": 1, + "id": "toughasnails:netherite_water_canteen", + "tag": { + "Damage": 0 + } + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/recipes/netherite_water_canteen_smithing.json b/common/src/generated/resources/data/toughasnails/recipes/netherite_water_canteen_smithing.json new file mode 100644 index 00000000..a9b8f01f --- /dev/null +++ b/common/src/generated/resources/data/toughasnails/recipes/netherite_water_canteen_smithing.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:smithing_transform", + "addition": { + "item": "minecraft:netherite_ingot" + }, + "base": { + "item": "toughasnails:diamond_water_canteen" + }, + "result": { + "item": "toughasnails:netherite_water_canteen" + }, + "template": { + "item": "minecraft:netherite_upgrade_smithing_template" + } +} \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/tags/items/hydration/10_hydration_drinks.json b/common/src/generated/resources/data/toughasnails/tags/items/hydration/10_hydration_drinks.json index c4abd7b2..aa8bb305 100644 --- a/common/src/generated/resources/data/toughasnails/tags/items/hydration/10_hydration_drinks.json +++ b/common/src/generated/resources/data/toughasnails/tags/items/hydration/10_hydration_drinks.json @@ -1,7 +1,12 @@ { "values": [ "toughasnails:dirty_water_bottle", - "toughasnails:dirty_water_canteen", + "toughasnails:leather_dirty_water_canteen", + "toughasnails:copper_dirty_water_canteen", + "toughasnails:iron_dirty_water_canteen", + "toughasnails:gold_dirty_water_canteen", + "toughasnails:diamond_dirty_water_canteen", + "toughasnails:netherite_dirty_water_canteen", "toughasnails:glow_berry_juice", "toughasnails:sweet_berry_juice" ] diff --git a/common/src/generated/resources/data/toughasnails/tags/items/hydration/20_hydration_drinks.json b/common/src/generated/resources/data/toughasnails/tags/items/hydration/20_hydration_drinks.json index 350e0fdb..53c546be 100644 --- a/common/src/generated/resources/data/toughasnails/tags/items/hydration/20_hydration_drinks.json +++ b/common/src/generated/resources/data/toughasnails/tags/items/hydration/20_hydration_drinks.json @@ -1,7 +1,12 @@ { "values": [ "minecraft:potion", - "toughasnails:water_canteen", + "toughasnails:leather_water_canteen", + "toughasnails:copper_water_canteen", + "toughasnails:iron_water_canteen", + "toughasnails:gold_water_canteen", + "toughasnails:diamond_water_canteen", + "toughasnails:netherite_water_canteen", "toughasnails:chorus_fruit_juice" ] } \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/tags/items/hydration/50_hydration_drinks.json b/common/src/generated/resources/data/toughasnails/tags/items/hydration/50_hydration_drinks.json index 28a987be..bd8dcd0d 100644 --- a/common/src/generated/resources/data/toughasnails/tags/items/hydration/50_hydration_drinks.json +++ b/common/src/generated/resources/data/toughasnails/tags/items/hydration/50_hydration_drinks.json @@ -1,6 +1,11 @@ { "values": [ "toughasnails:purified_water_bottle", - "toughasnails:purified_water_canteen" + "toughasnails:leather_purified_water_canteen", + "toughasnails:copper_purified_water_canteen", + "toughasnails:iron_purified_water_canteen", + "toughasnails:gold_purified_water_canteen", + "toughasnails:diamond_purified_water_canteen", + "toughasnails:netherite_purified_water_canteen" ] } \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/tags/items/poison_chance/25_poison_chance_drinks.json b/common/src/generated/resources/data/toughasnails/tags/items/poison_chance/25_poison_chance_drinks.json index 2969560b..dc7a42d5 100644 --- a/common/src/generated/resources/data/toughasnails/tags/items/poison_chance/25_poison_chance_drinks.json +++ b/common/src/generated/resources/data/toughasnails/tags/items/poison_chance/25_poison_chance_drinks.json @@ -1,6 +1,11 @@ { "values": [ "minecraft:potion", - "toughasnails:water_canteen" + "toughasnails:leather_water_canteen", + "toughasnails:copper_water_canteen", + "toughasnails:iron_water_canteen", + "toughasnails:gold_water_canteen", + "toughasnails:diamond_water_canteen", + "toughasnails:netherite_water_canteen" ] } \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/tags/items/poison_chance/75_poison_chance_drinks.json b/common/src/generated/resources/data/toughasnails/tags/items/poison_chance/75_poison_chance_drinks.json index 09a98c04..1fd832cc 100644 --- a/common/src/generated/resources/data/toughasnails/tags/items/poison_chance/75_poison_chance_drinks.json +++ b/common/src/generated/resources/data/toughasnails/tags/items/poison_chance/75_poison_chance_drinks.json @@ -1,6 +1,11 @@ { "values": [ "toughasnails:dirty_water_bottle", - "toughasnails:dirty_water_canteen" + "toughasnails:leather_dirty_water_canteen", + "toughasnails:copper_dirty_water_canteen", + "toughasnails:iron_dirty_water_canteen", + "toughasnails:gold_dirty_water_canteen", + "toughasnails:diamond_dirty_water_canteen", + "toughasnails:netherite_dirty_water_canteen" ] } \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/tags/items/thirst/1_thirst_drinks.json b/common/src/generated/resources/data/toughasnails/tags/items/thirst/1_thirst_drinks.json index 09a98c04..1fd832cc 100644 --- a/common/src/generated/resources/data/toughasnails/tags/items/thirst/1_thirst_drinks.json +++ b/common/src/generated/resources/data/toughasnails/tags/items/thirst/1_thirst_drinks.json @@ -1,6 +1,11 @@ { "values": [ "toughasnails:dirty_water_bottle", - "toughasnails:dirty_water_canteen" + "toughasnails:leather_dirty_water_canteen", + "toughasnails:copper_dirty_water_canteen", + "toughasnails:iron_dirty_water_canteen", + "toughasnails:gold_dirty_water_canteen", + "toughasnails:diamond_dirty_water_canteen", + "toughasnails:netherite_dirty_water_canteen" ] } \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/tags/items/thirst/3_thirst_drinks.json b/common/src/generated/resources/data/toughasnails/tags/items/thirst/3_thirst_drinks.json index 2969560b..dc7a42d5 100644 --- a/common/src/generated/resources/data/toughasnails/tags/items/thirst/3_thirst_drinks.json +++ b/common/src/generated/resources/data/toughasnails/tags/items/thirst/3_thirst_drinks.json @@ -1,6 +1,11 @@ { "values": [ "minecraft:potion", - "toughasnails:water_canteen" + "toughasnails:leather_water_canteen", + "toughasnails:copper_water_canteen", + "toughasnails:iron_water_canteen", + "toughasnails:gold_water_canteen", + "toughasnails:diamond_water_canteen", + "toughasnails:netherite_water_canteen" ] } \ No newline at end of file diff --git a/common/src/generated/resources/data/toughasnails/tags/items/thirst/5_thirst_drinks.json b/common/src/generated/resources/data/toughasnails/tags/items/thirst/5_thirst_drinks.json index 28a987be..bd8dcd0d 100644 --- a/common/src/generated/resources/data/toughasnails/tags/items/thirst/5_thirst_drinks.json +++ b/common/src/generated/resources/data/toughasnails/tags/items/thirst/5_thirst_drinks.json @@ -1,6 +1,11 @@ { "values": [ "toughasnails:purified_water_bottle", - "toughasnails:purified_water_canteen" + "toughasnails:leather_purified_water_canteen", + "toughasnails:copper_purified_water_canteen", + "toughasnails:iron_purified_water_canteen", + "toughasnails:gold_purified_water_canteen", + "toughasnails:diamond_purified_water_canteen", + "toughasnails:netherite_purified_water_canteen" ] } \ No newline at end of file diff --git a/common/src/main/java/toughasnails/api/item/TANItems.java b/common/src/main/java/toughasnails/api/item/TANItems.java index 0abfdaa9..9d7dc4ce 100644 --- a/common/src/main/java/toughasnails/api/item/TANItems.java +++ b/common/src/main/java/toughasnails/api/item/TANItems.java @@ -9,10 +9,35 @@ public class TANItems { - public static Item EMPTY_CANTEEN; - public static Item WATER_CANTEEN; - public static Item DIRTY_WATER_CANTEEN; - public static Item PURIFIED_WATER_CANTEEN; + public static Item EMPTY_LEATHER_CANTEEN; + public static Item LEATHER_DIRTY_WATER_CANTEEN; + public static Item LEATHER_WATER_CANTEEN; + public static Item LEATHER_PURIFIED_WATER_CANTEEN; + + public static Item EMPTY_COPPER_CANTEEN; + public static Item COPPER_DIRTY_WATER_CANTEEN; + public static Item COPPER_WATER_CANTEEN; + public static Item COPPER_PURIFIED_WATER_CANTEEN; + + public static Item EMPTY_IRON_CANTEEN; + public static Item IRON_DIRTY_WATER_CANTEEN; + public static Item IRON_WATER_CANTEEN; + public static Item IRON_PURIFIED_WATER_CANTEEN; + + public static Item EMPTY_GOLD_CANTEEN; + public static Item GOLD_DIRTY_WATER_CANTEEN; + public static Item GOLD_WATER_CANTEEN; + public static Item GOLD_PURIFIED_WATER_CANTEEN; + + public static Item EMPTY_DIAMOND_CANTEEN; + public static Item DIAMOND_DIRTY_WATER_CANTEEN; + public static Item DIAMOND_WATER_CANTEEN; + public static Item DIAMOND_PURIFIED_WATER_CANTEEN; + + public static Item EMPTY_NETHERITE_CANTEEN; + public static Item NETHERITE_DIRTY_WATER_CANTEEN; + public static Item NETHERITE_WATER_CANTEEN; + public static Item NETHERITE_PURIFIED_WATER_CANTEEN; public static Item DIRTY_WATER_BOTTLE; public static Item PURIFIED_WATER_BOTTLE; diff --git a/common/src/main/java/toughasnails/init/ModItems.java b/common/src/main/java/toughasnails/init/ModItems.java index 43fa74ab..6ed1d51e 100644 --- a/common/src/main/java/toughasnails/init/ModItems.java +++ b/common/src/main/java/toughasnails/init/ModItems.java @@ -34,10 +34,36 @@ public class ModItems { public static void registerItems(BiConsumer func) { - TANItems.EMPTY_CANTEEN = register(func, "empty_canteen", new EmptyCanteenItem((new Item.Properties()).stacksTo(1))); - TANItems.DIRTY_WATER_CANTEEN = register(func, "dirty_water_canteen", new FilledCanteenItem((new Item.Properties()).durability(5))); - TANItems.WATER_CANTEEN = register(func, "water_canteen", new FilledCanteenItem((new Item.Properties()).durability(5))); - TANItems.PURIFIED_WATER_CANTEEN = register(func, "purified_water_canteen", new FilledCanteenItem((new Item.Properties()).durability(5))); + TANItems.EMPTY_LEATHER_CANTEEN = register(func, "empty_leather_canteen", new EmptyLeatherCanteenItem((new Item.Properties()).stacksTo(1))); + TANItems.LEATHER_DIRTY_WATER_CANTEEN = register(func, "leather_dirty_water_canteen", new FilledLeatherCanteenItem((new Item.Properties()).durability(5))); + TANItems.LEATHER_WATER_CANTEEN = register(func, "leather_water_canteen", new FilledLeatherCanteenItem((new Item.Properties()).durability(5))); + TANItems.LEATHER_PURIFIED_WATER_CANTEEN = register(func, "leather_purified_water_canteen", new FilledLeatherCanteenItem((new Item.Properties()).durability(5))); + + TANItems.EMPTY_COPPER_CANTEEN = register(func, "empty_copper_canteen", new EmptyCopperCanteenItem((new Item.Properties()).stacksTo(1))); + TANItems.COPPER_DIRTY_WATER_CANTEEN = register(func, "copper_dirty_water_canteen", new FilledCopperCanteenItem((new Item.Properties()).durability(6))); + TANItems.COPPER_WATER_CANTEEN = register(func, "copper_water_canteen", new FilledCopperCanteenItem((new Item.Properties()).durability(6))); + TANItems.COPPER_PURIFIED_WATER_CANTEEN = register(func, "copper_purified_water_canteen", new FilledCopperCanteenItem((new Item.Properties()).durability(6))); + + TANItems.EMPTY_IRON_CANTEEN = register(func, "empty_iron_canteen", new EmptyIronCanteenItem((new Item.Properties()).stacksTo(1))); + TANItems.IRON_DIRTY_WATER_CANTEEN = register(func, "iron_dirty_water_canteen", new FilledIronCanteenItem((new Item.Properties()).durability(7))); + TANItems.IRON_WATER_CANTEEN = register(func, "iron_water_canteen", new FilledIronCanteenItem((new Item.Properties()).durability(7))); + TANItems.IRON_PURIFIED_WATER_CANTEEN = register(func, "iron_purified_water_canteen", new FilledIronCanteenItem((new Item.Properties()).durability(7))); + + TANItems.EMPTY_GOLD_CANTEEN = register(func, "empty_gold_canteen", new EmptyGoldCanteenItem((new Item.Properties()).stacksTo(1))); + TANItems.GOLD_DIRTY_WATER_CANTEEN = register(func, "gold_dirty_water_canteen", new FilledGoldCanteenItem((new Item.Properties()).durability(10))); + TANItems.GOLD_WATER_CANTEEN = register(func, "gold_water_canteen", new FilledGoldCanteenItem((new Item.Properties()).durability(10))); + TANItems.GOLD_PURIFIED_WATER_CANTEEN = register(func, "gold_purified_water_canteen", new FilledGoldCanteenItem((new Item.Properties()).durability(10))); + + TANItems.EMPTY_DIAMOND_CANTEEN = register(func, "empty_diamond_canteen", new EmptyDiamondCanteenItem((new Item.Properties()).stacksTo(1))); + TANItems.DIAMOND_DIRTY_WATER_CANTEEN = register(func, "diamond_dirty_water_canteen", new FilledDiamondCanteenItem((new Item.Properties()).durability(15))); + TANItems.DIAMOND_WATER_CANTEEN = register(func, "diamond_water_canteen", new FilledDiamondCanteenItem((new Item.Properties()).durability(15))); + TANItems.DIAMOND_PURIFIED_WATER_CANTEEN = register(func, "diamond_purified_water_canteen", new FilledDiamondCanteenItem((new Item.Properties()).durability(15))); + + TANItems.EMPTY_NETHERITE_CANTEEN = register(func, "empty_netherite_canteen", new EmptyNetheriteCanteenItem((new Item.Properties()).stacksTo(1))); + TANItems.NETHERITE_DIRTY_WATER_CANTEEN = register(func, "netherite_dirty_water_canteen", new FilledNetheriteCanteenItem((new Item.Properties()).durability(25))); + TANItems.NETHERITE_WATER_CANTEEN = register(func, "netherite_water_canteen", new FilledNetheriteCanteenItem((new Item.Properties()).durability(25))); + TANItems.NETHERITE_PURIFIED_WATER_CANTEEN = register(func, "netherite_purified_water_canteen", new FilledNetheriteCanteenItem((new Item.Properties()).durability(25))); + TANItems.DIRTY_WATER_BOTTLE = register(func, "dirty_water_bottle", new DirtyWaterBottleItem((new Item.Properties()).stacksTo(1))); TANItems.PURIFIED_WATER_BOTTLE = register(func, "purified_water_bottle", new PurifiedWaterBottleItem((new Item.Properties()).stacksTo(1))); diff --git a/common/src/main/java/toughasnails/item/EmptyCopperCanteenItem.java b/common/src/main/java/toughasnails/item/EmptyCopperCanteenItem.java new file mode 100644 index 00000000..9ca86d58 --- /dev/null +++ b/common/src/main/java/toughasnails/item/EmptyCopperCanteenItem.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.block.TANBlocks; +import toughasnails.api.item.TANItems; +import toughasnails.block.RainCollectorBlock; +import toughasnails.init.ModTags; + +public class EmptyCopperCanteenItem extends Item +{ + public EmptyCopperCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos)) + { + BlockState state = world.getBlockState(pos); + + if (state.getBlock() instanceof RainCollectorBlock) + { + // Fill the canteen from purified water from a rain collector + int waterLevel = state.getValue(RainCollectorBlock.LEVEL); + + if (waterLevel > 0 && !world.isClientSide()) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + ((RainCollectorBlock) TANBlocks.RAIN_COLLECTOR).setWaterLevel(world, pos, state, waterLevel - 1); + return InteractionResultHolder.success(this.replaceCanteen(stack, player, new ItemStack(TANItems.COPPER_PURIFIED_WATER_CANTEEN))); + } + } + else if (world.getFluidState(pos).is(FluidTags.WATER)) + { + // Fill the canteen with water in the world + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + + Holder biome = player.level().getBiome(player.blockPosition()); + Item canteenItem; + + if (biome.is(ModTags.Biomes.DIRTY_WATER_BIOMES)) + { + canteenItem = TANItems.COPPER_DIRTY_WATER_CANTEEN; + } + else if (biome.is(ModTags.Biomes.PURIFIED_WATER_BIOMES)) + { + canteenItem = TANItems.COPPER_PURIFIED_WATER_CANTEEN; + } + else + { + canteenItem = TANItems.COPPER_WATER_CANTEEN; + } + + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(canteenItem)), world.isClientSide()); + } + } + } + + return InteractionResultHolder.pass(stack); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } +} diff --git a/common/src/main/java/toughasnails/item/EmptyDiamondCanteenItem.java b/common/src/main/java/toughasnails/item/EmptyDiamondCanteenItem.java new file mode 100644 index 00000000..50cf14f0 --- /dev/null +++ b/common/src/main/java/toughasnails/item/EmptyDiamondCanteenItem.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.block.TANBlocks; +import toughasnails.api.item.TANItems; +import toughasnails.block.RainCollectorBlock; +import toughasnails.init.ModTags; + +public class EmptyDiamondCanteenItem extends Item +{ + public EmptyDiamondCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos)) + { + BlockState state = world.getBlockState(pos); + + if (state.getBlock() instanceof RainCollectorBlock) + { + // Fill the canteen from purified water from a rain collector + int waterLevel = state.getValue(RainCollectorBlock.LEVEL); + + if (waterLevel > 0 && !world.isClientSide()) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + ((RainCollectorBlock) TANBlocks.RAIN_COLLECTOR).setWaterLevel(world, pos, state, waterLevel - 1); + return InteractionResultHolder.success(this.replaceCanteen(stack, player, new ItemStack(TANItems.DIAMOND_PURIFIED_WATER_CANTEEN))); + } + } + else if (world.getFluidState(pos).is(FluidTags.WATER)) + { + // Fill the canteen with water in the world + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + + Holder biome = player.level().getBiome(player.blockPosition()); + Item canteenItem; + + if (biome.is(ModTags.Biomes.DIRTY_WATER_BIOMES)) + { + canteenItem = TANItems.DIAMOND_DIRTY_WATER_CANTEEN; + } + else if (biome.is(ModTags.Biomes.PURIFIED_WATER_BIOMES)) + { + canteenItem = TANItems.DIAMOND_PURIFIED_WATER_CANTEEN; + } + else + { + canteenItem = TANItems.DIAMOND_WATER_CANTEEN; + } + + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(canteenItem)), world.isClientSide()); + } + } + } + + return InteractionResultHolder.pass(stack); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } +} diff --git a/common/src/main/java/toughasnails/item/EmptyCanteenItem.java b/common/src/main/java/toughasnails/item/EmptyGoldCanteenItem.java similarity index 90% rename from common/src/main/java/toughasnails/item/EmptyCanteenItem.java rename to common/src/main/java/toughasnails/item/EmptyGoldCanteenItem.java index 25e4c072..b785b560 100644 --- a/common/src/main/java/toughasnails/item/EmptyCanteenItem.java +++ b/common/src/main/java/toughasnails/item/EmptyGoldCanteenItem.java @@ -27,9 +27,9 @@ import toughasnails.block.RainCollectorBlock; import toughasnails.init.ModTags; -public class EmptyCanteenItem extends Item +public class EmptyGoldCanteenItem extends Item { - public EmptyCanteenItem(Properties properties) + public EmptyGoldCanteenItem(Properties properties) { super(properties); } @@ -57,7 +57,7 @@ public InteractionResultHolder use(Level world, Player player, Intera { world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); ((RainCollectorBlock) TANBlocks.RAIN_COLLECTOR).setWaterLevel(world, pos, state, waterLevel - 1); - return InteractionResultHolder.success(this.replaceCanteen(stack, player, new ItemStack(TANItems.PURIFIED_WATER_CANTEEN))); + return InteractionResultHolder.success(this.replaceCanteen(stack, player, new ItemStack(TANItems.GOLD_PURIFIED_WATER_CANTEEN))); } } else if (world.getFluidState(pos).is(FluidTags.WATER)) @@ -70,15 +70,15 @@ else if (world.getFluidState(pos).is(FluidTags.WATER)) if (biome.is(ModTags.Biomes.DIRTY_WATER_BIOMES)) { - canteenItem = TANItems.DIRTY_WATER_CANTEEN; + canteenItem = TANItems.GOLD_DIRTY_WATER_CANTEEN; } else if (biome.is(ModTags.Biomes.PURIFIED_WATER_BIOMES)) { - canteenItem = TANItems.PURIFIED_WATER_CANTEEN; + canteenItem = TANItems.GOLD_PURIFIED_WATER_CANTEEN; } else { - canteenItem = TANItems.WATER_CANTEEN; + canteenItem = TANItems.GOLD_WATER_CANTEEN; } return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(canteenItem)), world.isClientSide()); diff --git a/common/src/main/java/toughasnails/item/EmptyIronCanteenItem.java b/common/src/main/java/toughasnails/item/EmptyIronCanteenItem.java new file mode 100644 index 00000000..bb2c4c03 --- /dev/null +++ b/common/src/main/java/toughasnails/item/EmptyIronCanteenItem.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.block.TANBlocks; +import toughasnails.api.item.TANItems; +import toughasnails.block.RainCollectorBlock; +import toughasnails.init.ModTags; + +public class EmptyIronCanteenItem extends Item +{ + public EmptyIronCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos)) + { + BlockState state = world.getBlockState(pos); + + if (state.getBlock() instanceof RainCollectorBlock) + { + // Fill the canteen from purified water from a rain collector + int waterLevel = state.getValue(RainCollectorBlock.LEVEL); + + if (waterLevel > 0 && !world.isClientSide()) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + ((RainCollectorBlock) TANBlocks.RAIN_COLLECTOR).setWaterLevel(world, pos, state, waterLevel - 1); + return InteractionResultHolder.success(this.replaceCanteen(stack, player, new ItemStack(TANItems.IRON_PURIFIED_WATER_CANTEEN))); + } + } + else if (world.getFluidState(pos).is(FluidTags.WATER)) + { + // Fill the canteen with water in the world + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + + Holder biome = player.level().getBiome(player.blockPosition()); + Item canteenItem; + + if (biome.is(ModTags.Biomes.DIRTY_WATER_BIOMES)) + { + canteenItem = TANItems.IRON_DIRTY_WATER_CANTEEN; + } + else if (biome.is(ModTags.Biomes.PURIFIED_WATER_BIOMES)) + { + canteenItem = TANItems.IRON_PURIFIED_WATER_CANTEEN; + } + else + { + canteenItem = TANItems.IRON_WATER_CANTEEN; + } + + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(canteenItem)), world.isClientSide()); + } + } + } + + return InteractionResultHolder.pass(stack); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } +} diff --git a/common/src/main/java/toughasnails/item/EmptyLeatherCanteenItem.java b/common/src/main/java/toughasnails/item/EmptyLeatherCanteenItem.java new file mode 100644 index 00000000..b6a8f895 --- /dev/null +++ b/common/src/main/java/toughasnails/item/EmptyLeatherCanteenItem.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.block.TANBlocks; +import toughasnails.api.item.TANItems; +import toughasnails.block.RainCollectorBlock; +import toughasnails.init.ModTags; + +public class EmptyLeatherCanteenItem extends Item +{ + public EmptyLeatherCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos)) + { + BlockState state = world.getBlockState(pos); + + if (state.getBlock() instanceof RainCollectorBlock) + { + // Fill the canteen from purified water from a rain collector + int waterLevel = state.getValue(RainCollectorBlock.LEVEL); + + if (waterLevel > 0 && !world.isClientSide()) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + ((RainCollectorBlock) TANBlocks.RAIN_COLLECTOR).setWaterLevel(world, pos, state, waterLevel - 1); + return InteractionResultHolder.success(this.replaceCanteen(stack, player, new ItemStack(TANItems.LEATHER_PURIFIED_WATER_CANTEEN))); + } + } + else if (world.getFluidState(pos).is(FluidTags.WATER)) + { + // Fill the canteen with water in the world + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + + Holder biome = player.level().getBiome(player.blockPosition()); + Item canteenItem; + + if (biome.is(ModTags.Biomes.DIRTY_WATER_BIOMES)) + { + canteenItem = TANItems.LEATHER_DIRTY_WATER_CANTEEN; + } + else if (biome.is(ModTags.Biomes.PURIFIED_WATER_BIOMES)) + { + canteenItem = TANItems.LEATHER_PURIFIED_WATER_CANTEEN; + } + else + { + canteenItem = TANItems.LEATHER_WATER_CANTEEN; + } + + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(canteenItem)), world.isClientSide()); + } + } + } + + return InteractionResultHolder.pass(stack); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } +} diff --git a/common/src/main/java/toughasnails/item/EmptyNetheriteCanteenItem.java b/common/src/main/java/toughasnails/item/EmptyNetheriteCanteenItem.java new file mode 100644 index 00000000..fe27b107 --- /dev/null +++ b/common/src/main/java/toughasnails/item/EmptyNetheriteCanteenItem.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.block.TANBlocks; +import toughasnails.api.item.TANItems; +import toughasnails.block.RainCollectorBlock; +import toughasnails.init.ModTags; + +public class EmptyNetheriteCanteenItem extends Item +{ + public EmptyNetheriteCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos)) + { + BlockState state = world.getBlockState(pos); + + if (state.getBlock() instanceof RainCollectorBlock) + { + // Fill the canteen from purified water from a rain collector + int waterLevel = state.getValue(RainCollectorBlock.LEVEL); + + if (waterLevel > 0 && !world.isClientSide()) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + ((RainCollectorBlock) TANBlocks.RAIN_COLLECTOR).setWaterLevel(world, pos, state, waterLevel - 1); + return InteractionResultHolder.success(this.replaceCanteen(stack, player, new ItemStack(TANItems.NETHERITE_PURIFIED_WATER_CANTEEN))); + } + } + else if (world.getFluidState(pos).is(FluidTags.WATER)) + { + // Fill the canteen with water in the world + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + + Holder biome = player.level().getBiome(player.blockPosition()); + Item canteenItem; + + if (biome.is(ModTags.Biomes.DIRTY_WATER_BIOMES)) + { + canteenItem = TANItems.NETHERITE_DIRTY_WATER_CANTEEN; + } + else if (biome.is(ModTags.Biomes.PURIFIED_WATER_BIOMES)) + { + canteenItem = TANItems.NETHERITE_PURIFIED_WATER_CANTEEN; + } + else + { + canteenItem = TANItems.NETHERITE_WATER_CANTEEN; + } + + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(canteenItem)), world.isClientSide()); + } + } + } + + return InteractionResultHolder.pass(stack); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } +} diff --git a/common/src/main/java/toughasnails/item/FilledCanteenItem.java b/common/src/main/java/toughasnails/item/FilledCopperCanteenItem.java similarity index 91% rename from common/src/main/java/toughasnails/item/FilledCanteenItem.java rename to common/src/main/java/toughasnails/item/FilledCopperCanteenItem.java index 4a4cdf7b..cc6dedcc 100644 --- a/common/src/main/java/toughasnails/item/FilledCanteenItem.java +++ b/common/src/main/java/toughasnails/item/FilledCopperCanteenItem.java @@ -17,16 +17,15 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemUtils; import net.minecraft.world.item.UseAnim; -import net.minecraft.world.item.enchantment.Enchantment; import net.minecraft.world.level.ClipContext; import net.minecraft.world.level.Level; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import toughasnails.api.item.TANItems; -public class FilledCanteenItem extends Item +public class FilledCopperCanteenItem extends Item { - public FilledCanteenItem(Properties properties) + public FilledCopperCanteenItem(Properties properties) { super(properties); } @@ -44,7 +43,7 @@ public InteractionResultHolder use(Level world, Player player, Intera if (world.mayInteract(player, pos) && world.getFluidState(pos).is(FluidTags.WATER)) { world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); - return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(TANItems.WATER_CANTEEN)), world.isClientSide()); + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(TANItems.COPPER_WATER_CANTEEN)), world.isClientSide()); } } @@ -75,7 +74,7 @@ public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity en stack.hurtAndBreak(1, player, (entity) -> broken[0] = true); if (broken[0]) { - return new ItemStack(TANItems.EMPTY_CANTEEN); + return new ItemStack(TANItems.EMPTY_COPPER_CANTEEN); } } diff --git a/common/src/main/java/toughasnails/item/FilledDiamondCanteenItem.java b/common/src/main/java/toughasnails/item/FilledDiamondCanteenItem.java new file mode 100644 index 00000000..92140d90 --- /dev/null +++ b/common/src/main/java/toughasnails/item/FilledDiamondCanteenItem.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.item.UseAnim; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.item.TANItems; + +public class FilledDiamondCanteenItem extends Item +{ + public FilledDiamondCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos) && world.getFluidState(pos).is(FluidTags.WATER)) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(TANItems.DIAMOND_WATER_CANTEEN)), world.isClientSide()); + } + } + + return ItemUtils.startUsingInstantly(world, player, hand); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } + + @Override + public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity entityLiving) + { + Player player = entityLiving instanceof Player ? (Player)entityLiving : null; + + // Do nothing if this isn't a player + if (player == null) + return stack; + + player.awardStat(Stats.ITEM_USED.get(this)); + + // Damage the item if we're on the server and the player isn't in creative mode + if (!worldIn.isClientSide && !player.getAbilities().instabuild) + { + boolean[] broken = new boolean[]{false}; + stack.hurtAndBreak(1, player, (entity) -> broken[0] = true); + if (broken[0]) + { + return new ItemStack(TANItems.EMPTY_DIAMOND_CANTEEN); + } + } + + return stack; + } + + @Override + public int getUseDuration(ItemStack stack) + { + return 32; + } + + @Override + public UseAnim getUseAnimation(ItemStack stack) + { + return UseAnim.DRINK; + } + + @Override + public boolean isEnchantable(ItemStack stack) + { + return false; + } +} diff --git a/common/src/main/java/toughasnails/item/FilledGoldCanteenItem.java b/common/src/main/java/toughasnails/item/FilledGoldCanteenItem.java new file mode 100644 index 00000000..a6f5b942 --- /dev/null +++ b/common/src/main/java/toughasnails/item/FilledGoldCanteenItem.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.item.UseAnim; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.item.TANItems; + +public class FilledGoldCanteenItem extends Item +{ + public FilledGoldCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos) && world.getFluidState(pos).is(FluidTags.WATER)) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(TANItems.GOLD_WATER_CANTEEN)), world.isClientSide()); + } + } + + return ItemUtils.startUsingInstantly(world, player, hand); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } + + @Override + public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity entityLiving) + { + Player player = entityLiving instanceof Player ? (Player)entityLiving : null; + + // Do nothing if this isn't a player + if (player == null) + return stack; + + player.awardStat(Stats.ITEM_USED.get(this)); + + // Damage the item if we're on the server and the player isn't in creative mode + if (!worldIn.isClientSide && !player.getAbilities().instabuild) + { + boolean[] broken = new boolean[]{false}; + stack.hurtAndBreak(1, player, (entity) -> broken[0] = true); + if (broken[0]) + { + return new ItemStack(TANItems.EMPTY_GOLD_CANTEEN); + } + } + + return stack; + } + + @Override + public int getUseDuration(ItemStack stack) + { + return 32; + } + + @Override + public UseAnim getUseAnimation(ItemStack stack) + { + return UseAnim.DRINK; + } + + @Override + public boolean isEnchantable(ItemStack stack) + { + return false; + } +} diff --git a/common/src/main/java/toughasnails/item/FilledIronCanteenItem.java b/common/src/main/java/toughasnails/item/FilledIronCanteenItem.java new file mode 100644 index 00000000..a0fe8f3d --- /dev/null +++ b/common/src/main/java/toughasnails/item/FilledIronCanteenItem.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.item.UseAnim; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.item.TANItems; + +public class FilledIronCanteenItem extends Item +{ + public FilledIronCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos) && world.getFluidState(pos).is(FluidTags.WATER)) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(TANItems.IRON_WATER_CANTEEN)), world.isClientSide()); + } + } + + return ItemUtils.startUsingInstantly(world, player, hand); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } + + @Override + public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity entityLiving) + { + Player player = entityLiving instanceof Player ? (Player)entityLiving : null; + + // Do nothing if this isn't a player + if (player == null) + return stack; + + player.awardStat(Stats.ITEM_USED.get(this)); + + // Damage the item if we're on the server and the player isn't in creative mode + if (!worldIn.isClientSide && !player.getAbilities().instabuild) + { + boolean[] broken = new boolean[]{false}; + stack.hurtAndBreak(1, player, (entity) -> broken[0] = true); + if (broken[0]) + { + return new ItemStack(TANItems.EMPTY_IRON_CANTEEN); + } + } + + return stack; + } + + @Override + public int getUseDuration(ItemStack stack) + { + return 32; + } + + @Override + public UseAnim getUseAnimation(ItemStack stack) + { + return UseAnim.DRINK; + } + + @Override + public boolean isEnchantable(ItemStack stack) + { + return false; + } +} diff --git a/common/src/main/java/toughasnails/item/FilledLeatherCanteenItem.java b/common/src/main/java/toughasnails/item/FilledLeatherCanteenItem.java new file mode 100644 index 00000000..6d203f5e --- /dev/null +++ b/common/src/main/java/toughasnails/item/FilledLeatherCanteenItem.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.item.UseAnim; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.item.TANItems; + +public class FilledLeatherCanteenItem extends Item +{ + public FilledLeatherCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos) && world.getFluidState(pos).is(FluidTags.WATER)) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(TANItems.LEATHER_WATER_CANTEEN)), world.isClientSide()); + } + } + + return ItemUtils.startUsingInstantly(world, player, hand); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } + + @Override + public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity entityLiving) + { + Player player = entityLiving instanceof Player ? (Player)entityLiving : null; + + // Do nothing if this isn't a player + if (player == null) + return stack; + + player.awardStat(Stats.ITEM_USED.get(this)); + + // Damage the item if we're on the server and the player isn't in creative mode + if (!worldIn.isClientSide && !player.getAbilities().instabuild) + { + boolean[] broken = new boolean[]{false}; + stack.hurtAndBreak(1, player, (entity) -> broken[0] = true); + if (broken[0]) + { + return new ItemStack(TANItems.EMPTY_LEATHER_CANTEEN); + } + } + + return stack; + } + + @Override + public int getUseDuration(ItemStack stack) + { + return 32; + } + + @Override + public UseAnim getUseAnimation(ItemStack stack) + { + return UseAnim.DRINK; + } + + @Override + public boolean isEnchantable(ItemStack stack) + { + return false; + } +} diff --git a/common/src/main/java/toughasnails/item/FilledNetheriteCanteenItem.java b/common/src/main/java/toughasnails/item/FilledNetheriteCanteenItem.java new file mode 100644 index 00000000..40fb4295 --- /dev/null +++ b/common/src/main/java/toughasnails/item/FilledNetheriteCanteenItem.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright 2021, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package toughasnails.item; + +import net.minecraft.core.BlockPos; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.stats.Stats; +import net.minecraft.tags.FluidTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.ItemUtils; +import net.minecraft.world.item.UseAnim; +import net.minecraft.world.level.ClipContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import toughasnails.api.item.TANItems; + +public class FilledNetheriteCanteenItem extends Item +{ + public FilledNetheriteCanteenItem(Properties properties) + { + super(properties); + } + + @Override + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) + { + ItemStack stack = player.getItemInHand(hand); + HitResult rayTraceResult = getPlayerPOVHitResult(world, player, ClipContext.Fluid.SOURCE_ONLY); + + if (rayTraceResult.getType() == HitResult.Type.BLOCK) + { + BlockPos pos = ((BlockHitResult)rayTraceResult).getBlockPos(); + + if (world.mayInteract(player, pos) && world.getFluidState(pos).is(FluidTags.WATER)) + { + world.playSound(player, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + return InteractionResultHolder.sidedSuccess(this.replaceCanteen(stack, player, new ItemStack(TANItems.NETHERITE_WATER_CANTEEN)), world.isClientSide()); + } + } + + return ItemUtils.startUsingInstantly(world, player, hand); + } + + protected ItemStack replaceCanteen(ItemStack oldStack, Player player, ItemStack newStack) + { + player.awardStat(Stats.ITEM_USED.get(this)); + return ItemUtils.createFilledResult(oldStack, player, newStack); + } + + @Override + public ItemStack finishUsingItem(ItemStack stack, Level worldIn, LivingEntity entityLiving) + { + Player player = entityLiving instanceof Player ? (Player)entityLiving : null; + + // Do nothing if this isn't a player + if (player == null) + return stack; + + player.awardStat(Stats.ITEM_USED.get(this)); + + // Damage the item if we're on the server and the player isn't in creative mode + if (!worldIn.isClientSide && !player.getAbilities().instabuild) + { + boolean[] broken = new boolean[]{false}; + stack.hurtAndBreak(1, player, (entity) -> broken[0] = true); + if (broken[0]) + { + return new ItemStack(TANItems.EMPTY_NETHERITE_CANTEEN); + } + } + + return stack; + } + + @Override + public int getUseDuration(ItemStack stack) + { + return 32; + } + + @Override + public UseAnim getUseAnimation(ItemStack stack) + { + return UseAnim.DRINK; + } + + @Override + public boolean isEnchantable(ItemStack stack) + { + return false; + } +} diff --git a/common/src/main/resources/assets/toughasnails/lang/en_us.json b/common/src/main/resources/assets/toughasnails/lang/en_us.json index b2b4e786..fff5d4fe 100644 --- a/common/src/main/resources/assets/toughasnails/lang/en_us.json +++ b/common/src/main/resources/assets/toughasnails/lang/en_us.json @@ -33,22 +33,42 @@ "item.toughasnails.apple_juice": "Apple Juice", "item.toughasnails.cactus_juice": "Cactus Juice", "item.toughasnails.chorus_fruit_juice": "Chorus Fruit Juice", + "item.toughasnails.copper_dirty_water_canteen": "Copper Dirty Water Canteen", + "item.toughasnails.copper_purified_water_canteen": "Copper Purified Water Canteen", + "item.toughasnails.copper_water_canteen": "Copper Water Canteen", + "item.toughasnails.diamond_dirty_water_canteen": "Diamond Dirty Water Canteen", + "item.toughasnails.diamond_purified_water_canteen": "Diamond Purified Water Canteen", + "item.toughasnails.diamond_water_canteen": "Diamond Water Canteen", "item.toughasnails.dirty_water_bottle": "Dirty Water Bottle", - "item.toughasnails.dirty_water_canteen": "Dirty Water Canteen", - "item.toughasnails.empty_canteen": "Empty Canteen", + "item.toughasnails.empty_copper_canteen": "Empty Copper Canteen", + "item.toughasnails.empty_diamond_canteen": "Empty Diamond Canteen", + "item.toughasnails.empty_gold_canteen": "Empty Gold Canteen", + "item.toughasnails.empty_iron_canteen": "Empty Iron Canteen", + "item.toughasnails.empty_leather_canteen": "Empty Leather Canteen", + "item.toughasnails.empty_netherite_canteen": "Empty Netherite Canteen", "item.toughasnails.glow_berry_juice": "Glow Berry Juice", + "item.toughasnails.gold_dirty_water_canteen": "Gold Dirty Water Canteen", + "item.toughasnails.gold_purified_water_canteen": "Gold Purified Water Canteen", + "item.toughasnails.gold_water_canteen": "Gold Water Canteen", + "item.toughasnails.iron_dirty_water_canteen": "Iron Dirty Water Canteen", + "item.toughasnails.iron_purified_water_canteen": "Iron Purified Water Canteen", + "item.toughasnails.iron_water_canteen": "Iron Water Canteen", "item.toughasnails.leaf_boots": "Leaf Greaves", "item.toughasnails.leaf_chestplate": "Leaf Poncho", "item.toughasnails.leaf_helmet": "Leaf Veil", "item.toughasnails.leaf_leggings": "Leaf Pants", + "item.toughasnails.leather_dirty_water_canteen": "Leather Dirty Water Canteen", + "item.toughasnails.leather_purified_water_canteen": "Leather Purified Water Canteen", + "item.toughasnails.leather_water_canteen": "Leather Water Canteen", "item.toughasnails.melon_juice": "Melon Juice", + "item.toughasnails.netherite_dirty_water_canteen": "Netherite Dirty Water Canteen", + "item.toughasnails.netherite_purified_water_canteen": "Netherite Purified Water Canteen", + "item.toughasnails.netherite_water_canteen": "Netherite Water Canteen", "item.toughasnails.pumpkin_juice": "Pumpkin Juice", "item.toughasnails.purified_water_bottle": "Purified Water Bottle", - "item.toughasnails.purified_water_canteen": "Purified Water Canteen", "item.toughasnails.sweet_berry_juice": "Sweet Berry Juice", "item.toughasnails.tan_icon": "TAN Icon", "item.toughasnails.thermometer": "Thermometer", - "item.toughasnails.water_canteen": "Water Canteen", "item.toughasnails.wool_boots": "Wool Boots", "item.toughasnails.wool_chestplate": "Wool Parka", "item.toughasnails.wool_helmet": "Wool Hood", diff --git a/common/src/main/resources/assets/toughasnails/models/item/copper_dirty_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/copper_dirty_water_canteen.json new file mode 100644 index 00000000..9c7dd43a --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/copper_dirty_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/copper_dirty_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/copper_purified_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/copper_purified_water_canteen.json new file mode 100644 index 00000000..892cece4 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/copper_purified_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/copper_purified_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/copper_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/copper_water_canteen.json new file mode 100644 index 00000000..0f46a2c5 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/copper_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/copper_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/diamond_dirty_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/diamond_dirty_water_canteen.json new file mode 100644 index 00000000..8e7e09d4 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/diamond_dirty_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/diamond_dirty_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/diamond_purified_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/diamond_purified_water_canteen.json new file mode 100644 index 00000000..28dcf268 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/diamond_purified_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/diamond_purified_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/diamond_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/diamond_water_canteen.json new file mode 100644 index 00000000..b5de79a6 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/diamond_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/diamond_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/empty_copper_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/empty_copper_canteen.json new file mode 100644 index 00000000..60e53d9a --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/empty_copper_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/empty_copper_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/empty_diamond_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/empty_diamond_canteen.json new file mode 100644 index 00000000..4b46aec1 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/empty_diamond_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/empty_diamond_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/empty_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/empty_gold_canteen.json similarity index 51% rename from common/src/main/resources/assets/toughasnails/models/item/empty_canteen.json rename to common/src/main/resources/assets/toughasnails/models/item/empty_gold_canteen.json index 456420b0..3e22f982 100644 --- a/common/src/main/resources/assets/toughasnails/models/item/empty_canteen.json +++ b/common/src/main/resources/assets/toughasnails/models/item/empty_gold_canteen.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "toughasnails:item/empty_canteen" + "layer0": "toughasnails:item/empty_gold_canteen" } } diff --git a/common/src/main/resources/assets/toughasnails/models/item/water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/empty_iron_canteen.json similarity index 51% rename from common/src/main/resources/assets/toughasnails/models/item/water_canteen.json rename to common/src/main/resources/assets/toughasnails/models/item/empty_iron_canteen.json index ba7d92f5..a7ec0b2e 100644 --- a/common/src/main/resources/assets/toughasnails/models/item/water_canteen.json +++ b/common/src/main/resources/assets/toughasnails/models/item/empty_iron_canteen.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "toughasnails:item/water_canteen" + "layer0": "toughasnails:item/empty_iron_canteen" } } diff --git a/common/src/main/resources/assets/toughasnails/models/item/empty_leather_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/empty_leather_canteen.json new file mode 100644 index 00000000..bf3dc11b --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/empty_leather_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/empty_leather_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/empty_netherite_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/empty_netherite_canteen.json new file mode 100644 index 00000000..dc640366 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/empty_netherite_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/empty_netherite_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/gold_dirty_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/gold_dirty_water_canteen.json new file mode 100644 index 00000000..3a4faf16 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/gold_dirty_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/gold_dirty_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/gold_purified_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/gold_purified_water_canteen.json new file mode 100644 index 00000000..e2f3e700 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/gold_purified_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/gold_purified_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/dirty_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/gold_water_canteen.json similarity index 50% rename from common/src/main/resources/assets/toughasnails/models/item/dirty_water_canteen.json rename to common/src/main/resources/assets/toughasnails/models/item/gold_water_canteen.json index 52e7064e..1fc35061 100644 --- a/common/src/main/resources/assets/toughasnails/models/item/dirty_water_canteen.json +++ b/common/src/main/resources/assets/toughasnails/models/item/gold_water_canteen.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "toughasnails:item/dirty_water_canteen" + "layer0": "toughasnails:item/gold_water_canteen" } } diff --git a/common/src/main/resources/assets/toughasnails/models/item/iron_dirty_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/iron_dirty_water_canteen.json new file mode 100644 index 00000000..45aae4f2 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/iron_dirty_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/iron_dirty_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/iron_purified_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/iron_purified_water_canteen.json new file mode 100644 index 00000000..f208f844 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/iron_purified_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/iron_purified_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/iron_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/iron_water_canteen.json new file mode 100644 index 00000000..b7f8312c --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/iron_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/iron_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/leather_dirty_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/leather_dirty_water_canteen.json new file mode 100644 index 00000000..de876127 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/leather_dirty_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/leather_dirty_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/leather_purified_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/leather_purified_water_canteen.json new file mode 100644 index 00000000..b6875529 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/leather_purified_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/leather_purified_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/leather_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/leather_water_canteen.json new file mode 100644 index 00000000..66fd603d --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/leather_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/leather_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/netherite_dirty_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/netherite_dirty_water_canteen.json new file mode 100644 index 00000000..2e07b5a9 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/netherite_dirty_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/netherite_dirty_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/netherite_purified_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/netherite_purified_water_canteen.json new file mode 100644 index 00000000..8d023cc3 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/netherite_purified_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/netherite_purified_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/netherite_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/netherite_water_canteen.json new file mode 100644 index 00000000..f1d76fe5 --- /dev/null +++ b/common/src/main/resources/assets/toughasnails/models/item/netherite_water_canteen.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "toughasnails:item/netherite_water_canteen" + } +} diff --git a/common/src/main/resources/assets/toughasnails/models/item/purified_water_canteen.json b/common/src/main/resources/assets/toughasnails/models/item/purified_water_canteen.json deleted file mode 100644 index 435c4374..00000000 --- a/common/src/main/resources/assets/toughasnails/models/item/purified_water_canteen.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "toughasnails:item/purified_water_canteen" - } -} diff --git a/common/src/main/resources/assets/toughasnails/textures/item/copper_dirty_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/copper_dirty_water_canteen.png new file mode 100644 index 00000000..9009a95d Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/copper_dirty_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/copper_purified_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/copper_purified_water_canteen.png new file mode 100644 index 00000000..fa5ee61b Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/copper_purified_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/copper_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/copper_water_canteen.png new file mode 100644 index 00000000..cff98944 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/copper_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/diamond_dirty_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/diamond_dirty_water_canteen.png new file mode 100644 index 00000000..5bea68a5 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/diamond_dirty_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/diamond_purified_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/diamond_purified_water_canteen.png new file mode 100644 index 00000000..92dce693 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/diamond_purified_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/diamond_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/diamond_water_canteen.png new file mode 100644 index 00000000..87a2b676 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/diamond_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/dirty_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/dirty_water_canteen.png deleted file mode 100644 index 005671c6..00000000 Binary files a/common/src/main/resources/assets/toughasnails/textures/item/dirty_water_canteen.png and /dev/null differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/empty_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/empty_canteen.png deleted file mode 100644 index bdddcae7..00000000 Binary files a/common/src/main/resources/assets/toughasnails/textures/item/empty_canteen.png and /dev/null differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/empty_copper_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/empty_copper_canteen.png new file mode 100644 index 00000000..b1739524 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/empty_copper_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/empty_diamond_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/empty_diamond_canteen.png new file mode 100644 index 00000000..4a8087b9 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/empty_diamond_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/empty_gold_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/empty_gold_canteen.png new file mode 100644 index 00000000..529d4d71 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/empty_gold_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/empty_iron_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/empty_iron_canteen.png new file mode 100644 index 00000000..180047a9 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/empty_iron_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/empty_leather_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/empty_leather_canteen.png new file mode 100644 index 00000000..dde1eede Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/empty_leather_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/empty_netherite_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/empty_netherite_canteen.png new file mode 100644 index 00000000..84c16d80 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/empty_netherite_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/gold_dirty_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/gold_dirty_water_canteen.png new file mode 100644 index 00000000..16a57171 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/gold_dirty_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/gold_purified_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/gold_purified_water_canteen.png new file mode 100644 index 00000000..b8323a90 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/gold_purified_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/gold_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/gold_water_canteen.png new file mode 100644 index 00000000..4f61bac5 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/gold_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/iron_dirty_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/iron_dirty_water_canteen.png new file mode 100644 index 00000000..d820642b Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/iron_dirty_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/iron_purified_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/iron_purified_water_canteen.png new file mode 100644 index 00000000..f206fbe7 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/iron_purified_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/iron_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/iron_water_canteen.png new file mode 100644 index 00000000..16fe2924 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/iron_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/leather_dirty_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/leather_dirty_water_canteen.png new file mode 100644 index 00000000..c33d4362 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/leather_dirty_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/leather_purified_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/leather_purified_water_canteen.png new file mode 100644 index 00000000..0a410e3d Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/leather_purified_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/leather_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/leather_water_canteen.png new file mode 100644 index 00000000..22288891 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/leather_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/netherite_dirty_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/netherite_dirty_water_canteen.png new file mode 100644 index 00000000..56a24f30 Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/netherite_dirty_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/netherite_purified_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/netherite_purified_water_canteen.png new file mode 100644 index 00000000..551d02ef Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/netherite_purified_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/netherite_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/netherite_water_canteen.png new file mode 100644 index 00000000..92ec041b Binary files /dev/null and b/common/src/main/resources/assets/toughasnails/textures/item/netherite_water_canteen.png differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/purified_water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/purified_water_canteen.png deleted file mode 100644 index 9f955ac3..00000000 Binary files a/common/src/main/resources/assets/toughasnails/textures/item/purified_water_canteen.png and /dev/null differ diff --git a/common/src/main/resources/assets/toughasnails/textures/item/water_canteen.png b/common/src/main/resources/assets/toughasnails/textures/item/water_canteen.png deleted file mode 100644 index 0e552220..00000000 Binary files a/common/src/main/resources/assets/toughasnails/textures/item/water_canteen.png and /dev/null differ diff --git a/forge/src/main/java/toughasnails/datagen/provider/TANItemTagsProvider.java b/forge/src/main/java/toughasnails/datagen/provider/TANItemTagsProvider.java index edb60dca..3600c154 100644 --- a/forge/src/main/java/toughasnails/datagen/provider/TANItemTagsProvider.java +++ b/forge/src/main/java/toughasnails/datagen/provider/TANItemTagsProvider.java @@ -62,11 +62,11 @@ protected void addTags(HolderLookup.Provider provider) ModTags.Items.NINETEEN_THIRST_DRINKS, ModTags.Items.TWENTY_THIRST_DRINKS ); - this.tag(ModTags.Items.ONE_THIRST_DRINKS).add(TANItems.DIRTY_WATER_BOTTLE, TANItems.DIRTY_WATER_CANTEEN); + this.tag(ModTags.Items.ONE_THIRST_DRINKS).add(TANItems.DIRTY_WATER_BOTTLE, TANItems.LEATHER_DIRTY_WATER_CANTEEN, TANItems.COPPER_DIRTY_WATER_CANTEEN, TANItems.IRON_DIRTY_WATER_CANTEEN, TANItems.GOLD_DIRTY_WATER_CANTEEN, TANItems.DIAMOND_DIRTY_WATER_CANTEEN, TANItems.NETHERITE_DIRTY_WATER_CANTEEN); this.tag(ModTags.Items.TWO_THIRST_DRINKS).add(Items.MILK_BUCKET); - this.tag(ModTags.Items.THREE_THIRST_DRINKS).add(Items.POTION, TANItems.WATER_CANTEEN); + this.tag(ModTags.Items.THREE_THIRST_DRINKS).add(Items.POTION, TANItems.LEATHER_WATER_CANTEEN, TANItems.COPPER_WATER_CANTEEN, TANItems.IRON_WATER_CANTEEN, TANItems.GOLD_WATER_CANTEEN, TANItems.DIAMOND_WATER_CANTEEN, TANItems.NETHERITE_WATER_CANTEEN); this.tag(ModTags.Items.FOUR_THIRST_DRINKS); - this.tag(ModTags.Items.FIVE_THIRST_DRINKS).add(TANItems.PURIFIED_WATER_BOTTLE, TANItems.PURIFIED_WATER_CANTEEN); + this.tag(ModTags.Items.FIVE_THIRST_DRINKS).add(TANItems.PURIFIED_WATER_BOTTLE, TANItems.LEATHER_PURIFIED_WATER_CANTEEN, TANItems.COPPER_PURIFIED_WATER_CANTEEN, TANItems.IRON_PURIFIED_WATER_CANTEEN, TANItems.GOLD_PURIFIED_WATER_CANTEEN, TANItems.DIAMOND_PURIFIED_WATER_CANTEEN, TANItems.NETHERITE_PURIFIED_WATER_CANTEEN); this.tag(ModTags.Items.SIX_THIRST_DRINKS).add(TANItems.GLOW_BERRY_JUICE, TANItems.PUMPKIN_JUICE, TANItems.SWEET_BERRY_JUICE); this.tag(ModTags.Items.SEVEN_THIRST_DRINKS).add(TANItems.CACTUS_JUICE, TANItems.MELON_JUICE); this.tag(ModTags.Items.EIGHT_THIRST_DRINKS).add(TANItems.APPLE_JUICE); @@ -84,17 +84,17 @@ protected void addTags(HolderLookup.Provider provider) this.tag(ModTags.Items.TWENTY_THIRST_DRINKS); // Poison chance - this.tag(ModTags.Items.TWENTY_FIVE_POISON_CHANCE_DRINKS).add(Items.POTION, TANItems.WATER_CANTEEN); + this.tag(ModTags.Items.TWENTY_FIVE_POISON_CHANCE_DRINKS).add(Items.POTION, TANItems.LEATHER_WATER_CANTEEN, TANItems.COPPER_WATER_CANTEEN, TANItems.IRON_WATER_CANTEEN, TANItems.GOLD_WATER_CANTEEN, TANItems.DIAMOND_WATER_CANTEEN, TANItems.NETHERITE_WATER_CANTEEN); this.tag(ModTags.Items.FIFTY_POISON_CHANCE_DRINKS); - this.tag(ModTags.Items.SEVENTY_FIVE_POISON_CHANCE_DRINKS).add(TANItems.DIRTY_WATER_BOTTLE, TANItems.DIRTY_WATER_CANTEEN); + this.tag(ModTags.Items.SEVENTY_FIVE_POISON_CHANCE_DRINKS).add(TANItems.DIRTY_WATER_BOTTLE, TANItems.LEATHER_DIRTY_WATER_CANTEEN, TANItems.COPPER_DIRTY_WATER_CANTEEN, TANItems.IRON_DIRTY_WATER_CANTEEN, TANItems.GOLD_DIRTY_WATER_CANTEEN, TANItems.DIAMOND_DIRTY_WATER_CANTEEN, TANItems.NETHERITE_DIRTY_WATER_CANTEEN); this.tag(ModTags.Items.ONE_HUNDRED_POISON_CHANCE_DRINKS); // Hydration - this.tag(ModTags.Items.TEN_HYDRATION_DRINKS).add(TANItems.DIRTY_WATER_BOTTLE, TANItems.DIRTY_WATER_CANTEEN, TANItems.GLOW_BERRY_JUICE, TANItems.SWEET_BERRY_JUICE); - this.tag(ModTags.Items.TWENTY_HYDRATION_DRINKS).add(Items.POTION, TANItems.WATER_CANTEEN, TANItems.CHORUS_FRUIT_JUICE); + this.tag(ModTags.Items.TEN_HYDRATION_DRINKS).add(TANItems.DIRTY_WATER_BOTTLE, TANItems.LEATHER_DIRTY_WATER_CANTEEN, TANItems.COPPER_DIRTY_WATER_CANTEEN, TANItems.IRON_DIRTY_WATER_CANTEEN, TANItems.GOLD_DIRTY_WATER_CANTEEN, TANItems.DIAMOND_DIRTY_WATER_CANTEEN, TANItems.NETHERITE_DIRTY_WATER_CANTEEN, TANItems.GLOW_BERRY_JUICE, TANItems.SWEET_BERRY_JUICE); + this.tag(ModTags.Items.TWENTY_HYDRATION_DRINKS).add(Items.POTION, TANItems.LEATHER_WATER_CANTEEN, TANItems.COPPER_WATER_CANTEEN, TANItems.IRON_WATER_CANTEEN, TANItems.GOLD_WATER_CANTEEN, TANItems.DIAMOND_WATER_CANTEEN, TANItems.NETHERITE_WATER_CANTEEN, TANItems.CHORUS_FRUIT_JUICE); this.tag(ModTags.Items.THIRTY_HYDRATION_DRINKS).add(Items.MILK_BUCKET, TANItems.PUMPKIN_JUICE); this.tag(ModTags.Items.FOURTY_HYDRATION_DRINKS); - this.tag(ModTags.Items.FIFTY_HYDRATION_DRINKS).add(TANItems.PURIFIED_WATER_BOTTLE, TANItems.PURIFIED_WATER_CANTEEN); + this.tag(ModTags.Items.FIFTY_HYDRATION_DRINKS).add(TANItems.PURIFIED_WATER_BOTTLE, TANItems.LEATHER_PURIFIED_WATER_CANTEEN, TANItems.COPPER_PURIFIED_WATER_CANTEEN, TANItems.IRON_PURIFIED_WATER_CANTEEN, TANItems.GOLD_PURIFIED_WATER_CANTEEN, TANItems.DIAMOND_PURIFIED_WATER_CANTEEN, TANItems.NETHERITE_PURIFIED_WATER_CANTEEN); this.tag(ModTags.Items.SIXTY_HYDRATION_DRINKS).add(TANItems.APPLE_JUICE, TANItems.MELON_JUICE); this.tag(ModTags.Items.SEVENTY_HYDRATION_DRINKS); this.tag(ModTags.Items.EIGHTY_HYDRATION_DRINKS).add(TANItems.CACTUS_JUICE); diff --git a/forge/src/main/java/toughasnails/datagen/provider/TANRecipeProvider.java b/forge/src/main/java/toughasnails/datagen/provider/TANRecipeProvider.java index 06209728..2e342ac4 100644 --- a/forge/src/main/java/toughasnails/datagen/provider/TANRecipeProvider.java +++ b/forge/src/main/java/toughasnails/datagen/provider/TANRecipeProvider.java @@ -4,10 +4,12 @@ import net.minecraft.data.recipes.*; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; +import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.alchemy.PotionUtils; import net.minecraft.world.item.alchemy.Potions; +import net.minecraft.world.item.crafting.Ingredient; import toughasnails.api.block.TANBlocks; import toughasnails.api.item.TANItems; import toughasnails.core.ToughAsNails; @@ -25,7 +27,15 @@ public TANRecipeProvider(PackOutput output) protected void buildRecipes(RecipeOutput output) { // Canteen - ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, TANItems.EMPTY_CANTEEN).define('#', Items.LEATHER).pattern(" # ").pattern("# #").pattern(" # ").unlockedBy("has_leather", has(Items.LEATHER)).save(output); + ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, TANItems.EMPTY_LEATHER_CANTEEN).define('#', Items.LEATHER).pattern(" # ").pattern("# #").pattern(" # ").unlockedBy("has_leather", has(Items.LEATHER)).save(output); + ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, TANItems.EMPTY_COPPER_CANTEEN).define('#', Items.COPPER_INGOT).pattern(" # ").pattern("# #").pattern(" # ").unlockedBy("has_copper_ingot", has(Items.COPPER_INGOT)).save(output); + ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, TANItems.EMPTY_IRON_CANTEEN).define('#', Items.IRON_INGOT).pattern(" # ").pattern("# #").pattern(" # ").unlockedBy("has_iron_ingot", has(Items.IRON_INGOT)).save(output); + ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, TANItems.EMPTY_GOLD_CANTEEN).define('#', Items.GOLD_INGOT).pattern(" # ").pattern("# #").pattern(" # ").unlockedBy("has_gold_ingot", has(Items.GOLD_INGOT)).save(output); + ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, TANItems.EMPTY_DIAMOND_CANTEEN).define('#', Items.DIAMOND).pattern(" # ").pattern("# #").pattern(" # ").unlockedBy("has_diamond", has(Items.DIAMOND)).save(output); + netheriteSmithing(output, TANItems.EMPTY_DIAMOND_CANTEEN, RecipeCategory.TOOLS, TANItems.EMPTY_NETHERITE_CANTEEN); + netheriteSmithing(output, TANItems.DIAMOND_DIRTY_WATER_CANTEEN, RecipeCategory.TOOLS, TANItems.NETHERITE_DIRTY_WATER_CANTEEN); + netheriteSmithing(output, TANItems.DIAMOND_WATER_CANTEEN, RecipeCategory.TOOLS, TANItems.NETHERITE_WATER_CANTEEN); + netheriteSmithing(output, TANItems.DIAMOND_PURIFIED_WATER_CANTEEN, RecipeCategory.TOOLS, TANItems.NETHERITE_PURIFIED_WATER_CANTEEN); // Juice ShapelessRecipeBuilder.shapeless(RecipeCategory.FOOD, TANItems.APPLE_JUICE).requires(TANItems.PURIFIED_WATER_BOTTLE).requires(Items.SUGAR).requires(Items.APPLE).group("juice").unlockedBy("has_apple", has(Items.APPLE)).save(output); @@ -63,12 +73,32 @@ protected void buildRecipes(RecipeOutput output) waterPurifier(output, PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.WATER), new ItemStack(TANItems.PURIFIED_WATER_BOTTLE), 200); // Canteens - waterPurifier(output, new ItemStack(TANItems.DIRTY_WATER_CANTEEN), new ItemStack(TANItems.WATER_CANTEEN), 400); - waterPurifier(output, new ItemStack(TANItems.WATER_CANTEEN), new ItemStack(TANItems.PURIFIED_WATER_CANTEEN), 200); + waterPurifier(output, new ItemStack(TANItems.LEATHER_DIRTY_WATER_CANTEEN), new ItemStack(TANItems.LEATHER_WATER_CANTEEN), 400); + waterPurifier(output, new ItemStack(TANItems.COPPER_DIRTY_WATER_CANTEEN), new ItemStack(TANItems.COPPER_WATER_CANTEEN), 400); + waterPurifier(output, new ItemStack(TANItems.IRON_DIRTY_WATER_CANTEEN), new ItemStack(TANItems.IRON_WATER_CANTEEN), 400); + waterPurifier(output, new ItemStack(TANItems.GOLD_DIRTY_WATER_CANTEEN), new ItemStack(TANItems.GOLD_WATER_CANTEEN), 400); + waterPurifier(output, new ItemStack(TANItems.DIAMOND_DIRTY_WATER_CANTEEN), new ItemStack(TANItems.DIAMOND_WATER_CANTEEN), 400); + waterPurifier(output, new ItemStack(TANItems.NETHERITE_DIRTY_WATER_CANTEEN), new ItemStack(TANItems.NETHERITE_WATER_CANTEEN), 400); + + waterPurifier(output, new ItemStack(TANItems.LEATHER_WATER_CANTEEN), new ItemStack(TANItems.LEATHER_PURIFIED_WATER_CANTEEN), 200); + waterPurifier(output, new ItemStack(TANItems.COPPER_WATER_CANTEEN), new ItemStack(TANItems.COPPER_PURIFIED_WATER_CANTEEN), 200); + waterPurifier(output, new ItemStack(TANItems.IRON_WATER_CANTEEN), new ItemStack(TANItems.IRON_PURIFIED_WATER_CANTEEN), 200); + waterPurifier(output, new ItemStack(TANItems.GOLD_WATER_CANTEEN), new ItemStack(TANItems.GOLD_PURIFIED_WATER_CANTEEN), 200); + waterPurifier(output, new ItemStack(TANItems.DIAMOND_WATER_CANTEEN), new ItemStack(TANItems.DIAMOND_PURIFIED_WATER_CANTEEN), 200); + waterPurifier(output, new ItemStack(TANItems.NETHERITE_WATER_CANTEEN), new ItemStack(TANItems.NETHERITE_PURIFIED_WATER_CANTEEN), 200); } public static void waterPurifier(RecipeOutput output, ItemStack input, ItemStack result, int purifyTime) { WaterPurifierRecipeBuilder.waterPurifier(input, result, purifyTime).save(output, new ResourceLocation(ToughAsNails.MOD_ID, getItemName(result.getItem()))); } + + public static void netheriteSmithing(RecipeOutput output, Item input, RecipeCategory category, Item result) + { + SmithingTransformRecipeBuilder.smithing( + Ingredient.of(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE), Ingredient.of(input), Ingredient.of(Items.NETHERITE_INGOT), category, result + ) + .unlocks("has_netherite_ingot", has(Items.NETHERITE_INGOT)) + .save(output, new ResourceLocation(ToughAsNails.MOD_ID, getItemName(result)) + "_smithing"); + } }