Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix item_name component not work; Improve display of custom effects and shulker box tooltips for item names #5255

Merged
merged 7 commits into from
Jan 5, 2025

Conversation

BUGTeas
Copy link
Contributor

@BUGTeas BUGTeas commented Dec 30, 2024

(Test in 1.21.4)

item_name Compoment (Issues since 6bd60d4)

/give @s grass_block[item_name="TestName"]

Version 2.6.0-b739 (git-master-623ec2b):
image

After this fixes:
image

Custom effects display

/give @s potion[potion_contents={custom_effects:[{id:"hero_of_the_village",duration:-1},{id:"unluck",amplifier:1,duration:140},{id:"jump_boost",amplifier:5,duration:658980}]}]

Version 2.6.0-b739 (git-master-623ec2b):
image

After this fixes:
image

To resolve "No Effects" under the effects information, make it a custom item, or use the potion tag to base it on the vanilla potion.

Use hide_additional_tooltip component to hide custom effects information:

/give @s potion[potion_contents={custom_effects:[{id:"hero_of_the_village",duration:-1},{id:"unluck",amplifier:1,duration:140},{id:"jump_boost",amplifier:5,duration:658980}]},hide_additional_tooltip={}]
image

Custom name in potion_contents

Put on an item frame: potion[potion_contents={custom_name:"healing"}]

Version 2.6.0-b739 (git-master-623ec2b):
image

After this fixes:
image

Shulker box tooltips

Putting these in a shulker box:

Any written book:
image

Any item with colored name ([custom_name='{"text":"GreenName","color":"green"}']):
image

Any item with custom_name inside potion_contents ([potion_contents={custom_name:"healing"}])
image

Version 2.6.0-b739 (git-master-623ec2b):
image

  • Title of Written book not display
  • Count display (e.g., x16) with incorrect color due to some items with colored names
  • custom_name inside potion_contents always show incorrect white color

After this fixes:
image

@rtm516
Copy link
Member

rtm516 commented Jan 4, 2025

Does this also fix maps in frames showing their name when looked at even though it's still default?

@BUGTeas
Copy link
Contributor Author

BUGTeas commented Jan 5, 2025

Does this also fix maps in frames showing their name when looked at even though it's still default?

It should already be fixed in the current master since 030b935.

@onebeastchris onebeastchris merged commit a19f030 into GeyserMC:master Jan 5, 2025
2 checks passed
@onebeastchris
Copy link
Member

Thanks for the PR!

@BUGTeas
Copy link
Contributor Author

BUGTeas commented Jan 5, 2025

Thanks for review!

@BUGTeas BUGTeas deleted the info-display-optimize branch January 9, 2025 17:09
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.

4 participants