implement clear for modifiable IItemHandlers
@@ -82,6 +82,11 @@ public int getSize() {
@Override
public void clear() {
+ if (this.inventory instanceof IItemHandlerModifiable) {
+ for (int i = 0; i < this.inventory.getSlots(); i++) {
+ ((IItemHandlerModifiable) this.inventory).setStackInSlot(i, ItemStack.EMPTY);
+ }
+ }
}
@Override
