Respect item pickup delay
This commit is contained in:
parent
3ee46ccf9a
commit
768e111660
@ -85,8 +85,11 @@ public class ChairEffects {
|
|||||||
for (Entity entity : p.getNearbyEntities(1, 1, 1)) {
|
for (Entity entity : p.getNearbyEntities(1, 1, 1)) {
|
||||||
if (entity instanceof Item) {
|
if (entity instanceof Item) {
|
||||||
if (p.getInventory().firstEmpty() != -1) {
|
if (p.getInventory().firstEmpty() != -1) {
|
||||||
p.getInventory().addItem(Item.class.cast(entity).getItemStack());
|
Item item = Item.class.cast(entity);
|
||||||
entity.remove();
|
if (item.getPickupDelay() == 0) {
|
||||||
|
p.getInventory().addItem(item.getItemStack());
|
||||||
|
entity.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user