Package Hexel.blocks.rules

Source Code of Hexel.blocks.rules.SeedRule

package Hexel.blocks.rules;

import Hexel.blocks.BlockDelta;
import Hexel.blocks.BlockRule;
import Hexel.blocks.BlockSimulator;
import Hexel.blocks.BlockSimulator.BlockDeltaAdder;
import Hexel.blocks.types.Block;
import Hexel.blocks.types.BlockWood;
import Hexel.blocks.types.BlockWoodData;
import Hexel.chunk.Chunk;
import Hexel.chunk.Chunks;
import Hexel.chunk.HighestBlockChunk;
import Hexel.math.Vector3i;
import Hexel.util.Container;

public class SeedRule implements BlockRule {
 
  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;
  }
}
TOP

Related Classes of Hexel.blocks.rules.SeedRule

TOP
Copyright © 2018 www.massapi.com. 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.