dizzyd / Mekanism

A mod for Minecraft
5 stars 0 forks source link

Only don't do custom rendering if it would cause a crash #38

Closed pupnewfster closed 5 years ago

pupnewfster commented 5 years ago

Makes it so https://github.com/aidancbrady/Mekanism/issues/5293 doesn't happen but unlike the implementation in https://github.com/aidancbrady/Mekanism/commit/fe9a0e660077cc8f374aabfca029f30a1582495e it does not cause the items to turn invisible with allowEmissiveItems=true. The items do render as invisible in the in world viewing of the tinkers construct crafting table, but you can see the items properly when looking in the GUI.

The linked commit makes it not do the custom rendering for items at all if "the Tesselator isDrawing." (copied quote from the commit message) so any items that need custom rendering don't get it done.

pupnewfster commented 5 years ago

Did a much better fix, which should have better compat with other mods and stuff. Basically if rendering the item will cause a crash, it says that it does in fact use built in rendering so that the custom rendering code does not break it.

The commit about JEI can be ignored, I by mistake had committed that to my local branch, and the merge commit makes it so that is ignored as that is already in master.

Shadows-of-Fire commented 5 years ago

Just looking at that stuff... That entire model class is a giant hack, and should really be a TEISR. In fact, that'd probably resolve all your issues anyway.

You should never actually do anything in a getter method. This implementation should be deleted as soon as physically possible.

pupnewfster commented 5 years ago

Oh we know it is a massive hack, scrapping the old model system is pretty high up on our list of things to do. Given the entire model system is a hack.