Custom edible items can't stop being used by players other than the host
Partner Rank:
2
Verification builds:
1.17.30.20
Summary:
Custom edible items can't stop being used by players other than the host.
Impact:
The obvious impact is that it makes custom foods sometimes annoying to use in multiplayer and can lead to accidental uses.
However, this is not limited to just items meant to be used as food:
Our best option to detect when the player is holding down the Use Item input (and I mean holding, not just detecting when they start using) is for the player to hold a custom, edible item with a large use duration, then using q.is_using_item or other item-use-related queries to tell if the item is being eaten.
This is useful for things like custom bows, or any sort of item-use detection that doesn't require experimental features. We can even have the game perform different actions based on whether the input is tapped or held.
This bug makes these items unreliable and annoying to use in multiplayer settings, always behaving as if it's being held.
This bug affects one of our maps currently in development, for two separate items.
Repro Steps:
- Enter the attached world in multiplayer, with another person
- Have the Player 2 hold the "Usable Item (1s)" item and TAP the Use Item input
- Have the Player 2 hold the "Usable Item (24h)" item and Hold the Use Item input for a second.
Observed Results:
Step 2: Player 2 eats the item anyway. Chat says Using Item: True followed by Using Item: False 1 second later.
Step 3: Player 2 does not technically stop eating the item even though they let go of that input. Chat says Using Item: True and does not say False until the player switches to another hotbar slot (or 24 hours have passed)
Expected Results:
**In both occasions, Player 2 stops using the item and the chat says False immediately after letting go of the input, just like Player 1.
Screenshots/Videos attached:
The video shows me (Player 2) trying to use all the items in my inventory (a vanilla golden apple, and two custom items with duration of 1 second and 24 hours respectively). I TAP right click to start eating the item and to stop immediately. This works for the golden apple, but for the custom items, they do not stop being used until the duration is over, or I switch to a different item.
At the end, Player 1 attempts the same with the 1s duration item and is able to stop eating without any issues.
Regression Build:
Unknown.
Notes: