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

World.dropItemNaturally drops items at the wrong postion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • 1.21.3
    • Yes

      World.dropItemNaturally does not drop the item at a random position around the given location, but around the location + (0.5,0.5,0.5). This is quite unexpected behavior and when for example using the function to drop items at the players location the item will always be offset in positive direction and possibly be glitched into nearby walls.

       

      Also CraftBukkit itself does not expect that offset, in CraftAbstractInventoryView it tries to drop items at the players location but this will also get offset.

       

      For a fix I would suggest to remove that offset, so plugins are responsible for offsetting the location or, if it should stay like this, at least document it that the item is dropped around location + (0.5,0.5,0.5) and not around the given location (and in this case the dropping in CraftAbstractInventoryView should be fixed to be centered at the player)

            Unassigned Unassigned
            Brokkonaut Brokkonaut
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: