Respect item pickup delay

This commit is contained in:
Shevchik 2014-01-02 18:11:55 +04:00
parent 3ee46ccf9a
commit 768e111660

View File

@ -85,8 +85,11 @@ public class ChairEffects {
for (Entity entity : p.getNearbyEntities(1, 1, 1)) {
if (entity instanceof Item) {
if (p.getInventory().firstEmpty() != -1) {
p.getInventory().addItem(Item.class.cast(entity).getItemStack());
entity.remove();
Item item = Item.class.cast(entity);
if (item.getPickupDelay() == 0) {
p.getInventory().addItem(item.getItemStack());
entity.remove();
}
}
}
}