Respect item pickup delay
This commit is contained in:
parent
3ee46ccf9a
commit
768e111660
@ -85,7 +85,9 @@ 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());
|
||||
Item item = Item.class.cast(entity);
|
||||
if (item.getPickupDelay() == 0) {
|
||||
p.getInventory().addItem(item.getItemStack());
|
||||
entity.remove();
|
||||
}
|
||||
}
|
||||
@ -93,6 +95,7 @@ public class ChairEffects {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},0,1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user