SPIGOT-2381: Use custom spawnreason for dropItem

Dieser Commit ist enthalten in:
md_5 2016-06-12 10:26:48 +10:00
Ursprung 1c2593826c
Commit 6cbdec1f15

Datei anzeigen

@ -328,7 +328,7 @@ public class CraftWorld implements World {
Validate.isTrue(item.getTypeId() != 0, "Cannot drop AIR.");
EntityItem entity = new EntityItem(world, loc.getX(), loc.getY(), loc.getZ(), CraftItemStack.asNMSCopy(item));
entity.pickupDelay = 10;
world.addEntity(entity);
world.addEntity(entity, SpawnReason.CUSTOM);
// TODO this is inconsistent with how Entity.getBukkitEntity() works.
// However, this entity is not at the moment backed by a server entity class so it may be left.
return new CraftItem(world.getServer(), entity);