Example #1
0
  public boolean flip(final SchematicWorld world, final EnumFacing axis, final boolean forced) {
    if (world == null) {
      return false;
    }

    try {
      final ISchematic schematic = world.getSchematic();
      final Schematic schematicFlipped = flip(schematic, axis, forced);

      world.setSchematic(schematicFlipped);

      for (final TileEntity tileEntity : world.getTileEntities()) {
        world.initializeTileEntity(tileEntity);
      }

      return true;
    } catch (final FlipException fe) {
      Reference.logger.error(fe.getMessage());
    } catch (final Exception e) {
      Reference.logger.fatal("Something went wrong!", e);
    }

    return false;
  }