Small fixes

This commit is contained in:
Raoul Van den Berge
2016-05-22 18:28:41 +02:00
parent 0c59813f1d
commit 2eee23431a
2 changed files with 3 additions and 11 deletions

View File

@@ -15,14 +15,6 @@ public class BasicItemHandler extends ItemStackHandler {
this.validators = validators;
}
public TileEntity getTile() {
return tile;
}
public IItemValidator[] getValidators() {
return validators;
}
public BasicItemHandler(int size, IItemValidator... validators) {
this(size, null, validators);
}
@@ -34,15 +26,16 @@ public class BasicItemHandler extends ItemStackHandler {
for (IItemValidator validator : validators) {
if (validator.valid(stack)) {
mayInsert = true;
break;
}
}
if (mayInsert) {
return super.insertItem(slot, stack, simulate);
} else {
return stack;
}
return stack;
}
@Override

View File

@@ -76,7 +76,6 @@ public class TileExternalStorage extends TileMachine implements IStorageProvider
} else {
IItemHandler handler = getItemHandler();
// @TODO: Something goes wrong here
if (handler != null) {
ItemHandlerHelper.insertItem(handler, stack, false);
}