MinecraftForge icon indicating copy to clipboard operation
MinecraftForge copied to clipboard

[1.19] Allow custom outline rendering on EntityRenderers and BlockEntityRenderers

Open XFactHD opened this issue 3 years ago • 0 comments

This PR allows EntityRenderers and BlockEntityRenderers to render custom glowing outlines, bypassing the heavily limited automatic outline rendering on entities based on Entity#isCurrentlyGlowing() and the entity's team color.


Without theses changes, BlockEntityRenderers cannot use the outline rendering at all and EntityRenderers are limited to rendering the full model into the outline buffer with the entity's team color as the outline color and for every player that can see the entity. If the outline buffer is used in either renderer without a glowing entity being rendered, the outline buffer will produce a flat colored overlay on the rendered surfaces instead of the outlines (example: https://discord.com/channels/313125603924639766/915304642668290119/982126474423304213).

With these changes, both BlockEntityRenderers and EntityRenderers can do fully custom outline rendering, including controlling the color, who can see it, which elements are pushed into the outline buffer, etc. Returning true from the added methods will enable the outline processing, everything else is left to the implementor.


Example of the ChestBlockEntity and ChestRenderer modified in Forge dev to use this: 2022-08-03_19 25 49

XFactHD avatar Aug 03 '22 18:08 XFactHD