Skip to content

add item_name property#2838

Open
creaturesofhabit wants to merge 1 commit into
DenizenScript:devfrom
creaturesofhabit:item-component
Open

add item_name property#2838
creaturesofhabit wants to merge 1 commit into
DenizenScript:devfrom
creaturesofhabit:item-component

Conversation

@creaturesofhabit

Copy link
Copy Markdown

For https://discord.com/channels/315163488085475337/1362329776475603057. Works as expected on 26.2 and 26.1.

Considered mentioning this property in the item.display documentation since this is probably to be preferred for most use-cases, but didn't want to mess with other files.

@tal5 tal5 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also feel like the meta could explain how this works in relation to ItemTag.display better? But I don't really have any rewrite suggestions so it could be fine as-is for now


@Override
public ElementTag toDenizen(Component value) {
return new ElementTag(LegacyComponentSerializer.legacyAmpersand().serialize(value));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These would lose all advanced text formatting, you want the methods from PaperModule here (and in the other method)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants