搜索文档
Direction 是 Minecraft 中的方向枚举,用于表示六个基本方向:上、下、东、西、南、北。
// 六个基本方向 Direction.UP // 上方 Direction.DOWN // 下方 Direction.EAST // 东方 Direction.WEST // 西方 Direction.SOUTH // 南方 Direction.NORTH // 北方
// 获取相反方向 direction.getOpposite() // 获取水平方向 direction.getHorizontal() // 判断是否为水平方向 direction.isHorizontal() // 判断是否为向上或向下 direction.isVertical() // 获取对应的轴 direction.getAxis() // 返回 Axis.X, Axis.Y, 或 Axis.Z // 获取轴方向 direction.getAxisDirection()