diff --git a/behavior_pack/items/mw_food_choko.json b/behavior_pack/items/mw_food_choko.json new file mode 100644 index 0000000..b74cf10 --- /dev/null +++ b/behavior_pack/items/mw_food_choko.json @@ -0,0 +1,29 @@ +{ + "format_version": "1.17.0", + "minecraft:item": { + "description": { + "identifier": "mw_food:choko", + "category": "nature" + }, + "components": { + "minecraft:icon": { + "texture": "mw_food", + "frame": 0 + }, + "minecraft:display_name": { + "value": "Шоколадка" + }, + "minecraft:use_animation": "eat", + "minecraft:hand_equipped": false, + "minecraft:max_stack_size": 32, + "minecraft:foil": false, + "minecraft:food": { + "saturation_modifier": "low", + "nutrition": 4, + "can_always_eat": false, + "remove_effects": [] + }, + "minecraft:use_duration": 3 + } + } +} \ No newline at end of file diff --git a/behavior_pack/manifest.json b/behavior_pack/manifest.json index f5cf6a7..a9509c3 100644 --- a/behavior_pack/manifest.json +++ b/behavior_pack/manifest.json @@ -1 +1,40 @@ -{"format_version": 2, "header": {"description": "Аддон с разными изменениями", "name": "FantasyAddon by Nyako", "uuid": "e9eba44a-91d6-41de-a242-76c8c7d0e83b", "version": [0, 3, 4], "min_engine_version": [1, 17, 0]}, "modules": [{"description": "Аддон с разными изменениями", "type": "data", "uuid": "115c640d-fbfd-48af-8e50-115c5bb6485e", "version": [0, 3, 4]}], "dependencies": [{"uuid": "8b764b0b-89b1-45df-8f83-9204bccf7184", "version": [0, 3, 4]}]} \ No newline at end of file +{ + "format_version": 2, + "header": { + "description": "Аддон с разными изменениями", + "name": "FantasyAddon by Nyako", + "uuid": "e9eba44a-91d6-41de-a242-76c8c7d0e83b", + "version": [ + 0, + 3, + 6 + ], + "min_engine_version": [ + 1, + 17, + 0 + ] + }, + "modules": [ + { + "description": "Аддон с разными изменениями", + "type": "data", + "uuid": "115c640d-fbfd-48af-8e50-115c5bb6485e", + "version": [ + 0, + 3, + 6 + ] + } + ], + "dependencies": [ + { + "uuid": "8b764b0b-89b1-45df-8f83-9204bccf7184", + "version": [ + 0, + 3, + 6 + ] + } + ] +} \ No newline at end of file diff --git a/behavior_pack/recipes/mw_food_choko.json b/behavior_pack/recipes/mw_food_choko.json new file mode 100644 index 0000000..1066736 --- /dev/null +++ b/behavior_pack/recipes/mw_food_choko.json @@ -0,0 +1,26 @@ +{ + "format_version": "1.12", + "minecraft:recipe_shaped": { + "description": { + "identifier": "mw_food:choko" + }, + "tags": [ + "crafting_table" + ], + "pattern": [ + " ", + " ", + " " + ], + "key": { + "-": { + "item": " ", + "data": 1 + } + }, + "result": { + "item": "mw_food:choko", + "count": 1 + } + } +} \ No newline at end of file diff --git a/item_gen.py b/item_gen.py index af98d7e..593c91e 100644 --- a/item_gen.py +++ b/item_gen.py @@ -3,6 +3,7 @@ import json bp_root = "/behavior_pack" item_default = json.load(open("template\item.json", "r", encoding='utf-8')) texture_list = json.load(open("resource_pack\\textures\item_texture.json", "r", encoding='utf-8')) + texture_keys = list((texture_list["texture_data"]).keys()) count = 0 keys_succ = [] @@ -10,31 +11,44 @@ for ii in texture_keys: print(count, "-", ii) keys_succ.append(str(count)) count += 1 - name_cat_t = input("Имя категории предмета> ") if name_cat_t in keys_succ: name_cat = texture_keys[int(name_cat_t)] else: name_cat = name_cat_t -name_item_id = input("ID предмета> ") +for ii in texture_list["texture_data"][name_cat]["textures"]: + print("-", ii) +name_item_id = input("ID предмета> ") type_rec = input("Тип рецепта> ") +name_file = name_cat + "_" + name_item_id + ".json" if type_rec in ["1"]: rec_default = json.load(open("template\\rec"+type_rec+".json", "r", encoding='utf-8')) count_res = int(input("Сколько получается> ")) - name_rec_file = name_cat + "_" + name_item_id + ".json" rec_default["minecraft:recipe_shaped"]["description"]["identifier"] = name_cat + ":" + name_item_id rec_default["minecraft:recipe_shaped"]["result"]["item"] = name_cat + ":" + name_item_id rec_default["minecraft:recipe_shaped"]["result"]["count"] = count_res - json.dump(rec_default, open("behavior_pack\\recipes\\"+name_rec_file, "w", encoding='utf-8', indent=4), ensure_ascii=False) + json.dump(rec_default, open("behavior_pack\\recipes\\"+name_file, "w", encoding='utf-8'), ensure_ascii=False, indent=4) print("Рецепт создан!") else: print("Рецепт не будет создан!") +count = 1 +for ii in texture_list["texture_data"][name_cat]["textures"]: + print(count, "-", ii) + count += 1 num_frame = int(input("Номер текстуры> ")) - 1 -name_item_vis = input("Имя предмета> ") - -print("Создание предмета!") \ No newline at end of file +name_item_vis = input("Видимое имя предмета> ") +name_cati_d = {"0":"none", "1":"construction", "2":"equipment", "3":"items", "4":"nature"} +print("0 - None\n1 - Construction\n2 - Equipment\n3 - Items\n4 - Nature") +name_cati_t = input("Имя категории предмета в инвентаре> ") +item_default["minecraft:item"]["description"]["category"] = name_cati_d[name_cati_t] +item_default["minecraft:item"]["description"]["identifier"] = name_cat + ":" + name_item_id +item_default["minecraft:item"]["components"]["minecraft:icon"]["texture"] = name_cat +item_default["minecraft:item"]["components"]["minecraft:icon"]["frame"] = num_frame +item_default["minecraft:item"]["components"]["minecraft:display_name"]["value"] = name_item_vis +json.dump(item_default, open("behavior_pack\\items\\"+name_file, "w", encoding='utf-8'), ensure_ascii=False, indent=4) +print("Предмет создан!") \ No newline at end of file diff --git a/resource_pack/manifest.json b/resource_pack/manifest.json index 6b9f5f0..d6a2c94 100644 --- a/resource_pack/manifest.json +++ b/resource_pack/manifest.json @@ -1 +1,40 @@ -{"format_version": 2, "header": {"description": "Текстуры для аддона с разными изменениями", "name": "FantasyAddon by Nyako", "uuid": "8b764b0b-89b1-45df-8f83-9204bccf7184", "version": [0, 3, 4], "min_engine_version": [1, 17, 0]}, "modules": [{"description": "Сборник изменений для MW", "type": "resources", "uuid": "397e7227-43f5-4b31-9681-6a81cd09a9d0", "version": [0, 3, 4]}], "dependencies": [{"uuid": "e9eba44a-91d6-41de-a242-76c8c7d0e83b", "version": [0, 3, 4]}]} \ No newline at end of file +{ + "format_version": 2, + "header": { + "description": "Текстуры для аддона с разными изменениями", + "name": "FantasyAddon by Nyako", + "uuid": "8b764b0b-89b1-45df-8f83-9204bccf7184", + "version": [ + 0, + 3, + 6 + ], + "min_engine_version": [ + 1, + 17, + 0 + ] + }, + "modules": [ + { + "description": "Сборник изменений для MW", + "type": "resources", + "uuid": "397e7227-43f5-4b31-9681-6a81cd09a9d0", + "version": [ + 0, + 3, + 6 + ] + } + ], + "dependencies": [ + { + "uuid": "e9eba44a-91d6-41de-a242-76c8c7d0e83b", + "version": [ + 0, + 3, + 6 + ] + } + ] +} \ No newline at end of file