Package org.spout.vanilla.material.block

Examples of org.spout.vanilla.material.block.Directional


  public void setBlockMaterial(int xx, int yy, int zz, BlockMaterial material, short data) {
    final Vector3f transformed = transform(xx, yy, zz);
    position.getWorld().setBlockMaterial(transformed.getFloorX(), transformed.getFloorY(), transformed.getFloorZ(),
        material, data, null);
    if (material instanceof Directional) {
      final Directional directional = (Directional) material;
      final Block block = position.getWorld().getBlock(transformed);
      final BlockFace face = directional.getFacing(block);
      if (face != BlockFace.BOTTOM && face != BlockFace.TOP) {
        directional.setFacing(block, BlockFace.fromYaw(face.getDirection().getAxesAngleDeg().getY()
            + rotation.getAxesAngleDeg().getY()));
      }
    } else if (material instanceof Attachable) {
      final Attachable attachable = (Attachable) material;
      final Block block = position.getWorld().getBlock(transformed);
View Full Code Here

TOP

Related Classes of org.spout.vanilla.material.block.Directional

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.