Skip to content

Commit

Permalink
Fixed Black Hole controller refilling items that were different, closes
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Feb 2, 2019
1 parent 61b2f35 commit 5f5bfee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public boolean canInsertItem(int slot, ItemStack stack) {
return false;
if (input.getLocked())
return input.getFilterStack(slot).isItemEqual(stack) && ItemStack.areItemStackTagsEqual(stack, input.getFilterStack(slot));
if (!output.getStackInSlot(slot).isEmpty() && (!output.getStackInSlot(slot).isItemEqual(stack) || !ItemStack.areItemStackTagsEqual(stack, input.getFilterStack(slot))))
if (!output.getStackInSlot(slot).isEmpty() && (!output.getStackInSlot(slot).isItemEqual(stack) || !ItemStack.areItemStackTagsEqual(stack, output.getStackInSlot(slot))))
return false;
ItemStack contained = blackHoleUnitBlock.getItemStack(storage.getStackInSlot(slot));
if (stack.isItemEqual(contained) && ItemStack.areItemStackTagsEqual(stack, contained)) return true;
Expand Down Expand Up @@ -155,7 +155,7 @@ protected void innerUpdate() {
if (output.getStackInSlot(i).getCount() >= output.getStackInSlot(i).getMaxStackSize()) continue;
int amount = blackHoleUnitBlock.getAmount(stack);
ItemStack s = blackHoleUnitBlock.getItemStack(stack);
if (!s.isEmpty()) {
if (!s.isEmpty() && output.getStackInSlot(i).isItemEqual(s) && ItemStack.areItemStackTagsEqual(output.getStackInSlot(i), s)) {
ItemStack out = output.getStackInSlot(i);
if (out.isEmpty()) { // Slot is empty
out = s.copy();
Expand Down

0 comments on commit 5f5bfee

Please sign in to comment.