From e58d819d567e43c0b2e569b56a6644158722666b Mon Sep 17 00:00:00 2001 From: Goodlyay Date: Mon, 19 Dec 2016 21:59:18 -0800 Subject: [PATCH] Core: add fence/wall support into RotatePillar. --- ClassicalSharp/Blocks/AutoRotate.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ClassicalSharp/Blocks/AutoRotate.cs b/ClassicalSharp/Blocks/AutoRotate.cs index eb4262482..ef975c32c 100644 --- a/ClassicalSharp/Blocks/AutoRotate.cs +++ b/ClassicalSharp/Blocks/AutoRotate.cs @@ -50,6 +50,15 @@ namespace ClassicalSharp { } static byte RotatePillar(Game game, byte block, string name, Vector3 offset) { + if (game.BlockInfo.FindID(name + "-UD") == -1) { + float yaw = game.LocalPlayer.HeadYawDegrees; + if (yaw < 0) yaw += 360; + if (yaw < 45 || (yaw >= 135 && yaw < 225) || yaw > 315) { + return Find(game, block, name + "-WE"); + } else { + return Find(game, block, name + "-NS"); + } + } BlockFace face = game.SelectedPos.BlockFace; if (face == BlockFace.YMax || face == BlockFace.YMin) return Find(game, block, name + "-UD");