紧急更新,修复安卓无法使用的小bug

This commit is contained in:
2023-04-30 21:57:14 +08:00
parent 5d48fcd96a
commit 8aa503710d
5 changed files with 19 additions and 4 deletions

View File

@ -19,6 +19,6 @@ Terms & Conditions: ../License.md
from .main import *
__version__ = "0.5.0.1"
__version__ = "0.5.0.2"
__all__ = []
__author__ = (("金羿", "Eilles Wan"), ("诸葛亮与八卦阵", "bgArray"), ("鸣凤鸽子", "MingFengPigeon"))

View File

@ -1592,6 +1592,8 @@ class midiConvert:
:param player: 玩家选择器,默认为`@a`
:return 成功与否,成功返回(True,未经过压缩的源,结构占用大小),失败返回(False,str失败原因)
"""
from TrimMCStruct import Structure
if self.enable_old_exe_format:
raise CommandFormatError("使用mcstructure结构文件导出时不支持旧版本的指令格式。")

View File

@ -1,7 +1,6 @@
import math
import os
from TrimMCStruct import Structure, Block, TAG_Long, TAG_Byte
bdx_key = {
"x": [b"\x0f", b"\x0e", b"\x1c", b"\x14", b"\x15"],
@ -241,6 +240,7 @@ def form_note_block_in_NBT_struct(
:return Block
"""
from TrimMCStruct import Block, TAG_Byte
return Block(
"minecraft",
"noteblock",
@ -270,6 +270,8 @@ def form_repeater_in_NBT_struct(
:param facing:
:param delay: 1~4
:return Block()"""
from TrimMCStruct import Block
return Block(
"minecraft",
@ -338,6 +340,9 @@ def form_command_block_in_NBT_struct(
:return:str
"""
from TrimMCStruct import Block, TAG_Long
return Block(
"minecraft",
"command_block"
@ -384,6 +389,9 @@ def commands_to_structure(
:return 成功与否,成功返回(结构类,结构占用大小),失败返回(False,str失败原因)
"""
from TrimMCStruct import Structure
_sideLength = bottem_side_length_of_smallest_square_bottom_box(
len(commands), max_height
)