更新一下,马上回来

This commit is contained in:
EillesWan 2021-11-24 13:46:45 +08:00
parent 2f6c0e23d7
commit 061d8bfa96
27 changed files with 238 additions and 22 deletions

View File

@ -896,7 +896,7 @@ def __main__():
def world2RyStruct():
outdir = tkinter.filedialog.askdirectory(title='请选择世界文件夹生成的位置', initialdir=r'./');
outdir = tkinter.filedialog.askdirectory(title='请选择世界文件夹所在的位置', initialdir=r'./');
if outdir == None or outdir == '':
return;
else:
@ -1219,13 +1219,13 @@ def __main__():
# 创建其他功能菜单
otherMenu = tk.Menu(main_menu_bar, tearoff=0)
otherMenu.add_command(label=u"生成符合当前音乐的函数播放器…", command=MakeFuncPlayer)
worldmenu.add_separator();
otherMenu.add_separator();
otherMenu.add_command(label=u"将选中音轨以指令存储生成.bdx文件…", command=toScbBDXfile)
otherMenu.add_command(label=u"由地图导出至.bdx文件…", command=world2BDX)
otherMenu.add_command(label=u"由地图导出至.RyStruct文件…", command=world2RyStruct)
worldmenu.add_separator();
worldmenu.add_command(label=u"将函数载入世界…", command=func2World);
worldmenu.add_command(label=u"将大函数分割并建立执行链…", command=bigFunc2World);
otherMenu.add_separator();
otherMenu.add_command(label=u"将函数载入世界…", command=func2World);
otherMenu.add_command(label=u"将大函数分割并建立执行链…", command=bigFunc2World);
main_menu_bar.add_cascade(label=u"辅助功能", menu=otherMenu);
@ -1389,7 +1389,7 @@ def __main__():
# 进入窗口消息循环
root.mainloop()
log("退出")
del filemenu, editmenu, helpmenu
del filemenu, editmenu, helpmenu, otherMenu
exitapp()

Binary file not shown.

View File

@ -1,3 +0,0 @@
12:37:45 更新执行位置当前文件位置F:\W-YI\Programming\音·创\程序\Musicreater.py
12:37:45 启动root.mainloop窗口
12:38:04 程序正常退出

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -99,7 +99,7 @@ class report():
class version:
libraries = ('mido','amulet','amulet-core','amulet-nbt','piano_transcription_inference','pypinyin','briefcase','toga','pyinstaller','kivy','py7zr')
libraries = ('mido','amulet','amulet-core','amulet-nbt','piano_transcription_inference','pypinyin','briefcase','toga','pyinstaller','kivy','py7zr','websockets')
'''当前所需库,有一些是开发用的,用户不需要安装'''
version = ('0.0.4.2','Beta',)

View File

