Ejemplo n.º 1
0
 private boolean RenderWarheadInWorld(
     RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block) {
   if (world.getBlockMetadata(x, y, z) != 12
       && world.getBlockMetadata(x, y, z) != 0
       && world.getBlockMetadata(x, y, z) != 15) {
     block.setBlockBounds(0.1F, 0.0F, 0.1F, 0.9F, 0.7F, .9F);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0.2F, 0.7F, 0.2F, 0.8F, 0.9F, 0.8F);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0.3F, 0.9F, 0.3F, 0.7F, 1F, 0.7F);
     renderer.renderStandardBlock(block, x, y, z);
   } else {
     block.setBlockBounds(0.0F, 0.0F, 0F, 1F, 0.1F, 1F);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0F, 0.1F, 0F, 1F, 1F, .1F);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0F, 0.1F, 0.9F, 1F, 1F, 1F);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0F, 0.1F, 0.1F, 0.1F, 1F, 0.9F);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0.9F, 0.1F, 0.1F, 1F, 1F, .9F);
     renderer.renderStandardBlock(block, x, y, z);
   }
   block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
   return true;
 }
Ejemplo n.º 2
0
  private boolean RenderMissileInWorld(
      RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block) {
    block.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 1.0F, .9375F);
    renderer.renderStandardBlock(block, x, y, z);
    block.setBlockBounds(0.4375F, 0.75F, 0.0625F, 0.5625F, 0F, 0F);
    renderer.renderStandardBlock(block, x, y, z);
    block.setBlockBounds(0.4375F, 0.75F, 1.0F, 0.5625F, 0F, 0.9375F);
    renderer.renderStandardBlock(block, x, y, z);
    block.setBlockBounds(1.0F, 0.75F, 0.4375F, 0.9375F, 0F, 0.5625F);
    renderer.renderStandardBlock(block, x, y, z);
    block.setBlockBounds(.0625F, 0.75F, 0.4375F, 0F, 0F, 0.5625F);
    renderer.renderStandardBlock(block, x, y, z);

    block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    return true;
  }
Ejemplo n.º 3
0
 private boolean RenderMachineInWorld(
     RenderBlocks renderer, IBlockAccess world, int x, int y, int z, Block block) {
   if (world.getBlockMetadata(x, y, z) < 4) {
     block.setBlockBounds(0.0F, 0.0F, 0.0F, 1F, 1F, 1F);
     renderer.renderStandardBlock(block, x, y, z);
   } else if (world.getBlockMetadata(x, y, z) == 4) {
     block.setBlockBounds(0, 0, 0, 1, 0.5f, 1);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0.25f, 0.5f, 0.25f, 0.75f, 0.625f, 0.75f);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0.625f, 0.625f, 0.625f, 0.375f, 1, 0.375f);
     renderer.renderStandardBlock(block, x, y, z);
   } else if (world.getBlockMetadata(x, y, z) == 5) {
     block.setBlockBounds(0, 0, 0, 1, 0.125f, 1);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0.625f, .125f, 0.625f, 0.375f, 0.375f, 0.375f);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0, 0.375f, 0, 1, 0.5f, 1);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0, 0.5f, 0.875f, 1, 0.875f, 1);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0, 0.5f, 0, 1, 0.875f, 0.125f);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0, 0.5f, 0.875f, 1, 0.875f, 1);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0, 0.5f, 0.125f, 0.125f, 0.875f, 0.875f);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0.875f, 0.5f, 0.125f, 1, 0.875f, 0.875f);
     renderer.renderStandardBlock(block, x, y, z);
     block.setBlockBounds(0.375f, 0.5f, 0.375f, 0.625f, 1, 0.625f);
     renderer.renderStandardBlock(block, x, y, z);
   }
   return true;
 }