public override Cuboidf[] GetSelectionBoxes(IBlockAccessor blockAccessor, BlockPos pos) { BlockEntityAnvil bea = blockAccessor.GetBlockEntity(pos) as BlockEntityAnvil; if (bea != null) { Cuboidf[] selectionBoxes = bea.GetSelectionBoxes(blockAccessor, pos); selectionBoxes[0] = this.SelectionBoxes[0]; return(selectionBoxes); } return(base.GetSelectionBoxes(blockAccessor, pos)); }
public override Cuboidf[] GetSelectionBoxes(IBlockAccessor blockAccessor, BlockPos pos) { BlockEntityAnvil bea = blockAccessor.GetBlockEntity(pos) as BlockEntityAnvil; if (bea != null) { Cuboidf[] selectionBoxes = bea.GetSelectionBoxes(blockAccessor, pos); float angledeg = Math.Abs(bea.MeshAngle * GameMath.RAD2DEG); selectionBoxes[0] = angledeg == 0 || angledeg == 180 ? SelectionBoxes[0] : SelectionBoxes[1]; return(selectionBoxes); } return(base.GetSelectionBoxes(blockAccessor, pos)); }