BuiltinItemRenderer needs access to the perspective
williewillus opened this issue ยท 3 comments
Vanilla's builtin item renderer now receives the perspective being rendered to (e.g. GUI, GROUND, FIRST_PERSON_RIGHT, etc.)
Mods need this as well, but fabric's wrapper does not expose it.
This is needed because now with fabulous mode, the perspective matters a lot for deciding whether to render to the offscreen framebuffers or to the main framebuffer. For example, GUI perspective always renders to the main framebuffer, even if the item is translucent and its BER would have rendered to an offscreen framebuffer.
Trying to render to the offscreen buffers in GUI perspective would result in nothing showing up (because the offscreen buffers have already been blended together into the main buffer)
Changing the method in BuiltinItemRenderer
directly would be a breaking change, but I think that would actually be fine on 1.16.2 -- a lot of mods will break anyway.
I wrote up a quick PR to add a new interface that supplies the Mode
enum in the parameters. Does not break any existing renderers.