diff --git a/ButterflyPins/BlockEntities/BlockEntityButterflyPinBoard.cs b/ButterflyPins/BlockEntities/BlockEntityButterflyPinBoard.cs index be6f2a2..3d6636f 100644 --- a/ButterflyPins/BlockEntities/BlockEntityButterflyPinBoard.cs +++ b/ButterflyPins/BlockEntities/BlockEntityButterflyPinBoard.cs @@ -120,6 +120,9 @@ public class BlockEntityButterflyPinBoard : BlockEntityDisplay double height = (1 - (BoardMargin * 2)) / Rows; int column = GameMath.Clamp((int)((local.X - BoardMargin) / width), 0, Columns - 1); + if (IsNorthSouthVariant()) + column = (Columns - 1) - column; + int rowFromBottom = GameMath.Clamp((int)((local.Y - BoardMargin) / height), 0, Rows - 1); int rowFromTop = Rows - 1 - rowFromBottom; @@ -205,6 +208,12 @@ public class BlockEntityButterflyPinBoard : BlockEntityDisplay }; } + private bool IsNorthSouthVariant() + { + string side = Block?.Variant?["side"] ?? "south"; + return side is "north" or "south"; + } + public float GetRenderScale() { return RenderScale;