Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7800

Dying players drop items at wrong position (breaking data packs that detect these items)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • CraftBukkit version 4195-Spigot-fcd94e2-f057cf4 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT), CraftBukkit version 4242-Spigot-0a642bd-515fe49 (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT)
    • Yes

      When a player dies in vanilla, their items drop at exactly 0.3 blocks below their eyes. This is true regardless of the player's scale attribute--items of larger players drop farther up from their feet.

      (It's very important to note this is NOT true of the player's XP or their loot table. Both XP and loot table items in vanilla do drop at the player's feet.)

      When a player dies in Spigot, their items drop at their feet instead of the vanilla position. You can test this by standing on the ground and running the following commands in order with items in your inventory. Don't move between running these.

      /fill ~-2 ~-1 ~-2 ~2 ~2 ~2 glass hollow
      /fill ~-1 ~ ~-1 ~1 ~1 ~1 white_carpet
      /kill
      

      On a vanilla server, the items land on the top layer of carpets. But with this bug, they land on the bottom layer.

      One reason this matters is that data packs in vanilla can reliably detect what items the player dropped by checking for the item entities at the position 0.3 blocks below their eyes in the same tick they died. But in Spigot servers, this doesn't work, and the items aren't detected. This breaks the latest version of the Graves data pack from Vanilla Tweaks, for example.

            Doc Doc
            GrantGryczan Grant Gryczan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: