Начало билдера предметов и фикс билдера аддона
This commit is contained in:
+2
-2
@@ -32,8 +32,8 @@ datarr["header"]["version"] = info_ver
|
|||||||
datarr["modules"][0]["version"] = info_ver
|
datarr["modules"][0]["version"] = info_ver
|
||||||
datarr["dependencies"][0]["version"] = info_ver
|
datarr["dependencies"][0]["version"] = info_ver
|
||||||
|
|
||||||
json.dump(databr, open("behavior_pack\manifest.json", "w", encoding='utf-8'), ensure_ascii=False)
|
json.dump(databr, open("behavior_pack\manifest.json", "w", encoding='utf-8'), ensure_ascii=False, indent=4)
|
||||||
json.dump(datarr, open("resource_pack\manifest.json", "w", encoding='utf-8'), ensure_ascii=False)
|
json.dump(datarr, open("resource_pack\manifest.json", "w", encoding='utf-8'), ensure_ascii=False, indent=4)
|
||||||
|
|
||||||
zip_name_behavior = 'MWAlkoB'
|
zip_name_behavior = 'MWAlkoB'
|
||||||
directory_name_behavior = 'behavior_pack'
|
directory_name_behavior = 'behavior_pack'
|
||||||
|
|||||||
+40
@@ -0,0 +1,40 @@
|
|||||||
|
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 = []
|
||||||
|
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 предмета> ")
|
||||||
|
|
||||||
|
type_rec = input("Тип рецепта> ")
|
||||||
|
|
||||||
|
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)
|
||||||
|
print("Рецепт создан!")
|
||||||
|
else:
|
||||||
|
print("Рецепт не будет создан!")
|
||||||
|
|
||||||
|
num_frame = int(input("Номер текстуры> ")) - 1
|
||||||
|
|
||||||
|
name_item_vis = input("Имя предмета> ")
|
||||||
|
|
||||||
|
print("Создание предмета!")
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.17.0",
|
||||||
|
"minecraft:item": {
|
||||||
|
"description": {
|
||||||
|
"identifier": "",
|
||||||
|
"category": ""
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"minecraft:icon": {
|
||||||
|
"texture": "",
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.12",
|
||||||
|
"minecraft:recipe_shaped": {
|
||||||
|
"description": {
|
||||||
|
"identifier": " "
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
"tags": [ "crafting_table" ],
|
||||||
|
"pattern": [
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"-": {
|
||||||
|
"item": " ",
|
||||||
|
"data": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": " ",
|
||||||
|
"count": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user