Skip to content

Please externalize WorldRenderer logic/state #20

Description

@grondag

private void renderWorldBorder(MatrixStack matrices, float delta, long limitTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightmapTextureManager lightmapTextureManager, Matrix4f matrix4f, CallbackInfo ci) {

Would it be possible to move this logic and the accompanying color/time state to a different class with a public method? This will make it easier for Canvas to invoke it at the appropriate time.

When Canvas is active, WorldRenderer exists but the render method never runs, so until there is an appropriate API in place (still uncertain about the shape of that) it handles compatibility by calling any Mixin hooks it disables if the owning mod is present.

I can do it as-is by munging through the WorldRenderer class with reflection to pull out the necessary method, but will much less brittle if the method is defined externally.

I can pass in any needed parameters currently being shadowed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions