diff --git a/Musicreater.New.py b/Musicreater.New.py index ec75b8e..79d47c1 100644 --- a/Musicreater.New.py +++ b/Musicreater.New.py @@ -35,6 +35,7 @@ A free opensource software which is used for creating all kinds of musics in Min # 下面为正文 +# 一定会好起来的 from msctspt.bugReporter import version diff --git a/msctplugin/pluginLoader.py b/msctplugin/pluginLoader.py index e0163d5..102c529 100644 --- a/msctplugin/pluginLoader.py +++ b/msctplugin/pluginLoader.py @@ -36,7 +36,7 @@ print(""" Musicreater PLUGINS Management """) - +# 准备启用中 diff --git a/msctspt/__pycache__/transfer.cpython-38.pyc b/msctspt/__pycache__/transfer.cpython-38.pyc index 88c9894..75c6980 100644 Binary files a/msctspt/__pycache__/transfer.cpython-38.pyc and b/msctspt/__pycache__/transfer.cpython-38.pyc differ diff --git a/msctspt/bdxOpera_CP.py b/msctspt/bdxOpera_CP.py index 7f00c39..a307717 100644 --- a/msctspt/bdxOpera_CP.py +++ b/msctspt/bdxOpera_CP.py @@ -7,7 +7,7 @@ import brotli class BdxConverter: __header = "BD@" __bin_header = b"BDX" - __generator_author = b"&Musicreater" + __generator_author = b"& Musicreater" keys = { # x--, x++, addSmallX(-128~127), addX(-32768~32767), addBigX(-2147483648~2147483647) @@ -16,7 +16,7 @@ class BdxConverter: "z": [b"\x13", b"\x12", b"\x1e", b"\x18", b"\x19"], "end": b"\x58", "isSigned": b"\x5a", - "placeCommandBlockWithData": b"\x1b", + "placeCommandBlockWithData": b"\x1b",#用不上 "placeBlock": b"\x07" } @@ -82,8 +82,6 @@ class BdxConverter: :return: """ _types = b"" - - for block in self.blocks: # print(f"当前方块:{block['block_name']}, 位置: {block['direction']}]") diff = self.move_pointer(self.direction, block["direction"]) @@ -182,7 +180,7 @@ class BdxConverter: :return: bytes of command_block """ - block_id = b"\x1b" + self.block_type.index(block["block_name"]).to_bytes(2, byteorder="big", signed=False) + block_id = b"\x24" particular_value = block["particular_value"].to_bytes(2, byteorder="big", signed=False) block_header = block_id + particular_value for i in [ diff --git a/msctspt/transfer.py b/msctspt/transfer.py index d392821..aa32ad1 100644 --- a/msctspt/transfer.py +++ b/msctspt/transfer.py @@ -188,6 +188,14 @@ def formCmdBlock(direction: Iterable, command: str, particularValue: int, implus "needRedstone": int #是否需要红石 1 bytes } ''' + # for particularValue, is like this + # :0 下 无条件 + # :1 上 无条件 + # :2 z轴负方向 无条件 + # :3 z轴正方向 无条件 + # :4 x轴负方向 无条件 + # :5 x轴正方向 无条件 + print(f"==[DEBUG]=={direction}: {command} {'下' if particularValue == 0 else '上' if particularValue ==1 else 'z-' if particularValue ==2 else 'z+' if particularValue==3 else 'x-' if particularValue==4 else 'x+'} {'脉冲' if impluse==0 else '循环' if impluse ==1 else '连锁'} {'有条件' if condition else '无条件'} {'需要红石' if needRedstone else '不需要红石'}") return {"direction": direction, "block_name": "command_block", "particular_value": particularValue, @@ -272,7 +280,7 @@ def music2cmdBlocks(direction: Iterable, music: dict, isProsess: bool = False, h direction = list(direction) def trackDealing(direction,track): - print('=========DEBUG=========音轨起方块:', direction) + # print('=========DEBUG=========音轨起方块:', direction) blocks = [] cmdList = classList_conversion_SinglePlayer(track['notes'], track['set']['ScoreboardName'], music['mainset']['PlayerSelect'], isProsess) @@ -298,7 +306,7 @@ def music2cmdBlocks(direction: Iterable, music: dict, isProsess: bool = False, h # :4 x轴负方向 无条件 # :5 x轴正方向 无条件 for cmd in cmdList: - print('=========DEBUG=========方块:', dire) + # print('=========DEBUG=========方块:', dire) blocks.append(formCmdBlock(dire, cmd, 5 if (down is False and dire[1] == height + direction[1]) or ( down and dire[1] == direction[1] + 1) else 0 if down else 1, 2, needRedstone=False)) if down: @@ -322,6 +330,7 @@ def music2cmdBlocks(direction: Iterable, music: dict, isProsess: bool = False, h for th in threads: allblocks += th.getResult() + print(allblocks) return allblocks diff --git a/nmcsup/__pycache__/trans.cpython-38.pyc b/nmcsup/__pycache__/trans.cpython-38.pyc index 37eb2de..0a80a12 100644 Binary files a/nmcsup/__pycache__/trans.cpython-38.pyc and b/nmcsup/__pycache__/trans.cpython-38.pyc differ diff --git a/测试用/DoYouHearThePeopleSing.bdx b/测试用/DoYouHearThePeopleSing.bdx new file mode 100644 index 0000000..22f9730 Binary files /dev/null and b/测试用/DoYouHearThePeopleSing.bdx differ diff --git a/测试用/你是否听见人民之歌.msctn b/测试用/你是否听见人民之歌.msctn new file mode 100644 index 0000000..8edabcb Binary files /dev/null and b/测试用/你是否听见人民之歌.msctn differ