In a world with the gamerule keepInventory set to true, I've got a command block setup which teleports players who just respawned after dying, teleport them into spawn area, set the keepInventory gamerule to false, kill the player and finally turn keepInventory back to true, all of this happening in a gametick.
The player only drops the items, keeping the XP.
When doing it "slowly", the player drops the items and the XP.
Here is a set of command blocks which have to be hook up to a command block clock to reproduce the issue:
– scoreboard players set @a[score_health=0] IsDead 1
– scoreboard players set @p[score_IsDead_min=1,score_health_min=1] selected 1
– tp @p[score_selected_min=1] 0 70 0
– gamerule keepInventory false
– kill @p[score_selected_min=1]
– gamerule keepInventory true
It looks like the code to drop the xp is too "slow", at least "slower" than the one to drop items.
Comments 4
Is this still an issue in the current Minecraft Snapshot 15w46a or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
Could it be related to MC-12013 (which was fixed in 1.8.1-pre3)?