This commit is contained in:
Shadows_of_Fire 2018-10-28 13:38:26 -04:00
parent 1d56bfb869
commit 2786022b26
3 changed files with 4 additions and 10 deletions

View file

@ -23,7 +23,7 @@ public class TileEntityPhantomBreaker extends TileEntityPhantomPlacer {
@Override @Override
public IAcceptor getAcceptor() { public IAcceptor getAcceptor() {
return ItemStackHandlerAA.ACCEPT_FALSE; return (slot, stack, automation) -> !automation;
} }
@Override @Override
@ -31,4 +31,4 @@ public class TileEntityPhantomBreaker extends TileEntityPhantomPlacer {
return ItemStackHandlerAA.REMOVE_TRUE; return ItemStackHandlerAA.REMOVE_TRUE;
} }
} }

View file

@ -196,7 +196,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
@Override @Override
public IRemover getRemover() { public IRemover getRemover() {
return ItemStackHandlerAA.REMOVE_FALSE; return (slot, automation) -> !automation;
} }
@Override @Override

View file

@ -73,13 +73,7 @@ public class ItemStackHandlerAA extends ItemStackHandler {
} }
public final boolean canAccept(int slot, ItemStack stack, boolean automation) { public final boolean canAccept(int slot, ItemStack stack, boolean automation) {
IAcceptor acceptor = getAcceptor(); return getAcceptor().canAccept(slot, stack, automation);
try {
return acceptor.canAccept(slot, stack, automation);
} catch (NullPointerException e) {
e.printStackTrace();
return false;
}
} }
public final boolean canRemove(int slot, boolean automation) { public final boolean canRemove(int slot, boolean automation) {