@ -55,7 +55,7 @@ def formCmdBlock(direction:list,command:str,particularValue:int,impluse:int,cond
def note2bdx(filePath:str,dire:list,Notes : list,ScoreboardName:str,Instrument:str, PlayerSelect:str='',isProsess:bool=False) :
def note2bdx(filePath:str,dire:list,Notes : list,ScoreboardName:str,Instrument:str, PlayerSelect:str='',isProsess:bool=False,height:int = 200) :
'''使用方法同Note2Cmd
:param 参数说明
filePath: 生成.bdx文件的位置
@ -65,6 +65,7 @@ def note2bdx(filePath:str,dire:list,Notes : list,ScoreboardName:str,Instrument:s
Instrument: 播放的乐器
PlayerSelect: 执行的玩家选择器
isProsess: 是否显示进度条会很卡
height: 生成结构的最高高度
:return 返回一个BdxConverter类实际上没研究过同时在指定位置生成.bdx文件'''
@ -84,11 +85,11 @@ def note2bdx(filePath:str,dire:list,Notes : list,ScoreboardName:str,Instrument:s
blocks = [formCmdBlock(dire,cdl.pop(0),1,1)]
dire[1]+=1;
for j in cdl:
if dire[1]+i > 200:
if dire[1]+i > height:
dire[0]+=1
i=0
down = not down
if dire[1]+i == 200 :
if dire[1]+i == height :
blocks.append(formCmdBlock([dire[0],dire[1]+i,dire[2]],j,5,2,False,False))
else:
if down:
@ -97,7 +98,7 @@ def note2bdx(filePath:str,dire:list,Notes : list,ScoreboardName:str,Instrument:s
blocks.append(formCmdBlock([dire[0],dire[1]+i,dire[2]],j,1,2,False,False))
i+=1
del i, cdl, down, cmd
return BdxConverter(filePath,'RyounMusicreater',blocks)
return BdxConverter(filePath,'Build by RyounMusicreater',blocks)

Binary file not shown.

View File

@ -200,12 +200,12 @@ def Blocks2World(world:str,dire:list,Datas:list):
from nmcsup.const import Blocks
level = amulet.load_level(world)
i = 0
def setblock(block:Block,pos:list):
def setblock(block:str,pos:list):
'''pos : list[int,int,int]'''
cx, cz = block_coords_to_chunk_coords(pos[0], pos[2])
chunk = level.get_chunk(cx, cz, "minecraft:overworld")
offset_x, offset_z = pos[0] - 16 * cx, pos[2] - 16 * cz
chunk.blocks[offset_x, pos[1], offset_z] = level.block_palette.get_add_block(block)
chunk.blocks[offset_x, pos[1], offset_z] = level.block_palette.get_add_block(Block("minecraft",block))
chunk.changed = True
for j in Datas:
if dire[1]+1 >= 255:

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1 +0,0 @@
MANIFEST-000089

View File

@ -1 +0,0 @@
[]

Binary file not shown.

View File

@ -1 +0,0 @@
476168

Binary file not shown.

View File

@ -0,0 +1,224 @@
{
"mainset": {
"PackName": "RyounTeamSong",
"MusicTitle": "RyounUp",
"IsRepeat": false,
"PlayerSelect": ""
},
"musics": [
{
"set": {
"EntityName": "MusicSupport",
"ScoreboardName": "MusicSupport",
"Instrument": "harp",
"FileName": "RyounUp_RyounTeamSong"
},
"notes": [
[
".5",
1.0
],
[
"1",
1.0
],
[
"1",
1.0
],
[
"3",
1.5
],
[
"3",
0.5
],
[
"2",
1.5
],
[
"1",
0.5
],
[
"2",
1.0
],
[
"5",
1.0
],
[
"3",
1.5
],
[
"2",
0.5
],
[
".6",
1.0
],
[
".5",
1.0
],
[
"3",
1.5
],
[
"2",
0.5
],
[
"1",
1.0
],
[
"5",
1.0
],
[
"5",
1.0
],
[
"6",
0.5
],
[
"5",
0.5
],
[
"3",
1.0
],
[
"5",
0.5
],
[
"3",
0.5
],
[
"2",
1.0
],
[
"2",
1.0
],
[
"3",
0.5
],
[
"2",
0.5
],
[
"1",
1.0
],
[
"1",
1.0
],
[
"3",
1.0
],
[
"3",
1.0
],
[
"5",
1.0
],
[
"0",
1.0
],
[
".5",
0.5
],
[
".6",
0.5
],
[
"1",
1.0
],
[
"1",
1.0
],
[
"6",
1.0
],
[
"1",
1.0
],
[
"2",
1.0
],
[
"3",
1.0
],
[
"3",
1.0
],
[
"3",
1.0
],
[
"3",
1.0
],
[
"2",
1.0
],
[
"5",
1.5
],
[
".5",
0.5
],
[
"1",
1.0
],
[
"1",
1.0
],
[
"0",
1.0
],
[
"0",
1.0
]
]
}
]
}

Binary file not shown.

View File

@ -1 +0,0 @@
{}

Binary file not shown.

File diff suppressed because one or more lines are too long