Facing2D

仅水平 4 向的朝向枚举,驱动本模组全部多方块旋转

基本信息

属性 值
路径 net.fuzzycraft.botanichorizons.util.Facing2D
常量数 4

枚举值((index, ic2index, dx, dz, cw_dx, cw_dz))

常量 index ic2index dx dz cw_dx cw_dz
NORTH 0 2 0 −1 1 0
EAST 1 5 1 0 0 1
SOUTH 2 3 0 1 −1 0
WEST 3 4 −1 0 0 −1

源码注释:// Note: 3d indices are 0 = down and 1 = up (供 IC2 兼容的 3D 索引使用)。

⚠️ 不支持垂直翻转

枚举只有 4 个水平值,且 MultiblockHelper 的 transformedX/transformedZ 只做水平变换、Y 原样传递。 因此本模组的 4 个多方块只能水平旋转,不能上下翻转。

方法

fromIndex(int) —— 非法 index 一律回退为 WEST。