Package Hexel.blocks.types

Examples of Hexel.blocks.types.BlockWoodData


    else if (b instanceof BlockStone){
      return BlockStone.Make(newHealth);
    }
    else if (b instanceof BlockWood){
      BlockWood bw = (BlockWood)b;
      return BlockWood.Make(new BlockWoodData(newHealth, bw.data.level, bw.data.branchLevel, bw.data.branches, bw.data.alive));
    }
    else{
      try {
        throw new Exception("can't update health, unknown block type");
      } catch (Exception e) {
View Full Code Here


  private Vector3i tmp3i = new Vector3i();
 
  @Override
  public int run(int bx, int by, int bz, boolean fastMode, Block b, Chunk c,
      HighestBlockChunk hbc, Chunks chunks, int step, BlockDeltaAdder blockDeltaAdder) {
    BlockWood woodBlock = BlockWood.Make(new BlockWoodData(BlockWood.MAX_HEALTH, 0, 0, 0, true));
    blockDeltaAdder.addBlockDelta(BlockDelta.Aquire(bx, by, bz, woodBlock, chunks.getStepsToSim(bx, by, bz, tmp3i, c)));
    return BlockSimulator.DONT_RUN;
  }
View Full Code Here

          }

          BlockWood grownWB;
          BlockWood newWB;
          if (isBranch){
            grownWB = BlockWood.Make(new BlockWoodData(BlockWood.MAX_HEALTH, wb.data.level+1, wb.data.branchLevel+1, 0, true));
            newWB = BlockWood.Make(new BlockWoodData(BlockWood.MAX_HEALTH, wb.data.level, wb.data.branchLevel, wb.data.branches+1, true));
          }
          else {
            grownWB = BlockWood.Make(new BlockWoodData(BlockWood.MAX_HEALTH, wb.data.level+1, wb.data.branchLevel, 0, true));
            newWB = BlockWood.Make(new BlockWoodData(BlockWood.MAX_HEALTH, wb.data.level, wb.data.branchLevel, wb.data.branches, true));
          }
          blockDeltaAdder.addBlockDelta(BlockDelta.Aquire(nx, ny, nz, grownWB, chunks.getStepsToSim(bx, by, bz, tmp3i, c)));
          blockDeltaAdder.addBlockDelta(BlockDelta.Aquire(bx, by, bz, newWB, chunks.getStepsToSim(bx, by, bz, tmp3i, c)));
          return BlockSimulator.DONT_RUN;
        }
View Full Code Here

TOP

Related Classes of Hexel.blocks.types.BlockWoodData

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.