From 2966dcc84754c3418de325b005f88c84807b30b4 Mon Sep 17 00:00:00 2001 From: "Narlar (Discord-General Manager Tim)" Date: Tue, 24 Mar 2026 00:16:51 -0500 Subject: [PATCH 1/2] Update Instrument.cs to match API changes in 1.22.0-rc.4 Byentity.GetPos() API change. --- src/Instrument.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Instrument.cs b/src/Instrument.cs index ac1e31c..3572199 100644 --- a/src/Instrument.cs +++ b/src/Instrument.cs @@ -1,4 +1,4 @@ -using System; // Action<> +using System; // Action<> using System.Collections.Generic; using System.Diagnostics; // debug todo remove using System.IO; // Open files @@ -111,7 +111,8 @@ public override void OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, Bl if (GetPlayMode(slot) != PlayMode.abc) { - Vec3d pos = new Vec3d(byEntity.Pos.X, byEntity.Pos.Y, byEntity.Pos.Z); + var epos = byEntity.GetPos(); + Vec3d pos = new Vec3d(epos.X, epos.Y, epos.Z); NoteStart newNote = new NoteStart(); newNote.pitch = currentNote.pitch; newNote.positon = pos; @@ -148,7 +149,8 @@ public override bool OnHeldInteractStep(float secondsUsed, ItemSlot slot, Entity // Additionally, update the sound packet if (GetPlayMode(slot) != PlayMode.abc) { - Vec3d pos = new Vec3d(byEntity.Pos.X, byEntity.Pos.Y, byEntity.Pos.Z); + var epos = byEntity.GetPos(); + Vec3d pos = new Vec3d(epos.X, epos.Y, epos.Z); NoteUpdate newNote = new NoteUpdate(); newNote.pitch = currentNote.pitch; newNote.positon = pos; @@ -228,13 +230,13 @@ private void Update(ItemSlot slot, EntityAgent byEntity) switch (GetPlayMode(slot)) { case PlayMode.lockedTone: - AngleToPitchLockedTone(byEntity.Pos.Pitch); + AngleToPitchLockedTone(byEntity.GetPos().Pitch); break; case PlayMode.lockedSemiTone: - AngleToPitchLockedSemiTone(byEntity.Pos.Pitch); + AngleToPitchLockedSemiTone(byEntity.GetPos().Pitch); break; case PlayMode.fluid: - AngleToPitch(byEntity.Pos.Pitch); + AngleToPitch(byEntity.GetPos().Pitch); break; case PlayMode.abc: // No logic for this mode; all handled by the server. From 8993ee3a0b84f8ea6209467dac28b9427265aac6 Mon Sep 17 00:00:00 2001 From: "Narlar (Discord-General Manager Tim)" Date: Tue, 24 Mar 2026 00:28:36 -0500 Subject: [PATCH 2/2] vsinstruments_base.csproj .NET 10 rebuild. --- vsinstruments_base.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vsinstruments_base.csproj b/vsinstruments_base.csproj index 3fd8c14..8b7c343 100644 --- a/vsinstruments_base.csproj +++ b/vsinstruments_base.csproj @@ -1,7 +1,7 @@ - + - net8.0 + net10.0 false bin\$(Configuration)\Mods\mod