-
Notifications
You must be signed in to change notification settings - Fork 507
Description
Summary
Debug API is a hypothetical toolkit for registering and using debug subscriptions and other debug tools Mojang have created.
Motivation
Presently, Mixin is required to add your own debug subscriptions to entities and other game objects. Mixin is great, really, but at a certain point it becomes annoying, especially when you want to make a quick and dirty debug renderer and subscription, and at that point, you might as well use print debugging.
Explanation
A Debug API would implement methods to register debug subscriptions on the client and server, potentially on existing game objects as well. This would make implementing debug renderers easier as modders could properly use DebugValueAccess on which we could also add an injected interface for more customization. This API would also have its own module for ease of maintainability.
Drawbacks
This would add a new module (oh no!), further reducing performance in Fabric API development, and annoying the tater out of maintainers.
Rationale and Alternatives
- You could theoretically shove some of the described features into unrelated modules, but that would be more annoying to maintain.
- This makes it easier for modders to create debug features with no hassle.
Prior Art
See #5035 testmod.
Unresolved Questions
- Should we keep
DebugRendererRegistryinfabric-rendering-v1? It's probably fine to stay there, but moving it here could also have benefits. - Should adding debug subscriptions on existing game objects be event-based or registry-based?
- Is this even in scope for Fabric API?