Examples of canMirroredRotate()


Examples of org.getspout.spoutapi.material.CustomBlock.canMirroredRotate()

              rot = (2 - (rot/90)) % 4;
              if (rot < 0) {
                rot += 4;
              }
              byte rotation;
              if (cb.canMirroredRotate() && mirrored) {
                rotation = cb.canRotate() ? (byte) (rot + 4) : 4;
              } else {
                rotation = cb.canRotate() ? (byte) rot : 0;
              }
              mm.overrideBlock(block, cb, rotation);
View Full Code Here

Examples of org.getspout.spoutapi.material.CustomBlock.canMirroredRotate()

                }
                player.playSound(player.getLocation(), Sound.DIG_STONE, 1.0F, 0.7936508F);
                player.updateInventory();
                // Now we have placed a nice custom block! We should check its rotation and rotate the base block!
                if (cb.canRotate()) {
                  if (cb.canMirroredRotate() && mirrored) {
                    if (block.getType() == Material.LEVER || block.getType() == Material.TORCH || block.getType() == Material.STONE_BUTTON || block.getType() == Material.WOOD_BUTTON) {
                      // The below Types need a slightly different data value to assign correct positioning.
                      if (event.getBlockFace() == BlockFace.UP) {
                        block.setData((byte) 5);
                      } else if (event.getBlockFace() == BlockFace.DOWN) {
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.