Package org.spout.vanilla.data

Examples of org.spout.vanilla.data.MoveReaction


  public boolean extend(Block block) {
    int length = this.getExtendableLength(block);
    if (length != -1) {
      if (length > 0) {
        BlockFace facing = this.getFacing(block);
        MoveReaction reac;

        //the previous material
        BlockMaterial prevMat = VanillaMaterials.PISTON_EXTENSION;
        short prevData = (short) (block.getBlockData() & 0x7);
        Block previous = block.translate(facing);
View Full Code Here


   * @return Pushable block count, -1 if the amount exceeds the limit
   */
  public int getExtendableLength(Block block) {
    final int maxlength = 13;
    BlockFace face = this.getFacing(block);
    MoveReaction reaction;
    for (int i = 0; i < maxlength; i++) {
      block = block.translate(face);
      reaction = getReaction(block);
      if (reaction == MoveReaction.DENY) {
        return -1; //blocked
View Full Code Here

TOP

Related Classes of org.spout.vanilla.data.MoveReaction

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.