Package erogenousbeef.core.multiblock

Examples of erogenousbeef.core.multiblock.MultiblockValidationException


    throw new MultiblockValidationException(String.format("%d, %d, %d - fuel rods may only be placed in the reactor interior", xCoord, yCoord, zCoord));
  }

  @Override
  public void isGoodForBottom() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - fuel rods may only be placed in the reactor interior", xCoord, yCoord, zCoord));
  }
View Full Code Here


  @Override
  public void isGoodForInterior() throws MultiblockValidationException {
    // Check above and below. Above must be fuel rod or control rod.
    TileEntity entityAbove = this.worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
    if(!(entityAbove instanceof TileEntityReactorFuelRod || entityAbove instanceof TileEntityReactorControlRod)) {
      throw new MultiblockValidationException(String.format("Fuel rod at %d, %d, %d must be part of a vertical column that reaches the entire height of the reactor, with a control rod on top.", xCoord, yCoord, zCoord));
    }

    // Below must be fuel rod or the base of the reactor.
    TileEntity entityBelow = this.worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
    if(entityBelow instanceof TileEntityReactorFuelRod) {
      return;
    }
    else if(entityBelow instanceof RectangularMultiblockTileEntityBase) {
      ((RectangularMultiblockTileEntityBase)entityBelow).isGoodForBottom();
      return;
    }
   
    throw new MultiblockValidationException(String.format("Fuel rod at %d, %d, %d must be part of a vertical column that reaches the entire height of the reactor, with a control rod on top.", xCoord, yCoord, zCoord));
  }
View Full Code Here

    this.writeData(data);
  }
 
  @Override
  public void isGoodForFrame() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - Redstone ports may only be placed on a reactor's external side faces, not as part of the frame", xCoord, yCoord, zCoord));
  }
View Full Code Here

  public void isGoodForSides() throws MultiblockValidationException {
  }

  @Override
  public void isGoodForTop() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - Redstone ports may only be placed on a reactor's external side faces, not the top", xCoord, yCoord, zCoord));
  }
View Full Code Here

    throw new MultiblockValidationException(String.format("%d, %d, %d - Redstone ports may only be placed on a reactor's external side faces, not the top", xCoord, yCoord, zCoord));
  }

  @Override
  public void isGoodForBottom() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - Redstone ports may only be placed on a reactor's external side faces, not the bottom", xCoord, yCoord, zCoord));
  }
View Full Code Here

    throw new MultiblockValidationException(String.format("%d, %d, %d - Redstone ports may only be placed on a reactor's external side faces, not the bottom", xCoord, yCoord, zCoord));
  }

  @Override
  public void isGoodForInterior() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - Redstone ports may not be placed in a reactor's interior", xCoord, yCoord, zCoord));
  }
View Full Code Here

  @Override
  public void isGoodForFrame() throws MultiblockValidationException {
    int metadata = this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord);
    if(BlockReactorPart.isCasing(metadata)) { return; }
   
    throw new MultiblockValidationException(String.format("%d, %d, %d - Only casing may be used as part of a reactor's frame", xCoord, yCoord, zCoord));
  }
View Full Code Here

    // All parts are valid for the bottom, by default
  }

  @Override
  public void isGoodForInterior() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - This reactor part may not be placed in the reactor's interior", xCoord, yCoord, zCoord));
  }
View Full Code Here

  public TileEntityTurbinePartGlass() {
  }

  @Override
  public void isGoodForFrame() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%s, %s, %s - Glass cannot be used as part of a turbine's frame", xCoord, yCoord, zCoord));
  }
View Full Code Here

  public void isGoodForBottom() throws MultiblockValidationException {
  }

  @Override
  public void isGoodForInterior() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%s, %s, %s - Glass can only be used as part of a turbine's exterior", xCoord, yCoord, zCoord));
  }
View Full Code Here

TOP

Related Classes of erogenousbeef.core.multiblock.MultiblockValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.