fix for format_slot
This commit is contained in:
parent
8d371e094b
commit
f9d16eddf5
1 changed files with 2 additions and 2 deletions
|
@ -63,9 +63,9 @@ def format_item(item:dict, compact=False, nbt:bool=False) -> str:
|
||||||
if not item:
|
if not item:
|
||||||
return "[ ]"
|
return "[ ]"
|
||||||
item_id = f"{item['id']:03d}"
|
item_id = f"{item['id']:03d}"
|
||||||
item_count = f"{item['count']}x" if 'count' in item else ''
|
item_count = f"{item['count']}x" if item['count'] > 1 else ''
|
||||||
item_damage = f"|{item['damage']:03d}" if 'damage' in item else ''
|
item_damage = f"|{item['damage']:03d}" if 'damage' in item else ''
|
||||||
item_nbt = item['nbt'].pretty() if 'nbt' in item else ''
|
item_nbt = item['nbt'].pretty() if item['nbt'] else ''
|
||||||
if compact:
|
if compact:
|
||||||
return f"[{item_id:03d}]"
|
return f"[{item_id:03d}]"
|
||||||
if nbt:
|
if nbt:
|
||||||
|
|
Loading…
Reference in a new issue