Custom item working only as intended for host
Partner Rank: 3
Partner Team Reporting:
Oreville Studios
Verification builds:
Version: 1.16.201
Build: 5131175
Summary:
When adding a custom food item into the game, and detecting the click of said item, the cooldown component along with being able to right click the item multiple times only works as intended for the host. Any other players joining the world will not see the cooldown white overlay on the hotbar, and will have to switch off the item in order to right click(use) the item again.
Impact:
Inconsistent behaviour between the host and joining players.
Repro Steps:
- Create a custom food item in the BP:
{
"format_version": "1.12.0",
"minecraft:item": {
"description": {
"identifier": "prefix:my_item"
},
"components": {
"minecraft:max_stack_size": 1,
"minecraft:food": {
"can_always_eat": true,
"cooldown_type": "chorusfruit",
"cooldown_time": 100
}
}
}
}
- Create a player animation controller to detect when clicking the item in the BP:
"controller.animation.player.item": { "initial_state": "default", "states": { "default": { "transitions": [ { "use_item": "query.get_equipped_item_name == 'my_item' && query.is_using_item" }, ] }, "use_item": { "transitions": [{ "default": "!query.is_using_item" }], "on_entry": ["/say I work!"] } } }
Observed Results:
Host can see the cooldown between using said item uses(right clicking), the host can also keep right clicking the item after each cooldown has finished to trigger the animation controller state "use_item" which then returns to "default" after player releases right click.
The player can only right click the item once and then has to switch items to use said item again, the player cannot visually see the cooldown overlay.
Expected Results:
All players have consistent behaviour. All players can keep right clicking said item and will transition between animation controller states as expected. All players can see the cooldown overlay.