Package org.spout.api.geo.cuboid

Examples of org.spout.api.geo.cuboid.Block.translate()


      for (Block block : this.blocksToDestroy) {
        material = block.getMaterial();

        if (material == VanillaMaterials.AIR) {
          if (fire) {
            BlockMaterial below = block.translate(BlockFace.BOTTOM).getMaterial();
            if (below.getShape() != null && GenericMath.getRandom().nextInt(3) == 0) {
              block.setMaterial(VanillaMaterials.FIRE);
            }
          }
        } else if (material != VanillaMaterials.FIRE) {
View Full Code Here


              firstSapling = world.getBlock(x + xx, y, z + zz);
            }
          }
        }
      }
      if (saplingCount > 3 && firstSapling.translate(1, 0, 1).isMaterial(Sapling.JUNGLE)
          && firstSapling.translate(0, 0, 1).isMaterial(Sapling.JUNGLE)
          && firstSapling.translate(1, 0, 0).isMaterial(Sapling.JUNGLE)) {
        pos = firstSapling;
        tree = new HugeTreeObject();
      } else {
View Full Code Here

            }
          }
        }
      }
      if (saplingCount > 3 && firstSapling.translate(1, 0, 1).isMaterial(Sapling.JUNGLE)
          && firstSapling.translate(0, 0, 1).isMaterial(Sapling.JUNGLE)
          && firstSapling.translate(1, 0, 0).isMaterial(Sapling.JUNGLE)) {
        pos = firstSapling;
        tree = new HugeTreeObject();
      } else {
        tree = new SmallTreeObject();
View Full Code Here

          }
        }
      }
      if (saplingCount > 3 && firstSapling.translate(1, 0, 1).isMaterial(Sapling.JUNGLE)
          && firstSapling.translate(0, 0, 1).isMaterial(Sapling.JUNGLE)
          && firstSapling.translate(1, 0, 0).isMaterial(Sapling.JUNGLE)) {
        pos = firstSapling;
        tree = new HugeTreeObject();
      } else {
        tree = new SmallTreeObject();
        tree.setTreeType(TreeObject.TreeType.JUNGLE);
View Full Code Here

      }

      // Get power level for this fire
      firePower = 0;
      for (BlockFace face : BlockFaces.NESWBT) {
        BlockMaterial mat = sBlock.translate(face).getMaterial();
        if (mat instanceof Burnable) {
          firePower = Math.max(firePower, ((Burnable) mat).getBurnPower());
        }
      }
      if (firePower == 0) {
View Full Code Here

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.