-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gui.py
531 lines (426 loc) · 52.1 KB
/
gui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
import time
import tkinter as tk
from tkinter import ttk
import tkinter.font as tkFont
from tkinter import messagebox
import shutil
import os
import yaml
import glob
from PIL import Image
class App:
def __init__(self, root):
#setting title
root.title("Convert Itemadder to Oraxen")
icon = """
iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAAABb3JOVAHPoneaAAAxYklEQVR42u2deZxcVZn3v+fce2vpvbOHLISQAIGEJSsBHFZfBUQdX4VhXGYGHJBNBGRGERU3FBUVUVkEHVxeUVFHXFEggAQSsu9kJYTse6/Vtd37/nG6OtXV1d1V1VV1760638+nPoFabp17u36/+5znnPMcgcZzzJp/wWBvCQBhoAZoAsYB44FRQHP3c81p/90IBLs/l3pY3f8CxIB497+pRxRoAY4CR7ofqf/eD+wEdnU/1wlEuj/XL8tefcHtS6vJQLjdgGpnELGbQB1KwMcDJwKTUYIf2/0YjjKDEErkZombnECZQxdK9IeAPd2PXcA2YCvwJspA2rs/kxVtCu6iDaDMDCL4emAkcCpwGjCl+zEJdSevRd25vUwc6EBFBtuBLd2PdcB64ADQ1t+HtSGUF20AZWAA0TcBE4AZwBnA6cApwAjUnb+SaAcOAq8Dq4FVwBrgLZRZ9EGbQenRBlAi+hF9EBgDnAmcDcwHTkb11YNut7nMRFH5hI3Aq8AiYCWwt/u1XmgzKA3aAIpIP6KvA04CzkUJfhYqYVfjdns9RicqsbgMZQgLgU2oyKEX2gyKhzaAIdKP6GuBqcAFwCXAbFTfXrrdXp9go3IFS4FngReAzajcQi+0GQwNbQAFkkX4Fkr0F6NEPwcYjRb9ULGBfcASlBk8hzKDePqbtBEUhjaAPOjnbj8COAd4D0r8E9CiLxU2Km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ZGF0ZTptb2RpZnkAMjAyMy0wMy0yMlQxNzoxMDoyMCswMDowMNekf5AAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjMtMDMtMjJUMTc6MTA6MjIrMDA6MDAXLk9mAAAAAElFTkSuQmCC
"""
img = tk.PhotoImage(data=icon)
root.tk.call('wm', 'iconphoto', root._w, img)
#setting window size
width=248
height=124
screenwidth = root.winfo_screenwidth()
screenheight = root.winfo_screenheight()
alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2)
root.geometry(alignstr)
root.resizable(width=False, height=False)
GButton_674=tk.Button(root)
GButton_674["bg"] = "#f0f0f0"
ft = tkFont.Font(family='Times',size=10)
GButton_674["font"] = ft
GButton_674["fg"] = "#000000"
GButton_674["justify"] = "center"
GButton_674["text"] = "Generate"
GButton_674.place(x=40,y=40,width=185,height=61)
GButton_674["command"] = self.GButton_674_command
self.GLabel_225=tk.Label(root)
ft = tkFont.Font(family='Times',size=10)
self.GLabel_225["font"] = ft
self.GLabel_225["fg"] = "#333333"
self.GLabel_225["justify"] = "center"
self.GLabel_225["text"] = ""
self.GLabel_225.place(x=10,y=10,width=249,height=30)
# add progress bar
self.progress = tk.ttk.Progressbar(root, orient = tk.HORIZONTAL, length = 100, mode = 'determinate')
self.progress.place(x=10,y=0,width=230,height=10)
def GButton_674_command(self):
if not os.path.isdir('./ItemsAdder'):
os.mkdir('./ItemsAdder')
messagebox.showinfo("Info", "Please dropfile to folder ItemsAdder")
# if not os.path.isdir('./Oraxen_settings.yml'):
# with open('Oraxen_settings.yml', 'wb') as f:
# f.write(requests.get('https://raw.githubusercontent.com/kigkosa/itemadder-to-oraxen/master/Oraxen_settings.yml').content)
self.progress['value'] = 0
if len(os.listdir('./ItemsAdder'))<=0:
messagebox.showinfo("Info", "Please dropfile to folder ItemsAdder")
return 0
self.progress['value'] = 10
if os.path.isdir('./Oraxen'):
shutil.rmtree('./Oraxen')
if not os.path.isdir('./Oraxen'):
os.mkdir('./Oraxen')
os.mkdir('./Oraxen/pack')
os.mkdir('./Oraxen/pack/models')
os.mkdir('./Oraxen/pack/textures')
itemadder = './ItemsAdder/contents'
if (os.path.exists(itemadder)):
if(os.path.exists("./ItemsAdder_old")):
shutil.rmtree("./ItemsAdder_old")
shutil.copytree("./ItemsAdder","./ItemsAdder_old")
for get_conntent in os.listdir(itemadder):
# print(get_conntent)
ia_resoure_part = itemadder+"/"+get_conntent+"/resourcepack/"
if os.path.exists(ia_resoure_part+"/assets"):
ia_resoure_part = ia_resoure_part+"/assets"
for get_namespace in os.listdir(ia_resoure_part):
if not os.path.isdir('./Oraxen/pack/models/'+get_namespace):
os.mkdir('./Oraxen/pack/models/'+get_namespace)
os.mkdir('./Oraxen/pack/textures/'+get_namespace)
# get all sound
if os.path.isdir(ia_resoure_part+"/"+get_namespace+"/sounds"):
os.mkdir('./Oraxen/pack/assets')
os.mkdir('./Oraxen/pack/assets/'+get_namespace)
shutil.copytree(ia_resoure_part+"/"+get_namespace+"/sounds","./Oraxen/pack/assets/"+get_namespace+"/sounds")
shutil.copy(ia_resoure_part+"/"+get_namespace+"/sounds.json","./Oraxen/pack/assets/"+get_namespace)
# get all model json replace
for file in glob.glob(ia_resoure_part+"/"+get_namespace+"/models/"+"**/*.json", recursive = True):
get_models = file.replace('\\','/')
replace_text_json(get_models,get_namespace,get_models)
# get all model json coppy
if os.path.isdir("./Oraxen/pack/models/"+get_namespace):
shutil.rmtree("./Oraxen/pack/models/"+get_namespace)
if os.path.isdir(ia_resoure_part+"/"+get_namespace+"/models"):
shutil.copytree(ia_resoure_part+"/"+get_namespace+"/models","./Oraxen/pack/models/"+get_namespace)
# coppy textures
if os.path.isdir("./Oraxen/pack/textures/"+get_namespace):
shutil.rmtree("./Oraxen/pack/textures/"+get_namespace)
if os.path.isdir(ia_resoure_part+"/"+get_namespace+"/textures"):
shutil.copytree(ia_resoure_part+"/"+get_namespace+"/textures","./Oraxen/pack/textures/"+get_namespace)
self.progress['value'] = 30
# check namespace config file
ia_config_name = itemadder+"/"+get_conntent+"/configs"
for get_config_name in os.listdir(ia_config_name):
if not get_config_name.endswith('.yml'):
ia_config_name = ia_config_name+"/"+get_config_name
# check categories item
categories = []
items = []
for get_config in os.listdir(ia_config_name):
with open(ia_config_name+"/"+get_config,encoding="utf-8") as file:
documents = yaml.full_load(file)
if 'categories' in documents:
for key in list(documents['categories']):
categories = documents['categories'][key]['items']
if 'items' in documents:
for key in list(documents['items']):
items.append(key)
for item in items:
if documents["info"]["namespace"]+":"+item in categories:
categories.remove(documents["info"]["namespace"]+":"+item)
if len(categories)>0:
messagebox.showerror("Error", "\n".join(categories))
return
for get_config in os.listdir(ia_config_name):
with open(ia_config_name+"/"+get_config,encoding="utf-8") as file:
documents = yaml.full_load(file)
if 'items' in documents:
if not os.path.exists("./Oraxen/items"):
os.mkdir('./Oraxen/items')
for key in list(documents['items']):
documents['items'][key]['Pack'] = documents['items'][key].pop('resource')
documents['items'][key]['displayname'] = "\"<White>"+color_to_hex(documents['items'][key].pop('display_name').title() )+"\""
documents['items'][key]['Pack']['generate_model'] = documents['items'][key]['Pack'].pop('generate')
if 'suggest_in_command' in documents['items'][key] :
documents['items'][key].pop('suggest_in_command')
for key in list(documents['items']):
if 'lore' in documents['items'][key]:
lore = documents['items'][key].pop('lore')
l = []
for v in lore:
l.append(color_to_hex(v))
documents['items'][key]['lore'] = l
if documents['items'][key]['Pack']['generate_model'] == False:
documents['items'][key]['material'] = documents['items'][key]['Pack'].pop('material').upper()
if 'behaviours' in documents['items'][key]:
if 'furniture' in documents['items'][key]['behaviours']:
if 'entity' in documents['items'][key]['behaviours']['furniture']:
documents['items'][key]['behaviours']['furniture'].pop('entity')
documents['items'][key]['Mechanics'] = documents['items'][key].pop('behaviours')
if 'solid' in documents['items'][key]['Mechanics']['furniture'] :
if documents['items'][key]['Mechanics']['furniture']['solid'] == True:
documents['items'][key]['Mechanics']['furniture']['barrier'] = documents['items'][key]['Mechanics']['furniture']['solid']
documents['items'][key]['Mechanics']['furniture'].pop('solid')
elif documents['items'][key]['Mechanics']['furniture']['solid'] == False:
documents['items'][key]['Mechanics']['furniture']['barrier'] = documents['items'][key]['Mechanics']['furniture']['solid']
documents['items'][key]['Mechanics']['furniture'].pop('solid')
else:
documents['items'][key]['Mechanics']['furniture']['barrier'] = False
else:
documents['items'][key]['Mechanics']['furniture']['barrier'] = False
if 'hitbox' in documents['items'][key]['Mechanics']['furniture'] :
hbt = documents['items'][key]['Mechanics']['furniture'].pop('hitbox')
documents['items'][key]['Mechanics']['furniture']['barriers'] = hitbox(hbt['length'],hbt['width'],hbt['height'])
if 'placeable_on' in documents['items'][key]['Mechanics']['furniture'] :
pn = documents['items'][key]['Mechanics']['furniture'].pop('placeable_on')
documents['items'][key]['Mechanics']['furniture']['limited_placing'] = {}
if 'walls' in pn:
documents['items'][key]['Mechanics']['furniture']['limited_placing']['wall'] = pn['walls']
if 'floor' in pn:
documents['items'][key]['Mechanics']['furniture']['limited_placing']['floor'] = pn['floor']
if 'ceiling' in pn:
documents['items'][key]['Mechanics']['furniture']['limited_placing']['roof'] = pn['ceiling']
documents['items'][key]['Mechanics']['furniture']['limited_placing']['type'] = 'DENY'
documents['items'][key]['Mechanics']['furniture']['type'] = 'ITEM_FRAME'
documents['items'][key]['Mechanics']['furniture']['drop'] = {'silktouch': False,'loots':[{'oraxen_item':key}]}
if 'fixed_rotation' in documents['items'][key]['Mechanics']['furniture'] :
documents['items'][key]['Mechanics']['furniture'].pop('fixed_rotation')
if 'furniture_sit' in documents['items'][key]['Mechanics']:
furniture_sit = documents['items'][key]['Mechanics'].pop('furniture_sit')
documents['items'][key]['Mechanics']['furniture']['seat'] = {'height':round(furniture_sit['sit_height']-1,1)}
documents['items'][key]['Mechanics']['furniture']['barrier'] = True
documents['items'][key]['Mechanics']['furniture']['rotation'] = 90
documents['items'][key]['material'] = "PAPER"
# ROTATION to none
if documents['items'][key]['Mechanics']['furniture']['limited_placing']['wall'] is True:
documents['items'][key]['Mechanics']['furniture']['rotation'] = 'NONE'
documents['items'][key]['Mechanics']['furniture'].pop('barriers')
if 'model_id' in documents['items'][key]['Pack']:
documents['items'][key]['Pack']['custom_model_data'] = documents['items'][key]['Pack'].pop('model_id')
if 'model_path' in documents['items'][key]['Pack']:
documents['items'][key]['Pack']['model'] = documents['items'][key]['Pack'].pop('model_path')
if 'hat' in documents['items'][key]:
documents['items'][key]['Mechanics'] = {}
documents['items'][key]['Mechanics']['hat'] = {'enabled': True}
if 'behaviours' in documents['items'][key]:
if 'hat' in documents['items'][key]['behaviours']:
if documents['items'][key]['behaviours']['hat'] == True:
documents['items'][key]['behaviours'].pop('hat')
documents['items'][key].pop('behaviours')
documents['items'][key]['Mechanics'] = {}
documents['items'][key]['Mechanics']['hat'] = {'enabled': True}
if 'material' in documents['items'][key]:
if 'SHIELD' in documents['items'][key]['material'].upper():
documents['items'][key]['Pack']['blocking_model'] = get_namespace+"/"+documents['items'][key]['Pack']['model']+'_blocking'
elif 'CROSSBOW' in documents['items'][key]['material'].upper():
gnd = get_namespace+"/"+documents['items'][key]['Pack']['model']
documents['items'][key]['Pack']['firework_model'] = gnd+'_firework'
documents['items'][key]['Pack']['charged_model'] = gnd+'_charged'
documents['items'][key]['Pack']['pulling_models'] = [gnd+'_0',gnd+'_1',gnd+'_2']
elif 'BOW' in documents['items'][key]['material'].upper():
gnd = get_namespace+"/"+documents['items'][key]['Pack']['model']
documents['items'][key]['Pack']['pulling_models'] = [
gnd+'_0',
gnd+'_1',
gnd+'_2'
]
elif 'FISHING_ROD' in documents['items'][key]['material'].upper():
gnd = get_namespace+"/"+documents['items'][key]['Pack']['model']
documents['items'][key]['Pack']['cast_model'] = gnd+'_cast'
documents['items'][key]['Pack']['model'] = get_namespace+"/"+documents['items'][key]['Pack']['model']
else:
if 'specific_properties' in documents['items'][key]:
if 'model_id' in documents['items'][key]['Pack']:
documents['items'][key]['Pack']['custom_model_data'] = documents['items'][key]['Pack'].pop('model_id')
if 'armor' in documents['items'][key]['specific_properties']:
namespace_split = get_namespace.split("_")[0]
list_type_arror = {"chest":"chestplate","legs":"leggings","feet":"boots","head":"helmet"}
name_sp = key
for x_list_type_arror,key_x_list_type_arror in list_type_arror.items():
name_sp = name_sp.replace(key_x_list_type_arror,'')
name_sp = name_sp.replace(x_list_type_arror,'')
# namespace_split = name_sp
# print(f"Oraxen/pack/textures/{get_namespace}/armor/{namespace_split}_{list_type_arror[documents['items'][key]['specific_properties']['armor']['slot']]}.png")
name_sp = name_sp.replace('_','')
if(not os.path.exists(f'Oraxen/pack/textures/{get_namespace}/armors')):
os.makedirs(f'Oraxen/pack/textures/{get_namespace}/armors')
armor_part = os.path.dirname(documents['items'][key]['Pack']['textures'][0])
_s_key = documents['items'][key.lower()]['specific_properties']['armor']['slot'].lower()
os.rename(f"Oraxen/pack/textures/{get_namespace}/"+documents['items'][key]['Pack']['textures'][0],f"Oraxen/pack/textures/{get_namespace}/{armor_part}/{name_sp}_{list_type_arror[_s_key]}.png")
shutil.move(f"Oraxen/pack/textures/{get_namespace}/{armor_part}/{name_sp}_{list_type_arror[_s_key]}.png",f'Oraxen/pack/textures/{get_namespace}/armors')
documents['items'][key]['Pack']['parent_model']= "item/generated"
a_text = get_namespace+"/"+f"armors/{name_sp}_{list_type_arror[_s_key]}.png"
print(a_text)
documents['items'][key]['Pack']['textures'] = [a_text,a_text]
documents['items'][key]['material'] = "LEATHER_"+list_type_arror[_s_key].upper()
nv = a_text.split("/")[2].split("_")[0]
# replace name armor
colors = []
texture_size = 16
for na in documents['armors_rendering']:
hex = documents['armors_rendering'][na]['color'].lstrip('#')
colors = tuple(int(hex[i:i+2], 16) for i in (0, 2, 4))
if(os.path.exists(f"Oraxen/pack/textures/{get_namespace}/"+documents['armors_rendering'][na]['layer_1']+'.png')):
get_part = documents['armors_rendering'][na]['layer_1'].split('/')
get_part.pop()
get_part = '/'.join(get_part)
print(name_sp)
os.rename(f"Oraxen/pack/textures/{get_namespace}/"+documents['armors_rendering'][na]['layer_1']+'.png', f"Oraxen/pack/textures/{get_namespace}/{get_part}/{name_sp}_armor_layer_1.png")
shutil.move(f"Oraxen/pack/textures/{get_namespace}/{get_part}/{name_sp}_armor_layer_1.png",f'Oraxen/pack/textures/{get_namespace}/armors')
if(os.path.exists(f"Oraxen/pack/textures/{get_namespace}/"+documents['armors_rendering'][na]['layer_2']+'.png')):
get_part = documents['armors_rendering'][na]['layer_2'].split('/')
get_part.pop()
get_part = '/'.join(get_part)
print(name_sp)
os.rename(f"Oraxen/pack/textures/{get_namespace}/"+documents['armors_rendering'][na]['layer_2']+'.png', f"Oraxen/pack/textures/{get_namespace}/{get_part}/{name_sp}_armor_layer_2.png")
shutil.move(f"Oraxen/pack/textures/{get_namespace}/{get_part}/{name_sp}_armor_layer_2.png",f'Oraxen/pack/textures/{get_namespace}/armors')
documents['items'][key]['color'] = f"{colors[0]}, {colors[1]}, {colors[2]}"
if os.path.exists(f"Oraxen/pack/textures/{get_namespace}/{armor_part}/{namespace_split}_armor_layer_1.png"):
mode_to_bpp = {"1": 1, "L": 8, "P": 8, "RGB": 24, "RGBA": 32, "CMYK": 32, "YCbCr": 24, "LAB": 24, "HSV": 24, "I": 32, "F": 32}
im = Image.open(f"Oraxen/pack/textures/{get_namespace}/{armor_part}/{namespace_split}_armor_layer_1.png")
texture_size = mode_to_bpp[im.mode]
for del_fd in os.listdir(f"Oraxen/pack/textures/{get_namespace}"):
if os.path.isdir(f"Oraxen/pack/textures/{get_namespace}/{del_fd}"):
di = os.listdir(f"Oraxen/pack/textures/{get_namespace}/{del_fd}")
if len(di) == 0:
shutil.rmtree(f"Oraxen/pack/textures/{get_namespace}/{del_fd}")
# "Oraxen/settings.yml" red file yml
# if not os.path.exists(f"Oraxen/settings.yml"):
# with open("Oraxen_settings.yml",'r') as f:
# data = yaml.load(f, Loader=yaml.FullLoader)
# data['Pack']['generation']['armor_resolution'] = texture_size
# with open(f"Oraxen/settings.yml",'w') as f:
# yaml.dump(data, f)
else:
# gen 2d item
if 'model_id' in documents['items'][key]['Pack']:
documents['items'][key]['Pack']['custom_model_data'] = documents['items'][key]['Pack'].pop('model_id')
documents['items'][key]['material'] = documents['items'][key]['Pack'].pop('material').upper()
for tr in range(len(documents['items'][key]['Pack']['textures'])):
documents['items'][key]['Pack']['textures'][tr] = get_namespace+'/'+documents['items'][key]['Pack']['textures'][tr]
if 'SHIELD' in documents['items'][key]['material'].upper():
documents['items'][key]['Pack']['blocking_model'] = documents['items'][key]['Pack']['textures'][0]+'_blocking'
documents['items'][key]['Pack']['parent_model'] = "item/shield"
with open(f"Oraxen/pack/models/{documents['items'][key]['Pack']['blocking_model']}.json", "w") as f:
f.write('{"parent":"builtin/entity","gui_light":"front","textures":{"particle":"'+documents['items'][key]['Pack']['blocking_model']+'"},"display":{"thirdperson_righthand":{"rotation":[45,135,0],"translation":[3.51,11,-2],"scale":[1,1,1]},"thirdperson_lefthand":{"rotation":[45,135,0],"translation":[13.51,3,5],"scale":[1,1,1]},"firstperson_righthand":{"rotation":[0,180,-5],"translation":[-15,5,-11],"scale":[1.25,1.25,1.25]},"firstperson_lefthand":{"rotation":[0,180,-5],"translation":[5,5,-11],"scale":[1.25,1.25,1.25]},"gui":{"rotation":[15,-25,-5],"translation":[2,3,0],"scale":[0.65,0.65,0.65]}}}')
elif 'CROSSBOW' in documents['items'][key]['material'].upper():
gnd = documents['items'][key]['Pack']['textures'][0]
documents['items'][key]['Pack']['charged_model'] = gnd+'_charged'
documents['items'][key]['Pack']['firework_model'] = gnd+'_firework'
documents['items'][key]['Pack']['pulling_models'] = [gnd+'_0',gnd+'_1',gnd+'_2']
documents['items'][key]['Pack']["parent_model"] = "item/crossbow"
for tr in documents['items'][key]['Pack']['pulling_models']:
if (not os.path.exists('Oraxen/pack/models/'+get_namespace)):
os.makedirs('Oraxen/pack/models/'+get_namespace)
with open(f"Oraxen/pack/models/{tr}.json", "w") as f:
f.write('{"parent":"minecraft:item/crossbow","textures":{"layer0":"'+tr+'"}}')
elif 'BOW' in documents['items'][key]['material'].upper():
gnd = documents['items'][key]['Pack']['textures'][0]
documents['items'][key]['Pack']["parent_model"] = "item/bow"
documents['items'][key]['Pack']['pulling_models'] = [
gnd+'_0',
gnd+'_1',
gnd+'_2'
]
for tr in documents['items'][key]['Pack']['pulling_models']:
if (not os.path.exists('Oraxen/pack/models/'+get_namespace)):
os.makedirs('Oraxen/pack/models/'+get_namespace)
with open(f"Oraxen/pack/models/{tr}.json", "w") as f:
f.write('{"parent":"minecraft:item/bow","textures":{"layer0":"'+tr+'"}}')
elif 'FISHING_ROD' in documents['items'][key]['material'].upper():
gnd = documents['items'][key]['Pack']['textures'][0]
documents['items'][key]['Pack']['cast_model'] = gnd+'_cast'
documents['items'][key]['Pack']["parent_model"] = "item/handheld_rod"
with open(f"Oraxen/pack/models/{gnd}_cast.json", "w") as f:
f.write('{"parent":"minecraft:item/fishing_rod","textures":{"layer0":"'+gnd+'_cast"}}')
for key in list(documents['items']):
if 'specific_properties' in documents['items'][key]:
if 'armor' in documents['items'][key]['specific_properties']:
print(key)
vv = documents['items'].pop(key)
nv = a_text.split("/")[2].split("_")[0]
nk = name_sp+'_'+list_type_arror[vv['specific_properties']['armor']['slot'].lower()]
documents['items'][nk] = vv
documents['items'][nk].pop('specific_properties')
get_file = get_config
with open(r'Oraxen\\items\\'+get_conntent+'_'+get_file, 'w') as file:
documents = yaml.dump(documents['items'], file, Dumper=YmlDumper, default_flow_style=False)
with open(r'Oraxen\\items\\'+get_conntent+'_'+get_file, 'r') as file :
filedata = file.read()
filedata = filedata.replace("'", '')
with open(r'Oraxen\\items\\'+get_conntent+'_'+get_file, 'w') as file:
file.write(filedata)
print("Convet file "+get_file)
self.GLabel_225["text"] = "Convet file "+get_file
elif 'font_images' in documents:
data_icon = {}
get_namespace = documents['info']['namespace']
for key in list(documents['font_images']):
_emoji = (documents['font_images'][key]['path']+".png").replace(".png.png",".png")
im = Image.open('Oraxen/pack/textures/'+get_namespace+"/"+_emoji)
width, height = im.size
data_icon[key] = {
'height': documents['font_images'][key]['scale_ratio'],
# 'height': height,
'ascent': documents['font_images'][key]['y_position'],
'texture': get_namespace+"/"+_emoji
}
if 'scale_ratio' not in documents['font_images'][key]:
if height<=64:
data_icon[key]['is_emoji']= True
else:
data_icon[key]['height']= height
if 'symbol' in documents['font_images'][key]:
data_icon[key]['char'] = documents['font_images'][key]['symbol']
if not os.path.exists(r"Oraxen\\glyphs"):
os.makedirs(r"Oraxen\\glyphs")
g_name_file = (get_conntent+'_'+get_config).replace(get_conntent+"_"+get_conntent,get_conntent)
with open(r'Oraxen\\glyphs\\'+g_name_file, 'w',encoding="utf-8") as file:
documents = yaml.dump(data_icon, file, Dumper=YmlDumper, default_flow_style=False, encoding='utf-8', allow_unicode=True)
# r"Oraxen\\pack\\models" check file count 0
if os.path.exists(r"Oraxen\\pack\\models"):
if len(os.listdir(r"Oraxen\\pack\\models"))==0:
shutil.rmtree(r"Oraxen\\pack\\models")
# mege file
data = ''
for get_file_ox in glob.glob(r'Oraxen\\items\\'+get_conntent+"_**.yml"):
with open(get_file_ox, 'r') as file :
data += file.read()
os.remove(get_file_ox)
with open(r'Oraxen\\items\\'+get_conntent+".yml", 'w') as file:
file.write(data)
self.progress['value'] = 100
if (os.path.exists('./ItemsAdder')):
shutil.rmtree("./ItemsAdder")
time.sleep(2)
if (os.path.exists('./ItemsAdder_old')):
os.rename('./ItemsAdder_old','./ItemsAdder')
messagebox.showinfo("Info", "convert success")
class YmlDumper(yaml.Dumper):
def increase_indent(self, flow=False, indentless=False):
return super(YmlDumper, self).increase_indent(flow, False)
# replace text json to oraxen
def replace_text_json(dir,namespce,filename):
if filename.endswith(".json"):
with open(dir, 'r') as file :
filedata = file.read()
filedata = filedata.replace(namespce+":", namespce+'/')
with open(dir, 'w') as file:
file.write(filedata)
print("replace "+dir)
def rename_keys(dict_, new_keys):
d1 = dict( zip( list(dict_.keys()), new_keys) )
return {d1[oldK]: value for oldK, value in dict_.items()}
def color_to_hex(bb):
color = {'4':'AA0000','c':'FF5555','6':'FFAA00','e':'FFFF55','2':'00AA00','a':'55FF55','b':'55FFFF','3':'00AAAA','1':'0000AA','9':'5555FF','d':'FF55FF','5':'AA00AA','f':'FFFFFF','7':'AAAAAA','8':'555555','0':'000000'}
tex = {'l':'bond','k':'obfuscated','m':'strikethrough','n':'u','o':'italic','r':'reset'}
h_co_s = {'§'+str(co):'#'+v for co,v in color.items()}
h_co_s.update({'§'+str(co):v for co,v in tex.items()})
h_co_and = {'&'+str(co):'#'+v for co,v in color.items()}
h_co_and.update({'&'+str(co):v for co,v in tex.items()})
for v,c in h_co_s.items():
bb=bb.replace(v,'<'+c+'>')
for v,c in h_co_and.items():
bb=bb.replace(v,'<'+c+'>')
return bb
def hitbox(length,width,height):
da = []
for le in range(length):
for wi in range(width):
for he in range(height):
da.append("{ x: "+str(wi)+", y: "+str(he)+", z: "+str(le)+" }")
return da
if __name__ == "__main__":
root = tk.Tk()
app = App(root)
root.mainloop()