Package erogenousbeef.core.multiblock

Examples of erogenousbeef.core.multiblock.MultiblockValidationException


 
  @Override
  protected void isMachineWhole() throws MultiblockValidationException {
    // Ensure that there is at least one controller and control rod attached.
    if(attachedControlRods.size() < 1) {
      throw new MultiblockValidationException("Not enough control rods. Reactors require at least 1.");
    }
   
    if(attachedControllers.size() < 1) {
      throw new MultiblockValidationException("Not enough controllers. Reactors require at least 1.");
    }
   
    super.isMachineWhole();
  }
View Full Code Here


      if(block instanceof IFluidBlock) {
        Fluid fluid = ((IFluidBlock)block).getFluid();
        String fluidName = fluid.getName();
        if(ReactorInterior.getFluidData(fluidName) != null) { return; }

        throw new MultiblockValidationException(String.format("%d, %d, %d - The fluid %s is not valid for the reactor's interior", x, y, z, fluidName));
      }
      else {
        throw new MultiblockValidationException(String.format("%d, %d, %d - %s is not valid for the reactor's interior", x, y, z, block.getLocalizedName()));
      }
    }
    else {
      throw new MultiblockValidationException(String.format("%d, %d, %d - Null block found, not valid for the reactor's interior", x, y, z));
    }
  }
View Full Code Here

  }

  @Override
  public void isGoodForFrame() throws MultiblockValidationException {
    if(getBlockMetadata() != BlockTurbinePart.METADATA_HOUSING) {
      throw new MultiblockValidationException(String.format("%d, %d, %d - only turbine housing may be used as part of the turbine's frame", xCoord, yCoord, zCoord));
    }
  }
View Full Code Here

  }

  @Override
  public void isGoodForInterior() throws MultiblockValidationException {
    if(getBlockMetadata() != BlockTurbinePart.METADATA_HOUSING) {
      throw new MultiblockValidationException(String.format("%d, %d, %d - this part is not valid for the interior of a turbine", xCoord, yCoord, zCoord));
    }
  }
View Full Code Here

public class TileEntityReactorGlass extends TileEntityReactorPartBase {

  @Override
  public void isGoodForFrame()  throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - Reactor glass may only be used on the exterior faces, not as part of a reactor's frame or interior", xCoord, yCoord, zCoord));
  }
View Full Code Here

  public void isGoodForBottom() throws MultiblockValidationException {
  }

  @Override
  public void isGoodForInterior() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - Reactor glass may only be used on the exterior faces, not as part of a reactor's frame or interior", xCoord, yCoord, zCoord));
  }
View Full Code Here

  }
 
  // TileEntityReactorPart
  @Override
  public void isGoodForFrame() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - Control rods may only be placed on the top face", xCoord, yCoord, zCoord));
  }
View Full Code Here

    throw new MultiblockValidationException(String.format("%d, %d, %d - Control rods may only be placed on the top face", xCoord, yCoord, zCoord));
  }

  @Override
  public void isGoodForSides() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - Control rods may only be placed on the top face", xCoord, yCoord, zCoord));
  }
View Full Code Here

  @Override
  public void isGoodForTop() throws MultiblockValidationException {
    // Check that the space below us is a fuel rod
    TileEntity teBelow = this.worldObj.getTileEntity(xCoord, yCoord - 1, zCoord);
    if(!(teBelow instanceof TileEntityReactorFuelRod)) {
      throw new MultiblockValidationException(String.format("%d, %d, %d - Control rods may only be placed on the top face, atop a column of fuel rods", xCoord, yCoord, zCoord));
    }
  }
View Full Code Here

    }
  }

  @Override
  public void isGoodForBottom() throws MultiblockValidationException {
    throw new MultiblockValidationException(String.format("%d, %d, %d - Control rods may only be placed on the top face", 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.