Package erogenousbeef.bigreactors.common.multiblock.tileentity

Examples of erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbineRotorBearing


    else if(metadata == METADATA_FLUIDPORT) {
      return new TileEntityTurbineFluidPort();
    }
    else if(metadata == METADATA_BEARING) {
      // Does jack-all different except for store display lists on the client
      return new TileEntityTurbineRotorBearing();
    }
    else if(metadata == METADATA_COMPUTERPORT) {
      return new TileEntityTurbineComputerPort();
    }
    else {
View Full Code Here


    {
      int metadata = world.getBlockMetadata(x, y, z);
      if(metadata == METADATA_BEARING) {
          TileEntity te = world.getTileEntity(x, y, z);
          if(te instanceof TileEntityTurbineRotorBearing) {
            TileEntityTurbineRotorBearing bearing = (TileEntityTurbineRotorBearing)te;
            if(bearing.isConnected() && bearing.getTurbine().getActive()) {
              return bearing.getAABB();
            }
          }
      }
     
    return super.getCollisionBoundingBoxFromPool(world, x, y, z);
View Full Code Here

  RenderBlocks renderBlocks = new RenderBlocks();
 
  @Override
  public void renderTileEntityAt(TileEntity tileentity, double x, double y,
      double z, float f) {
    TileEntityTurbineRotorBearing bearing = (TileEntityTurbineRotorBearing)tileentity;
   
    if(bearing == null || !bearing.isConnected()) { return; }
   
    MultiblockTurbine turbine = bearing.getTurbine();
   
    if(!turbine.isAssembled() || !turbine.getActive() || !turbine.hasGlass()) { return; }
   
    Integer displayList = bearing.getDisplayList();
    ForgeDirection rotorDir = bearing.getOutwardsDir().getOpposite();
   
    if(displayList == null) {
      RotorInfo info = bearing.getRotorInfo();
      displayList = generateRotor(info);
      bearing.setDisplayList(displayList);
    }
   
    float angle = bearing.getAngle();
    long elapsedTime = Minecraft.getSystemTime() - ClientProxy.lastRenderTime;
   
    float speed = turbine.getRotorSpeed();
    if(speed > 0.001f) {
      angle += speed * ((float)elapsedTime / 60000f) * 360f; // RPM * time in minutes * 360 degrees per rotation
      angle = angle % 360f;
      bearing.setAngle(angle);
    }

    GL11.glPushMatrix();
    GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
    GL11.glEnable(GL11.GL_CULL_FACE);
View Full Code Here

   
    if(!this.isAssembled()) {
      return ForgeDirection.UNKNOWN;
    }
   
    TileEntityTurbineRotorBearing rotorBearing = attachedRotorBearings.iterator().next();
    return rotorBearing.getOutwardsDir().getOpposite();
  }
View Full Code Here

TOP

Related Classes of erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbineRotorBearing

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.