1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00
This commit is contained in:
TheBusyBiscuit 2020-08-02 13:55:31 +02:00
parent e52d062ef5
commit 34b82d7a6f
2 changed files with 23 additions and 0 deletions

View File

@ -31,6 +31,7 @@
#### Fixes
* Fixed Programmable Androids rotating in the wrong direction
* Fixed #2164
## Release Candidate 15 (01 Aug 2020)

View File

@ -44,6 +44,28 @@ public class FluidPump extends SimpleSlimefunItem<BlockTicker> implements Invent
super(category, item, recipeType, recipe);
createPreset(this, this::constructMenu);
registerBlockHandler(getID(), (p, b, stack, reason) -> {
BlockMenu inv = BlockStorage.getInventory(b);
if (inv != null) {
for (int slot : getInputSlots()) {
if (inv.getItemInSlot(slot) != null) {
b.getWorld().dropItemNaturally(b.getLocation(), inv.getItemInSlot(slot));
inv.replaceExistingItem(slot, null);
}
}
for (int slot : getOutputSlots()) {
if (inv.getItemInSlot(slot) != null) {
b.getWorld().dropItemNaturally(b.getLocation(), inv.getItemInSlot(slot));
inv.replaceExistingItem(slot, null);
}
}
}
return true;
});
}
private void constructMenu(BlockMenuPreset preset) {