public class DemoBlockEntity extends BlockEntity implements ImplementedContainer, WorldlyContainer{ [...] @Override public int[] getSlotsForFace(Direction side) { // Just return an array of all slots return IntStream.of(getItems().size()).toArray(); } @Override public boolean canPlaceItemThroughFace(int slot, ItemStack stack, Direction direction) { return direction != Direction.UP; } @Override public boolean canTakeItemThroughFace(int slot, ItemStack stack, Direction direction) { return true; } }