MrTJP / ProjectRed

Redstone Engineering
MIT License
471 stars 182 forks source link

GateItemRenderer crashes with Refined Storage Patterns #1699

Closed dav20011 closed 2 years ago

dav20011 commented 2 years ago

Describe the bug When rendering a Refined Storage Pattern the GateItemRenderer throws a MatchError and thus crashes the game. The exact line is this one: https://github.com/MrTJP/ProjectRed/blob/publish/1.16/release/src/integration/scala/mrtjp/projectred/integration/GateItemRenderer.scala#L36 I think it is pretty obvious why this happens, patterns are no gate parts. The same error should occur with AE2 patterns. I also noticed that some other items like Red Alloy Wire simply do not render as patterns instead of causing a crash.

To Reproduce

  1. Install ProjectRed and Refined Storage
  2. Create a pattern for any gate part
  3. Hold shift in the inventory to render the pattern item

Crash Log I can add that upon request, but I don't think it is needed.

Versions

MrTJP commented 2 years ago

This was fixed last night with 097bf31cf8c02135ab47eb4d2e2afd5a8867513d

Yes, nothing renders if the item stack is not the expected type. Don’t know why the pattern stack itself is being passed in here. Makes no sense.

dav20011 commented 2 years ago

That's great. I tried a bit around and in fact it was another mod (not Optifine) that was fiddling around in rendering. I will report this to the respective author.