mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-27 12:35:17 +01:00
Fix for egg drop amount.
This commit is contained in:
parent
1af4f54a6a
commit
50e4cdef31
@ -70,7 +70,10 @@ public class EntityListeners implements Listener {
|
||||
EntityStack stack = stackManager.getStack(entity);
|
||||
|
||||
ItemStack item = event.getEntity().getItemStack();
|
||||
int amount = (stack.getAmount() - 1) + item.getAmount();
|
||||
item.setAmount(Math.min((stack.getAmount() - 1) + item.getAmount(), item.getMaxStackSize()));
|
||||
if (amount > item.getMaxStackSize())
|
||||
UltimateStacker.updateItemAmount(event.getEntity(), amount);
|
||||
event.getEntity().setItemStack(item);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user