-
Bug
-
Resolution: Duplicate
-
None
-
1.15.1
-
None
-
Unconfirmed
-
(Unassigned)
How to recreate the bug:
The datapack provided has the following code:
execute as @e[type=item,nbt=\{Age:0s}] run say Age 0
execute as @e[type=item,nbt=\{Age:1s}] run say Age 1
execute as @e[type=item,nbt=\{Age:2s}] run say Age 2
execute as @e[type=item,nbt=\{Age:3s}] run say Age 3
execute as @e[type=item,nbt=\{Age:4s}] run say Age 4
Put it on a world's datapack folder and run the /reload command.
If you drop an item from your inventory in the chat will apear all numbers [0,1,2,3,4].
But if dropped by a dispenser or dropper, the chat will only show [1,2,3,4].
Thus we can conclude that the datapack code could not have selected the item in its first tick.
!!! This is an datapack context exclusive bug, if you place down a repeating command block, set to always active with the command "execute as @e[type=item,nbt=\{Age:0s}] run say Item Detected" it will succesfully show in the chat the message "[<item>] Item Detected" when an item is dropped by a dispenser/dropper.
Possible cause:
To ease the fixing of the issue, my guess is that the item from the dispenser is ticked before the datapack functions, probably in the block update of the dispenser being activated, so it can move in the direction of its randomly assinged motion tag. An easy fix would be to set age to 0 after the item ticks.
- duplicates
-
MC-117360 gameLoopFunction function runs after entities were updated while command blocks run before
- Resolved