Flywheel (Legacy)

Flywheel (Legacy)

41M Downloads

Light shaders aren't properly copied when copying SimpleMaterial builders

MattiDragon opened this issue ยท 1 comments

commented

Describe the Bug

The light field, holding shaders for lighting, is not correctly copied when copying a material builder. This causes the light shaders to be null, causing crashes later down the line.

The light shader should be copied between these lines, but it isn't.

Reproduction Steps

  1. Look at the code for copying materials.
  2. Notice that the light isn't ever copied and remains null

Expected Result

The light field would be copied or assigned some reasonable default

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Windows 11 Home

What is your GPU?

RTX 3070

Mod Version

0.6.8.a

Minecraft Version

1.19.2

Loader Version

Fabric 0.16.7 (mc 1.21.1)

Other Mods

Note: I have only reproduced on the 1.21 pr fork, but the same code exist on other branches as well. I've set the mod and minecraft versions to the latest values as I cannot represent them correctly

Additional Context

No response

commented

The fix for this is already in #262, but can be merged separately if needed.