Examples of VariableHeightObject


Examples of org.spout.vanilla.world.generator.object.VariableHeightObject

      if (!PlayerUtil.isCostSuppressed(entity)) {
        inv.addAmount(-1);
      }
      if (GenericMath.getRandom().nextDouble() < 0.4D) {
        final BlockMaterial mushroomType = block.getMaterial();
        final VariableHeightObject mushroom;
        if (mushroomType == VanillaMaterials.RED_MUSHROOM) {
          mushroom = new HugeMushroomObject(HugeMushroomType.RED);
        } else {
          mushroom = new HugeMushroomObject(HugeMushroomType.BROWN);
        }
        final World world = block.getWorld();
        final int x = block.getX();
        final int y = block.getY();
        final int z = block.getZ();
        if (mushroom.canPlaceObject(world, x, y, z)) {
          mushroom.placeObject(world, x, y, z);
        }
      }
    }
  }
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.