diff --git a/stardew-access/ModEntry.cs b/stardew-access/ModEntry.cs index 9b6e936..149d9b9 100644 --- a/stardew-access/ModEntry.cs +++ b/stardew-access/ModEntry.cs @@ -121,6 +121,8 @@ namespace stardew_access MenuPatch.resetGlobalVars(); + SnapMouseToPlayer(); + if(!isReadingTile && readTile) ReadTile(); } @@ -156,6 +158,14 @@ namespace stardew_access } } + private void SnapMouseToPlayer() + { + int x = Game1.player.GetBoundingBox().Center.X - Game1.viewport.X; + int y = Game1.player.GetBoundingBox().Center.Y - Game1.viewport.Y; + + Game1.setMousePosition(x, y); + } + private static async void ReadTile() { isReadingTile = true;