Represents a block. This is a live object, and only one Block may exist for any given location in a world. The state of the block may change concurrently to your own handling of it; use block.getState() to get a snapshot state of a block which will not be modified. Note that parts of this clas
| 30 | * generation when used in cases like BlockPhysicsEvent!!!! |
| 31 | */ |
| 32 | public interface Block extends Metadatable { |
| 33 | |
| 34 | /** |
| 35 | * Gets the metadata for this block |
| 36 | * |
| 37 | * @return block specific metadata |
| 38 | * @deprecated Magic value |
| 39 | */ |
| 40 | @Deprecated |
| 41 | byte getData(); |
| 42 | |
| 43 | /** |
| 44 | * Gets the complete block data for this block |
| 45 | * |
| 46 | * @return block specific data |
| 47 | */ |
| 48 | @NotNull |
| 49 | BlockData getBlockData(); |
| 50 | |
| 51 | /** |
| 52 | * Gets the block at the given offsets |
| 53 | * |
| 54 | * @param modX X-coordinate offset |
| 55 | * @param modY Y-coordinate offset |
| 56 | * @param modZ Z-coordinate offset |
| 57 | * @return Block at the given offsets |
| 58 | */ |
| 59 | @NotNull |
| 60 | Block getRelative(int modX, int modY, int modZ); |
| 61 | |
| 62 | /** |
| 63 | * Gets the block at the given face |
| 64 | * <p> |
| 65 | * This method is equal to getRelative(face, 1) |
| 66 | * |
| 67 | * @param face Face of this block to return |
| 68 | * @return Block at the given face |
| 69 | * @see #getRelative(BlockFace, int) |
| 70 | */ |
| 71 | @NotNull |
| 72 | Block getRelative(@NotNull BlockFace face); |
| 73 | |
| 74 | /** |
| 75 | * Gets the block at the given distance of the given face |
| 76 | * <p> |
| 77 | * For example, the following method places water at 100,102,100; two |
| 78 | * blocks above 100,100,100. |
| 79 | * |
| 80 | * <pre> |
| 81 | * Block block = world.getBlockAt(100, 100, 100); |
| 82 | * Block shower = block.getRelative(BlockFace.UP, 2); |
| 83 | * shower.setType(Material.WATER); |
| 84 | * </pre> |
| 85 | * |
| 86 | * @param face Face of this block to return |
| 87 | * @param distance Distance to get the block at |
| 88 | * @return Block at the given face |
| 89 | */ |
no outgoing calls
no test coverage detected