Java Code Examples for cn.nukkit.math.BlockFace#fromHorizontalIndex()
The following examples show how to use
cn.nukkit.math.BlockFace#fromHorizontalIndex() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BlockDoor.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x07); }
Example 2
Source File: BlockEnderChest.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x07); }
Example 3
Source File: BlockHayBale.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x07); }
Example 4
Source File: BlockBanner.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x7); }
Example 5
Source File: BlockChest.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x7); }
Example 6
Source File: BlockRedstoneRepeaterPowered.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getFacing() { return BlockFace.fromHorizontalIndex(getDamage()); }
Example 7
Source File: BlockBone.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x7); }
Example 8
Source File: BlockBed.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x7); }
Example 9
Source File: BlockRedstoneComparator.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getFacing() { return BlockFace.fromHorizontalIndex(this.getDamage()); }
Example 10
Source File: BlockPumpkin.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x7); }
Example 11
Source File: Entity.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public BlockFace getHorizontalFacing() { return BlockFace.fromHorizontalIndex(NukkitMath.floorDouble((this.yaw * 4.0F / 360.0F) + 0.5D) & 3); }
Example 12
Source File: BlockTerracottaGlazed.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x07); }
Example 13
Source File: BlockStairs.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x7); }
Example 14
Source File: BlockRedstoneComparator.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getFacing() { return BlockFace.fromHorizontalIndex(this.getDamage()); }
Example 15
Source File: BlockObserver.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x07); }
Example 16
Source File: BlockDispenser.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x07); }
Example 17
Source File: BlockNetherPortal.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x07); }
Example 18
Source File: BlockAnvil.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getBlockFace() { return BlockFace.fromHorizontalIndex(this.getDamage() & 0x7); }
Example 19
Source File: BlockRedstoneRepeaterUnpowered.java From Nukkit with GNU General Public License v3.0 | 4 votes |
@Override public BlockFace getFacing() { return BlockFace.fromHorizontalIndex(getDamage()); }
Example 20
Source File: BlockTrapdoor.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public BlockFace getFacing() { int[] faces = {3, 1, 0, 2}; return BlockFace.fromHorizontalIndex(faces[this.getDamage() & 0x03]); }