| Modifier and Type | Field and Description |
|---|---|
static EnumBlockTrait<Direction> |
BlockTraits.DIRECTION |
static EnumBlockTrait<Direction> |
BlockTraits.FACING_DIRECTION |
static EnumBlockTrait<Direction> |
BlockTraits.TORCH_DIRECTION |
| Modifier and Type | Method and Description |
|---|---|
default Block |
Block.getSide(Direction face) |
Block |
Block.getSide(Direction face,
int step) |
default BlockState |
Block.getSideState(Direction face) |
default BlockState |
Block.getSideState(Direction face,
int step) |
BlockState |
Block.getSideState(Direction face,
int step,
int layer) |
| Modifier and Type | Method and Description |
|---|---|
int |
BlockBehavior.getStrongPower(Block block,
Direction side) |
int |
BlockBehavior.getWeakPower(Block block,
Direction face) |
boolean |
BlockBehavior.place(ItemStack item,
Block block,
Block target,
Direction face,
com.nukkitx.math.vector.Vector3f clickPos,
Player player) |
| Modifier and Type | Method and Description |
|---|---|
default int[] |
ContainerBlockEntity.getHopperPushSlots(Direction direction,
ItemStack item)
Returns an array of slot indexes where the item should be pushed to
|
| Modifier and Type | Method and Description |
|---|---|
Direction |
Entity.getDirection() |
Direction |
Entity.getHorizontalDirection() |
| Modifier and Type | Field and Description |
|---|---|
protected Direction |
BlockBreakEvent.face |
| Modifier and Type | Method and Description |
|---|---|
Direction |
BlockBreakEvent.getFace() |
| Constructor and Description |
|---|
BlockBreakEvent(Player player,
Block block,
Direction face,
ItemStack item,
ItemStack[] drops,
int dropExp,
boolean instaBreak,
boolean fastBreak) |
| Modifier and Type | Field and Description |
|---|---|
protected Direction |
PlayerInteractEvent.direction |
| Modifier and Type | Method and Description |
|---|---|
Direction |
PlayerBucketEvent.getBlockFace() |
Direction |
PlayerInteractEvent.getFace() |
| Constructor and Description |
|---|
PlayerBucketEmptyEvent(Player who,
Block blockStateClicked,
Direction direction,
ItemStack bucket,
ItemStack itemInHand) |
PlayerBucketEvent(Player player,
BlockState blockStateClicked,
Direction direction,
ItemStack bucket,
ItemStack itemInHand) |
PlayerBucketFillEvent(Player who,
BlockState blockStateClicked,
Direction direction,
ItemStack bucket,
ItemStack itemInHand) |
PlayerInteractEvent(Player player,
ItemStack item,
Block block,
Direction face,
PlayerInteractEvent.Action action) |
PlayerInteractEvent(Player player,
ItemStack item,
com.nukkitx.math.vector.Vector3f touchVector,
Direction face,
PlayerInteractEvent.Action action) |
| Modifier and Type | Method and Description |
|---|---|
ItemStack |
ItemBehavior.onActivate(ItemStack itemStack,
Player player,
Block block,
Block target,
Direction face,
com.nukkitx.math.vector.Vector3f clickPos,
Level level) |
| Modifier and Type | Method and Description |
|---|---|
ItemStack |
Level.useBreakOn(com.nukkitx.math.vector.Vector3i pos,
Direction face,
ItemStack item,
Player player,
boolean createParticles) |
default ItemStack |
Level.useItemOn(com.nukkitx.math.vector.Vector3i vector,
ItemStack item,
Direction face,
com.nukkitx.math.vector.Vector3f clickPos) |
default ItemStack |
Level.useItemOn(com.nukkitx.math.vector.Vector3i vector,
ItemStack item,
Direction face,
com.nukkitx.math.vector.Vector3f clickPos,
Player player) |
ItemStack |
Level.useItemOn(com.nukkitx.math.vector.Vector3i vector,
ItemStack item,
Direction face,
com.nukkitx.math.vector.Vector3f clickPos,
Player player,
boolean playSound) |
| Modifier and Type | Method and Description |
|---|---|
static Direction |
Direction.fromAxis(Direction.AxisDirection axisDirection,
Direction.Axis axis) |
static Direction |
Direction.fromHorizontalAngle(double angle)
Get the BlockFace corresponding to the given angle (0-360).
|
static Direction |
Direction.fromHorizontalIndex(int index)
Get a BlockFace by it's horizontal index (0-3).
|
static Direction |
Direction.fromIndex(int index)
Get a BlockFace by it's index (0-5).
|
Direction |
Direction.getOpposite()
Get the opposite BlockFace (e.g.
|
Direction |
Direction.Plane.random() |
static Direction |
Direction.random(Random rand)
Choose a random BlockFace using the given Random
|
Direction |
Direction.Plane.random(Random rand) |
Direction |
Direction.rotateY()
Rotate this BlockFace around the Y axis clockwise (NORTH => EAST => SOUTH => WEST => BB_NORTH)
|
Direction |
Direction.rotateYCCW()
Rotate this BlockFace around the Y axis counter-clockwise (NORTH => WEST => SOUTH => EAST => BB_NORTH)
|
static Direction |
Direction.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Direction[] |
Direction.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
Iterator<Direction> |
Direction.Plane.iterator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Direction.Axis.test(Direction face) |
boolean |
Direction.Plane.test(Direction face) |
| Modifier and Type | Method and Description |
|---|---|
Direction |
CardinalDirection.toDirection() |
| Modifier and Type | Method and Description |
|---|---|
Optional<Direction> |
RailDirection.ascendingDirection() |
List<Direction> |
RailDirection.connectingDirections() |
com.google.common.collect.ImmutableSet<Direction> |
VineDirection.getDirections() |
| Modifier and Type | Method and Description |
|---|---|
static RailDirection |
RailDirection.ascending(Direction face) |
static RailDirection |
RailDirection.curved(Direction f1,
Direction f2) |
static LeverDirection |
LeverDirection.forDirection(Direction clickedSide,
Direction playerDirection) |
boolean |
RailDirection.hasConnectingDirections(Direction... faces) |
static VineDirection |
VineDirection.of(Direction... directions) |
static RailDirection |
RailDirection.straight(Direction face) |
static RailDirection |
RailDirection.straightOrCurved(Direction f1,
Direction f2) |
| Modifier and Type | Method and Description |
|---|---|
static VineDirection |
VineDirection.of(Set<Direction> directions) |
Copyright © 2021. All rights reserved.