mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Missed updating one onBreak() in AFarm.java
This commit is contained in:
parent
a876301d94
commit
692904ffc3
@ -117,10 +117,13 @@ public abstract class AFarm extends SlimefunItem {
|
||||
|
||||
@Override
|
||||
public boolean onBreak(Player p, Block b, SlimefunItem item, UnregisterReason reason) {
|
||||
BlockMenu inv = BlockStorage.getInventory(b);
|
||||
if (inv != null) {
|
||||
for (int slot: getOutputSlots()) {
|
||||
if (BlockStorage.getInventory(b).getItemInSlot(slot) != null) {
|
||||
b.getWorld().dropItemNaturally(b.getLocation(), BlockStorage.getInventory(b).getItemInSlot(slot));
|
||||
BlockStorage.getInventory(b).replaceExistingItem(slot, null);
|
||||
if (inv.getItemInSlot(slot) != null) {
|
||||
b.getWorld().dropItemNaturally(b.getLocation(), inv.getItemInSlot(slot));
|
||||
inv.replaceExistingItem(slot, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user