Skip to content

[Bug]: nbt标签中自定义名称display获取不到 #315

@Sbaoor-fly

Description

@Sbaoor-fly

Describe the bug

{
Count: 1,
Damage: 0,
Name: 'minecraft:wind_charge',
WasPickedUp: 0,
tag: { RepairCost: 0, display: undefined }
}

改过名字的物品toObject(),display显示undefend

To Reproduce

console.log(pl.getHand().getNbt().toObject())

Expected behavior

toString()
可以读出来
{
"Count": 1,
"Damage": 0,
"Name": "minecraft:stone_sword",
"WasPickedUp": 0,
"tag": {
"Damage": 4,
"RepairCost": 1,
"display": {
"Name": "改名字的剑"
},
"ench": [
{ "id": 17, "lvl": 3 }
]
}
}

Screenshots

No response

Platform

win10

BDS Version

Game version 1.21.93-1.819+b7557d7

LeviLamina Version

with LeviLamina-1.4.2.

LegacyScriptEngine Version

legacy-script-engine-nodejs v0.13.1

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions