Expected Behavior:
Attribute modifiers on items ('attribute_modifiers' component) take effect immediately when put in the correct slot, and immediately removed when taken out of the correct slot.
Actual Behavior:
Attribute modifiers have a 1-2 tick delay before taking effect when put in the correct slot, aswell as having a 1-2 tick delay when being taken out (seemingly inconsistently, but unverified).
**
To reproduce:
Give yourself any item with an 'attribute_modifiers' component and put it in the correct slot, observe that the attribute is not modified for 1-2 ticks.
This is very easily observed with an place-able item that sets 'player.block_interaction_range' to 0 via attribute modifier on the 'mainhand' slot. This item should not be place-able, however, if you switch to the item and right click in quick enough succession, you still can place the item.
Thank you for your report!
We're tracking this issue in MC-233336, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki