public void setColor(CrystalElement e) {
   if (worldObj.isRemote) return;
   color = e;
   BlockArray runes = this.getRuneLocations(worldObj, xCoord, yCoord, zCoord);
   for (int i = 0; i < runes.getSize(); i++) {
     Coordinate c = runes.getNthBlock(i);
     if (c.getBlock(worldObj) == ChromaBlocks.RUNE.getBlockInstance())
       worldObj.setBlockMetadataWithNotify(c.xCoord, c.yCoord, c.zCoord, color.ordinal(), 3);
   }
 }
示例#2
0
  @Override
  public void overheat(World world, int x, int y, int z) {
    BlockArray blocks = new BlockArray();
    MachineRegistry m = this.getMachine();
    blocks.recursiveAddWithMetadata(world, x, y, z, m.getBlock(), m.getMachineMetadata());

    for (int i = 0; i < blocks.getSize(); i++) {
      Coordinate c = blocks.getNthBlock(i);
      ReikaSoundHelper.playSoundAtBlock(
          world, c.xCoord, c.yCoord, c.zCoord, "random.fizz", 0.4F, 1);
      ReikaParticleHelper.LAVA.spawnAroundBlock(world, c.xCoord, c.yCoord, c.zCoord, 36);
      c.setBlock(world, Blocks.flowing_lava);
    }
  }