LambdAurora / LambDynamicLights

A dynamic lighting mod for Minecraft on Fabric Loader.
https://lambdaurora.dev/projects/lambdynamiclights/
Other
412 stars 98 forks source link

[1.17] Support for light block levels #71

Closed Felix14-v2 closed 3 years ago

Felix14-v2 commented 3 years ago

Currently, the light blocks in the inventory that have different lighting levels glow with the same intensity (even with 0 level): https://youtu.be/I33eF9vvEHA

it would be more logical if the level of dynamic light depended on the level of item in the inventory.

LambdAurora commented 3 years ago

Trying to fix this, but just for posterity, Java decided to become as cursed as possible.

image

Executing state.getLuminance() returns 7 as it should, but if the entire method is executed it returns magically 15.