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.
This commit is contained in:
koloml committed 2026-05-10 03:11:00 +04:00
commit 2479c92ffb
14 files changed
+936

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
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));
}
}