Theurgy

Theurgy

15M Downloads

[1.21.1 v1.56.0] Alchemical Sulfurs cause odd lighting of other items in inventories

Gronglegrowth opened this issue ยท 2 comments

commented

Describe the bug
Alchemical Sulfurs cause improper lighting of other items in inventories that are rendered after them; see attached video or try the steps yourself. I suspect something isn't being reset properly after the sulfurs are rendered, but I'm having a minor skill issue trying to find their rendering code.

To Reproduce
Steps to reproduce the behavior:

  1. Obtain any Alchemical Sulfur, and any other item.
  2. Open an inventory - yours, a block's, etc.
  3. Move the two items around in slots, such that the sulfur(s) are before the other item(s).
  4. Observe improper lighting on those other item(s).

Expected behavior
The lighting should be normal on other items.

Screenshots
Here is a video demonstrating the error.

System:

  • Theurgy Version: 1.56.0
  • OS: Linux (EndeavourOS)
  • Minecraft Version: 1.21.1
  • Other mods: GeckoLib 4.6.6 and Modonomicon 1.108.1
commented

I now know why it is happening, but I am not sure how to fix it.
I am mirroring how GUIs set up the lighting for item rendering, but it behaves differently in custom renderers somehow.
When resetting the lighting to 3d item (= block lighting) after rendering, it causes the sulfur itself to render wrong somehow - probably due to batching.
I will inquire with the neoforge people how that is best approached

commented

Alchemical sulfurs also make odd lighting for entities, when droped as ItemEntity

Before pickup:
image

After pickup:
image