for (PaintingType paintingType : PaintingType.values()) {
if (paintingType.canBePlaced(block, against)) {
list.add(paintingType);
}
}
PaintingType paintingType = list.get(GenericMath.getRandom().nextInt(list.size() - 1));
Entity e = world.createEntity(paintingType.getCenter(against, block.getPosition()), Painting.class);
Painting painting = e.add(Painting.class);
painting.setType(paintingType);
painting.setFace(against);
world.spawnEntity(e);
}