mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #2164
This commit is contained in:
parent
e52d062ef5
commit
34b82d7a6f
@ -31,6 +31,7 @@
|
||||
|
||||
#### Fixes
|
||||
* Fixed Programmable Androids rotating in the wrong direction
|
||||
* Fixed #2164
|
||||
|
||||
## Release Candidate 15 (01 Aug 2020)
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user