mojira.dev
MC-134399

Creative mode itemDropThreshold is not considered in all situations

The bug

Creative mode has an item drop threshold (NetHandlerPlayServer.itemDropThreshold), but the problem is that this is not considered for all cases.

Currently it is only used when the player throws item out of the creative inventory tabs or when the "Survival Inventory" is open. Other cases like throwing items from the hotbar, or items created when interacting with entities, containers are closed, etc. are not considered.

How to reproduce

  1. Ensure you are in Creative mode

  2. Put a few stacks of items in your hotbar

  3. Hold "q" while hovering your mouse cursor over an item stack
    → ✔ Eventually, the item drop rate is throttled (you may need to drop multiple stacks before this happens)

  4. Close your inventory

  5. Hold "q" while an item stack is in your main hand
    → ❌ All items are thrown at a rapid rate; the threshold was not considered

Attachments

Comments 3

Confirmed in 1.16.1 and 20w29a.

I'm not quite sure what the expected result is here, and what I should be looking for when I try and reproduce the issue. "the treshold was not considered" is a bit vague to me, could you clarify?

Here is my own test of the issue:
All items are thrown as expected, I'm not sure what's functionally incorrect:

[media]

marcono1234

(Unassigned)

Confirmed

Player

item-dropping

Minecraft 1.13, 19w39a, 1.15.1, 1.16.1, 20w29a, 1.21.10

Retrieved