Skip to content

[1.21.11] Add neoforge API for the ManagementApi#2647

Open
Minecraftschurli wants to merge 17 commits intoneoforged:1.21.11from
Minecraftschurli:feature/jsonrpc-api
Open

[1.21.11] Add neoforge API for the ManagementApi#2647
Minecraftschurli wants to merge 17 commits intoneoforged:1.21.11from
Minecraftschurli:feature/jsonrpc-api

Conversation

@Minecraftschurli
Copy link
Copy Markdown
Contributor

@Minecraftschurli Minecraftschurli commented Sep 19, 2025

This PR adds the DedicatedServer and JsonRpcLogger to the MinecraftApi that is passed to handler functions for Json-RPC methods and makes the serializing and deserializing of parameters and return values of Json-RPC methods registry aware. In addition it adds an event to register SchemaComponent instances used in the Json-RPC schema.

@neoforged-pr-publishing
Copy link
Copy Markdown

  • Publish PR to GitHub Packages

@Minecraftschurli Minecraftschurli marked this pull request as ready for review September 19, 2025 13:29
@Matyrobbrt Matyrobbrt added the 1.21.9 Targeted at Minecraft 1.21.9 label Sep 21, 2025
Copy link
Copy Markdown
Member

@Matyrobbrt Matyrobbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to push this "service" complexity onto modders. I would rather add a dedicated server parameter to the MinecraftApi, and not add this service map and additional api and implementation complexity. I'm not sure what this abstraction achieves, if anything.
It could allow one to unit test easier, but as it stands you'd already need to mock several services to be able to construct one, to the point where mocking the dedicated server or starting up an ephemeral one is easier. And even then, I'm not sure it is a benefit that is valuable enough to deserve the complexity cost. Not to mention that it would not be particularly hard for a mod to adopt this design for itself.

Comment thread src/main/java/net/neoforged/neoforge/server/jsonrpc/NeoForgeSchemas.java Outdated
Comment thread patches/net/minecraft/server/jsonrpc/internalapi/MinecraftApi.java.patch Outdated
Comment thread patches/net/minecraft/server/jsonrpc/api/Schema.java.patch Outdated
@Matyrobbrt Matyrobbrt deleted the branch neoforged:1.21.11 September 30, 2025 15:54
@Matyrobbrt Matyrobbrt closed this Sep 30, 2025
@neoforged-automation neoforged-automation Bot removed the 1.21.9 Targeted at Minecraft 1.21.9 label Sep 30, 2025
@Matyrobbrt Matyrobbrt changed the base branch from port/1.21.9-pre1 to 1.21.x September 30, 2025 16:01
@Minecraftschurli Minecraftschurli added the 1.21.9 Targeted at Minecraft 1.21.9 label Sep 30, 2025
@Minecraftschurli Minecraftschurli self-assigned this Sep 30, 2025
Comment thread src/main/java/net/neoforged/neoforge/server/jsonrpc/NeoForgeRpcMethods.java Outdated
Comment thread src/main/java/net/neoforged/neoforge/event/server/RegisterSchemaEvent.java Outdated
Comment thread src/main/java/net/neoforged/neoforge/event/server/RegisterRpcSchemaEvent.java Outdated
Comment thread src/main/java/net/neoforged/neoforge/event/server/RegisterSchemaEvent.java Outdated
Comment thread patches/net/minecraft/server/jsonrpc/api/SchemaComponent.java.patch Outdated
Comment thread src/main/java/net/neoforged/neoforge/server/ServerLifecycleHooks.java Outdated
Comment thread src/main/java/net/neoforged/neoforge/server/ServerLifecycleHooks.java Outdated
Comment thread src/main/java/net/neoforged/neoforge/server/ServerLifecycleHooks.java Outdated
@Minecraftschurli Minecraftschurli changed the title [1.21.9] Add neoforge API for the ManagementApi [1.21.10] Add neoforge API for the ManagementApi Oct 7, 2025
@Minecraftschurli Minecraftschurli added 1.21.10 Targeted at Minecraft 1.21.10 and removed 1.21.9 Targeted at Minecraft 1.21.9 labels Oct 7, 2025
Comment thread patches/net/minecraft/server/jsonrpc/IncomingRpcMethod.java.patch Outdated
Comment thread src/main/java/net/neoforged/neoforge/server/jsonrpc/NeoForgeSchemas.java Outdated
Comment thread src/main/java/net/neoforged/neoforge/server/ServerLifecycleHooks.java Outdated
Comment thread src/main/java/net/neoforged/neoforge/server/ServerLifecycleHooks.java Outdated
@Minecraftschurli Minecraftschurli force-pushed the feature/jsonrpc-api branch 2 times, most recently from f6dff83 to 07193b0 Compare October 26, 2025 19:00
Comment thread patches/net/minecraft/server/jsonrpc/internalapi/MinecraftApi.java.patch Outdated
Comment thread src/main/java/net/neoforged/neoforge/event/server/RegisterSchemaEvent.java Outdated
Comment thread src/main/java/net/neoforged/neoforge/server/jsonrpc/NeoForgeSchemas.java Outdated
@Minecraftschurli Minecraftschurli changed the title [1.21.10] Add neoforge API for the ManagementApi [1.21.11] Add neoforge API for the ManagementApi Dec 27, 2025
@Minecraftschurli Minecraftschurli added 1.21.11 Targeted at Minecraft 1.21.11 and removed 1.21.10 Targeted at Minecraft 1.21.10 labels Feb 1, 2026
@sciwhiz12 sciwhiz12 added needs rebase enhancement New (or improvement to existing) feature or request labels Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.21.11 Targeted at Minecraft 1.21.11 enhancement New (or improvement to existing) feature or request needs rebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants