From a258e8e809b4329a31910e4a2281f11f41ad494b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 01:41:26 +0000 Subject: [PATCH 1/5] Initial plan From 2ab175785aa513b95730c9a9ddd06a8569598fc7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 01:45:35 +0000 Subject: [PATCH 2/5] =?UTF-8?q?docs(astro):=20=F0=9F=93=9D=20updated=20out?= =?UTF-8?q?dated=20GetLink()=20to=20Link=20property?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: caunt <5324218+caunt@users.noreply.github.com> --- .../docs/developing-plugins/network/packets.md | 17 ++++++++++++++--- .../network/transformations.md | 3 ++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/astro/src/content/docs/docs/developing-plugins/network/packets.md b/docs/astro/src/content/docs/docs/developing-plugins/network/packets.md index e33e009b..536b4522 100644 --- a/docs/astro/src/content/docs/docs/developing-plugins/network/packets.md +++ b/docs/astro/src/content/docs/docs/developing-plugins/network/packets.md @@ -58,6 +58,17 @@ public class SetHeldItemClientboundPacket : IMinecraftClientboundPacket(PacketIdDefinitions.ClientboundSetHeldItem); +} +``` + +You can also define your own mappings for packets you'd like to work with: ```csharp [Subscribe] public void OnPlayerJoinedServer(PlayerJoinedServerEvent @event) @@ -132,7 +143,7 @@ await player.SendPacketAsync(new SetHeldItemClientboundPacket { Slot = slot }, c ### Sending Packets to the Server You can send packets to the server with `ILink.ServerChannel` instance. ```csharp -await player.GetLink().ServerChannel.SendPacketAsync(new SetHeldItemClientboundPacket { Slot = slot }, cancellationToken); +await player.Link.ServerChannel.SendPacketAsync(new SetHeldItemClientboundPacket { Slot = slot }, cancellationToken); ``` ### Sending Packets to the [**`ILink`**](/docs/developing-plugins/network/links) @@ -143,12 +154,12 @@ You can send packets to the link with `ILink.SendPacketAsync` method. - If the packet has both interfaces, it will be sent only to the client. - If the packet has neither interface, `InvalidOperationException` will be thrown. ```csharp -await player.GetLink().SendPacketAsync(new SetHeldItemClientboundPacket { Slot = slot }, cancellationToken); +await player.Link.SendPacketAsync(new SetHeldItemClientboundPacket { Slot = slot }, cancellationToken); ``` When you want to explicitly send a packet to the server or client, `SendPacketAsync` has an overload that specifies the destination side. ```csharp -await player.GetLink().SendPacketAsync(Side.Client, new SetHeldItemClientboundPacket { Slot = slot }, cancellationToken); +await player.Link.SendPacketAsync(Side.Client, new SetHeldItemClientboundPacket { Slot = slot }, cancellationToken); ``` ## Complete Example diff --git a/docs/astro/src/content/docs/docs/developing-plugins/network/transformations.md b/docs/astro/src/content/docs/docs/developing-plugins/network/transformations.md index a86879a7..7efae293 100644 --- a/docs/astro/src/content/docs/docs/developing-plugins/network/transformations.md +++ b/docs/astro/src/content/docs/docs/developing-plugins/network/transformations.md @@ -134,7 +134,8 @@ public void OnPhaseChanged(PhaseChangedEvent @event) new(0x51, ProtocolVersion.MINECRAFT_1_20_3), new(0x53, ProtocolVersion.MINECRAFT_1_20_5), new(0x63, ProtocolVersion.MINECRAFT_1_21_2), - new(0x62, ProtocolVersion.MINECRAFT_1_21_5) + new(0x62, ProtocolVersion.MINECRAFT_1_21_5), + new(0x67, ProtocolVersion.MINECRAFT_1_21_9) ]); @event.Player.RegisterTransformations(Transformations); From 0ab5d43f1056ea72fcace5a357e7383872dd025c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 01:47:58 +0000 Subject: [PATCH 3/5] =?UTF-8?q?docs(astro):=20=F0=9F=93=9D=20updated=20Reg?= =?UTF-8?q?isterTransformations=20to=20use=20new=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: caunt <5324218+caunt@users.noreply.github.com> --- .../docs/docs/developing-plugins/network/transformations.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/astro/src/content/docs/docs/developing-plugins/network/transformations.md b/docs/astro/src/content/docs/docs/developing-plugins/network/transformations.md index 7efae293..972c0536 100644 --- a/docs/astro/src/content/docs/docs/developing-plugins/network/transformations.md +++ b/docs/astro/src/content/docs/docs/developing-plugins/network/transformations.md @@ -138,7 +138,8 @@ public void OnPhaseChanged(PhaseChangedEvent @event) new(0x67, ProtocolVersion.MINECRAFT_1_21_9) ]); - @event.Player.RegisterTransformations(Transformations); + // Register transformations for the channel that changed phase + @event.Player.RegisterTransformations(@event.Channel, Transformations); } ``` From b50bfc3b78312ff645c559c6243e36a3b175c5ea Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 01:49:35 +0000 Subject: [PATCH 4/5] =?UTF-8?q?docs(astro):=20=F0=9F=93=9D=20final=20verif?= =?UTF-8?q?ication=20complete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: caunt <5324218+caunt@users.noreply.github.com> --- docs/astro/package-lock.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/astro/package-lock.json b/docs/astro/package-lock.json index 3f02d81a..0e87c4d6 100644 --- a/docs/astro/package-lock.json +++ b/docs/astro/package-lock.json @@ -114,6 +114,7 @@ "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.35.0.tgz", "integrity": "sha512-YmHSj2KkzZ2B1ST/ZMqfvctPz1nbw78kBwHF4W2BFKnDFJhCTHFDW81IByT1Dwf52f81LPs8vlOTXtxSZq6yKQ==", "license": "MIT", + "peer": true, "dependencies": { "@astrojs/markdown-remark": "^6.3.1", "@astrojs/mdx": "^4.2.3", @@ -1867,6 +1868,7 @@ "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2043,6 +2045,7 @@ "resolved": "https://registry.npmjs.org/astro/-/astro-5.11.2.tgz", "integrity": "sha512-jKJCqp0PMZ1ZpP2xySghsJ1xK7ZNh/ISTRNBf/7khY3iEGq/zup49ZMhNZXK5Cd/dFWP/pdBNHD91SByA42IvQ==", "license": "MIT", + "peer": true, "dependencies": { "@astrojs/compiler": "^2.12.2", "@astrojs/internal-helpers": "0.6.1", @@ -3095,6 +3098,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.33.0.tgz", "integrity": "sha512-TS9bTNIryDzStCpJN93aC5VRSW3uTx9sClUn4B87pwiCaJh220otoI0X8mJKr+VcPtniMdN8GKjlwgWGUv5ZKA==", "dev": true, + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", @@ -4452,6 +4456,7 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-12.0.2.tgz", "integrity": "sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q==", "license": "MIT", + "peer": true, "bin": { "marked": "bin/marked.js" }, @@ -6017,6 +6022,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", @@ -6614,6 +6620,7 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.1.tgz", "integrity": "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==", "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.7" }, @@ -7545,6 +7552,7 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.4.tgz", "integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==", "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -7788,6 +7796,7 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.3.tgz", "integrity": "sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==", "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } From 20349b3e8bf0051f2fedb27c296a0ec436002d49 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 8 Feb 2026 01:52:39 +0000 Subject: [PATCH 5/5] =?UTF-8?q?docs(astro):=20=F0=9F=93=9D=20updated=20dep?= =?UTF-8?q?recated=20API=20usage=20in=20code=20examples?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: caunt <5324218+caunt@users.noreply.github.com> --- docs/astro/package-lock.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/astro/package-lock.json b/docs/astro/package-lock.json index 0e87c4d6..3f02d81a 100644 --- a/docs/astro/package-lock.json +++ b/docs/astro/package-lock.json @@ -114,7 +114,6 @@ "resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.35.0.tgz", "integrity": "sha512-YmHSj2KkzZ2B1ST/ZMqfvctPz1nbw78kBwHF4W2BFKnDFJhCTHFDW81IByT1Dwf52f81LPs8vlOTXtxSZq6yKQ==", "license": "MIT", - "peer": true, "dependencies": { "@astrojs/markdown-remark": "^6.3.1", "@astrojs/mdx": "^4.2.3", @@ -1868,7 +1867,6 @@ "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2045,7 +2043,6 @@ "resolved": "https://registry.npmjs.org/astro/-/astro-5.11.2.tgz", "integrity": "sha512-jKJCqp0PMZ1ZpP2xySghsJ1xK7ZNh/ISTRNBf/7khY3iEGq/zup49ZMhNZXK5Cd/dFWP/pdBNHD91SByA42IvQ==", "license": "MIT", - "peer": true, "dependencies": { "@astrojs/compiler": "^2.12.2", "@astrojs/internal-helpers": "0.6.1", @@ -3098,7 +3095,6 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.33.0.tgz", "integrity": "sha512-TS9bTNIryDzStCpJN93aC5VRSW3uTx9sClUn4B87pwiCaJh220otoI0X8mJKr+VcPtniMdN8GKjlwgWGUv5ZKA==", "dev": true, - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", @@ -4456,7 +4452,6 @@ "resolved": "https://registry.npmjs.org/marked/-/marked-12.0.2.tgz", "integrity": "sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q==", "license": "MIT", - "peer": true, "bin": { "marked": "bin/marked.js" }, @@ -6022,7 +6017,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.8", "picocolors": "^1.1.1", @@ -6620,7 +6614,6 @@ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.1.tgz", "integrity": "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==", "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "1.0.7" }, @@ -7552,7 +7545,6 @@ "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.4.tgz", "integrity": "sha512-BiReIiMS2fyFqbqNT/Qqt4CVITDU9M9vE+DKcVAsB+ZV0wvTKd+3hMbkpxz1b+NmEDMegpVbisKiAZOnvO92Sw==", "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.4.4", @@ -7796,7 +7788,6 @@ "resolved": "https://registry.npmjs.org/zod/-/zod-3.24.3.tgz", "integrity": "sha512-HhY1oqzWCQWuUqvBFnsyrtZRhyPeR7SUGv+C4+MsisMuVfSPx8HpwWqH8tRahSlt6M3PiFAcoeFhZAqIXTxoSg==", "license": "MIT", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" }