Implement ItemFactory and ItemMeta values. Adds BUKKIT-15
This commit is contained in:
@@ -283,8 +283,7 @@ public class CraftWorld implements World {
|
||||
public org.bukkit.entity.Item dropItem(Location loc, ItemStack item) {
|
||||
Validate.notNull(item, "Cannot drop a Null item.");
|
||||
Validate.isTrue(item.getTypeId() != 0, "Cannot drop AIR.");
|
||||
CraftItemStack clone = new CraftItemStack(item);
|
||||
EntityItem entity = new EntityItem(world, loc.getX(), loc.getY(), loc.getZ(), clone.getHandle());
|
||||
EntityItem entity = new EntityItem(world, loc.getX(), loc.getY(), loc.getZ(), CraftItemStack.asNMSCopy(item));
|
||||
entity.pickupDelay = 10;
|
||||
world.addEntity(entity);
|
||||
// TODO this is inconsistent with how Entity.getBukkitEntity() works.
|
||||
|
||||
Reference in New Issue
Block a user