Fix item_name
component not work; Improve display of custom effects and shulker box tooltips for item names
#5255
+85
−52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(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):
After this fixes:
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):
After this fixes:
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={}]
Custom name in
potion_contents
Put on an item frame:
potion[potion_contents={custom_name:"healing"}]
Version 2.6.0-b739 (git-master-623ec2b):
After this fixes:
Shulker box tooltips
Putting these in a shulker box:
Any written book:
Any item with colored name (
[custom_name='{"text":"GreenName","color":"green"}']
):Any item with
custom_name
insidepotion_contents
([potion_contents={custom_name:"healing"}]
)Version 2.6.0-b739 (git-master-623ec2b):
custom_name
insidepotion_contents
always show incorrect white colorAfter this fixes: