1
0
mirror of https://github.com/koloml/vs-manual-cartography.git synced 2026-06-23 18:22:21 +00:00
Files
vs-manual-cartography/ManualCartography/Items/ItemCompass.cs
KoloMl 2479c92ffb Initial commit from Vintage Story mod template
This commit adds dummy compass item wich will just send the angle into
the chat when you click RMB on it.
2026-05-10 03:11:00 +04:00

20 lines
495 B
C#

using System;
using Vintagestory.API.Client;
using Vintagestory.API.Common;
namespace ManualCartography.Items;
public class ItemCompass : Item
{
public override void OnHeldInteractStart(
ItemSlot slot,
EntityAgent byEntity,
BlockSelection blockSel,
EntitySelection entitySel,
bool firstEvent,
ref EnumHandHandling handling
)
{
(api as ICoreClientAPI)?.TriggerChatMessage("Yaw: " + (byEntity.Pos.Yaw * 180 / Math.PI));
}
}