Package crazypants.render

Examples of crazypants.render.BoundingBox


  }

  @Override
  public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {

    BoundingBox bb = BoundingBox.UNIT_CUBE;
    TranslatedCubeRenderer.instance.renderBoundingBox(x, y, z, block, bb, xform, null, world != null);

    Tessellator.instance.addTranslation(x, y, z);

    IIcon icon = EnderIO.blockAttractor.getOnIcon();
View Full Code Here


    return attackera;
  }

  private AxisAlignedBB getKillBounds() {
    if(killBounds == null) {
      BoundingBox bb = new BoundingBox(getLocation());
      Vector3d min = bb.getMin();
      Vector3d max = bb.getMax();
      max.y += Config.killerJoeAttackHeight;
      min.y -= Config.killerJoeAttackHeight;

      ForgeDirection facingDir = ForgeDirection.getOrientation(facing);
      if(ForgeDirectionOffsets.isPositiveOffset(facingDir)) {
View Full Code Here

    return killBounds;
  }

  private AxisAlignedBB getHooverBounds() {
    if(hooverBounds == null) {
      BoundingBox bb = new BoundingBox(getLocation());
      Vector3d min = bb.getMin();
      Vector3d max = bb.getMax();
      max.y += Config.killerJoeAttackHeight;
      min.y -= Config.killerJoeAttackHeight;

      ForgeDirection facingDir = ForgeDirection.getOrientation(facing);
      if(ForgeDirectionOffsets.isPositiveOffset(facingDir)) {
View Full Code Here

  }

  @Override
  public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {

    BoundingBox bb = BoundingBox.UNIT_CUBE;

    Tessellator.instance.startDrawingQuads();

    IIcon[] textures = RenderUtil.getBlockTextures(block, metadata);
View Full Code Here

    GL11.glEnable(GL11.GL_ALPHA_TEST);
    Block block = EnderIO.blockTank;
    int meta = item.getItemDamage();
   
    IIcon[] icons = RenderUtil.getBlockTextures(block, meta);
    BoundingBox bb = BoundingBox.UNIT_CUBE.translate(0, -0.1f, 0);
    Tessellator.instance.startDrawingQuads();
    CubeRenderer.render(bb, icons, null, RenderUtil.getDefaultPerSideBrightness());
    Tessellator.instance.draw();

  }
View Full Code Here

      powerPerTick = Config.attractorPowerPerTickLevelOne;
      break;
    }
    rangeSqu = range * range;

    BoundingBox bb = new BoundingBox(new BlockCoord(this));
    bb = bb.scale(range, range, range);
    attractorBounds = AxisAlignedBB.getBoundingBox(bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ);
    capacitor = new BasicCapacitor(powerPerTick * 8, capacitorType.capacitor.getMaxEnergyStored(), powerPerTick);
  }
View Full Code Here

      RenderUtil.bindBlockTexture();
      Tessellator tes = Tessellator.instance;
      tes.startDrawingQuads();

      float fullness = (float) (tank.getFluidAmount()) / (tank.getCapacity());
      BoundingBox bb = BoundingBox.UNIT_CUBE.scale(0.85, 0.96, 0.85);
      bb = bb.scale(1, 0.85 * fullness, 1);
      float ty = -(0.85f - (bb.maxY - bb.minY)) / 2;

      Vector3d offset = ForgeDirectionOffsets.offsetScaled(ForgeDirection.values()[gen.facing], -0.075);
      bb = bb.translate((float) offset.x, ty, (float) offset.z);

      int brightness;
      if(gen.getWorldObj() == null) {
        brightness = 15 << 20 | 15 << 4;
      } else {
View Full Code Here

   
    VertexRotation rot = new VertexRotation(Math.toRadians(yaw), new Vector3d(0,1,0), new Vector3d(0.5,0,0.5));
   
    float size = 0.25f;
    float height = 0.5f;
    BoundingBox bb = new BoundingBox(size, 0, size, 1 - size, height, 1 - size);
    CubeRenderer.render(bb, icons, rot, true);
   
    if(meta > 1) {
      renderBolts(rot, size);
    }
View Full Code Here

    return true;
  }

  private void renderBolts(VertexRotation rot, float size) {
    BoundingBox bb;
    float boltSize = size/3;
    BoundingBox baseBolt = BoundingBox.UNIT_CUBE.scale(boltSize ,boltSize , boltSize);
    IIcon icon = EnderIO.blockSoulFuser.getIcon(ForgeDirection.EAST.ordinal(), 0);
   
    float offset = 0.15f;
    bb = baseBolt.translate(size + boltSize/2, -0.15f, offset);
    CubeRenderer.render(bb, icon, rot, true);
    bb = baseBolt.translate(size + boltSize/2, -0.15f, -offset);
    CubeRenderer.render(bb, icon, rot, true);
   
    bb = baseBolt.translate( -(size + boltSize/2), -0.15f, offset);
    CubeRenderer.render(bb, icon, rot, true);
    bb = baseBolt.translate( -(size + boltSize/2), -0.15f, -offset);
    CubeRenderer.render(bb, icon, rot, true);
   
   
    bb = baseBolt.translate( -offset, -0.15f, -(size + boltSize/2));
    CubeRenderer.render(bb, icon, rot, true);
    bb = baseBolt.translate( offset, -0.15f, -(size + boltSize/2));
    CubeRenderer.render(bb, icon, rot, true);
   
    bb = baseBolt.translate( offset, -0.15f, (size + boltSize/2));
    CubeRenderer.render(bb, icon, rot, true);
    bb = baseBolt.translate( -offset, -0.15f, (size + boltSize/2));
    CubeRenderer.render(bb, icon, rot, true);
  }
View Full Code Here

   

    RenderUtil.bindBlockTexture();
    CustomRenderBlocks rb = new CustomRenderBlocks(te.getWorldObj());
    double scale = 0.88;
    BoundingBox pushPullBounds = BoundingBox.UNIT_CUBE.scale(scale, scale, scale);
    BoundingBox disabledBounds = BoundingBox.UNIT_CUBE.scale(1.01, 1.01, 1.01);
   
    for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      IoMode mode = trans.getIoMode(dir);
      if(mode != null) {
        if(mode == IoMode.DISABLED) {
View Full Code Here

TOP

Related Classes of crazypants.render.BoundingBox

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.