diff --git a/behavior_pack/functions/flaskTransform.mcfunction b/behavior_pack/functions/flaskTransform.mcfunction new file mode 100644 index 0000000..8b2e87c --- /dev/null +++ b/behavior_pack/functions/flaskTransform.mcfunction @@ -0,0 +1,2 @@ +clear @s mw_alko:bottle 0 1 +give @s mw_alko:bottle_water 1 0 \ No newline at end of file diff --git a/behavior_pack/functions/inWater.mcfunction b/behavior_pack/functions/inWater.mcfunction new file mode 100644 index 0000000..2dbaf94 --- /dev/null +++ b/behavior_pack/functions/inWater.mcfunction @@ -0,0 +1 @@ +execute @p ~~~ detect ~~~ minecraft:water 0 function flaskTransform \ No newline at end of file diff --git a/behavior_pack/functions/tick.json b/behavior_pack/functions/tick.json new file mode 100644 index 0000000..35ab46b --- /dev/null +++ b/behavior_pack/functions/tick.json @@ -0,0 +1,3 @@ +{ + "values": [] +} \ No newline at end of file diff --git a/behavior_pack/items/mw_alko_bottle.json b/behavior_pack/items/mw_alko_bottle.json index 5bc6c82..1b04831 100644 --- a/behavior_pack/items/mw_alko_bottle.json +++ b/behavior_pack/items/mw_alko_bottle.json @@ -1,5 +1,5 @@ { - "format_version": "1.16.0", + "format_version": "1.17.40", "minecraft:item": { "description": { "identifier": "mw_alko:bottle", @@ -11,11 +11,27 @@ "minecraft:foil": false, "minecraft:stack_by_data": true, "minecraft:icon": { - "texture": "mw_alko:bottle" + "texture": "mw_alko_bottle" }, "minecraft:display_name": { "value": "Бутылка" - } - } + }, + "minecraft:on_use": { + "on_use": { + "target": "self", + "event": "mw_alko:fill" + } + } + }, + "events": { + "mw_alko:fill": { + "run_command": { + "command": [ + "execute @p ~~~ detect ~~~ minecraft:water 0 function flaskTransform" + ], + "target": "holder" + } + } + } } } \ No newline at end of file diff --git a/behavior_pack/manifest.json b/behavior_pack/manifest.json index b18cce8..3c12f5a 100644 --- a/behavior_pack/manifest.json +++ b/behavior_pack/manifest.json @@ -7,12 +7,12 @@ "version": [ 0, 0, - 14 + 17 ], "min_engine_version": [ 1, - 16, - 0 + 17, + 40 ] }, "modules": [ @@ -23,7 +23,7 @@ "version": [ 0, 0, - 14 + 17 ] } ], @@ -33,7 +33,7 @@ "version": [ 0, 0, - 14 + 17 ] } ] diff --git a/resource_pack/items/mw_alko_absent.json b/resource_pack/items/mw_alko_absent.json index 95d7ea0..584f781 100644 --- a/resource_pack/items/mw_alko_absent.json +++ b/resource_pack/items/mw_alko_absent.json @@ -6,7 +6,7 @@ "category": "Equipment" }, "components": { - "minecraft:icon": "mw_alko:absent", + "minecraft:icon": "mw_alko_absent", "minecraft:use_animation": "drink", "minecraft:render_offsets": "miscellaneous" } diff --git a/resource_pack/items/mw_alko_alcohol.json b/resource_pack/items/mw_alko_alcohol.json index 7c08a89..55bba81 100644 --- a/resource_pack/items/mw_alko_alcohol.json +++ b/resource_pack/items/mw_alko_alcohol.json @@ -6,7 +6,7 @@ "category": "Equipment" }, "components": { - "minecraft:icon": "mw_alko:vodka", + "minecraft:icon": "mw_alko_vodka", "minecraft:use_animation": "drink", "minecraft:render_offsets": "miscellaneous" } diff --git a/resource_pack/items/mw_alko_beer.json b/resource_pack/items/mw_alko_beer.json index cef8bfe..c6a7560 100644 --- a/resource_pack/items/mw_alko_beer.json +++ b/resource_pack/items/mw_alko_beer.json @@ -6,7 +6,7 @@ "category": "Equipment" }, "components": { - "minecraft:icon": "mw_alko:beer", + "minecraft:icon": "mw_alko_beer", "minecraft:use_animation": "drink", "minecraft:render_offsets": "miscellaneous" } diff --git a/resource_pack/items/mw_alko_bottle.json b/resource_pack/items/mw_alko_bottle.json index 943af4a..89dacc1 100644 --- a/resource_pack/items/mw_alko_bottle.json +++ b/resource_pack/items/mw_alko_bottle.json @@ -6,7 +6,7 @@ "category": "Equipment" }, "components": { - "minecraft:icon": "mw_alko:bottle", + "minecraft:icon": "mw_alko_bottle", "minecraft:render_offsets": "miscellaneous" } } diff --git a/resource_pack/items/mw_alko_bottle_water.json b/resource_pack/items/mw_alko_bottle_water.json index 1985d42..84bd947 100644 --- a/resource_pack/items/mw_alko_bottle_water.json +++ b/resource_pack/items/mw_alko_bottle_water.json @@ -6,7 +6,7 @@ "category": "Equipment" }, "components": { - "minecraft:icon": "mw_alko:bottle_water", + "minecraft:icon": "mw_alko_bottle_water", "minecraft:use_animation": "drink", "minecraft:render_offsets": "miscellaneous" } diff --git a/resource_pack/items/mw_alko_vine.json b/resource_pack/items/mw_alko_vine.json index 1b346f1..29c3c16 100644 --- a/resource_pack/items/mw_alko_vine.json +++ b/resource_pack/items/mw_alko_vine.json @@ -6,7 +6,7 @@ "category": "Equipment" }, "components": { - "minecraft:icon": "mw_alko:vine", + "minecraft:icon": "mw_alko_vine", "minecraft:use_animation": "drink", "minecraft:render_offsets": "miscellaneous" } diff --git a/resource_pack/items/mw_alko_vodka.json b/resource_pack/items/mw_alko_vodka.json index 90bdb06..ac4c84e 100644 --- a/resource_pack/items/mw_alko_vodka.json +++ b/resource_pack/items/mw_alko_vodka.json @@ -6,7 +6,7 @@ "category": "Equipment" }, "components": { - "minecraft:icon": "mw_alko:alcohol", + "minecraft:icon": "mw_alko_alcohol", "minecraft:use_animation": "drink", "minecraft:render_offsets": "miscellaneous" } diff --git a/resource_pack/manifest.json b/resource_pack/manifest.json index dc6a225..f439280 100644 --- a/resource_pack/manifest.json +++ b/resource_pack/manifest.json @@ -7,12 +7,12 @@ "version": [ 0, 0, - 14 + 17 ], "min_engine_version": [ 1, - 16, - 0 + 17, + 40 ] }, "modules": [ @@ -23,7 +23,7 @@ "version": [ 0, 0, - 14 + 17 ] } ], @@ -33,7 +33,7 @@ "version": [ 0, 0, - 14 + 17 ] } ] diff --git a/resource_pack/textures/item_texture.json b/resource_pack/textures/item_texture.json index 6f624f7..8deec4f 100644 --- a/resource_pack/textures/item_texture.json +++ b/resource_pack/textures/item_texture.json @@ -71,25 +71,25 @@ "colorful_gifts": { "textures": "textures/items/colorful_gifts" }, - "mw_alko:bottle_water": { + "mw_alko_bottle_water": { "textures": "textures/items/pamobile/mw_alko_bottle_water" }, - "mw_alko:alcohol": { + "mw_alko_alcohol": { "textures": "textures/items/pamobile/mw_alko_alcohol" }, - "mw_alko:bottle": { + "mw_alko_bottle": { "textures": "textures/items/pamobile/mw_alko_bottle" }, - "mw_alko:vodka": { + "mw_alko_vodka": { "textures": "textures/items/pamobile/mw_alko_vodka" }, - "mw_alko:vine": { + "mw_alko_vine": { "textures": "textures/items/pamobile/mw_alko_vine" }, - "mw_alko:beer": { + "mw_alko_beer": { "textures": "textures/items/pamobile/mw_alko_beer" }, - "mw_alko:absent": { + "mw_alko_absent": { "textures": "textures/items/pamobile/mw_alko_absent" } }