GregTechCEu / GregTech-Modern

GregTech CE Unofficial for modern versions
GNU Lesser General Public License v3.0
266 stars 157 forks source link

NullPointerException when accessing MachineDefinition.asStack() in GTCreativeModeTabs #358

Closed pen787 closed 1 year ago

pen787 commented 1 year ago

GregTech CEu Version

1.0.1.1.b-build_171

Recipe Viewer Installed

REI

Environment

Singleplayer

Cross-Mod Interaction

Unsure

Expected Behavior

Not Crash.

Actual Behavior

Crash when open the gregtech machine creative tab.

Steps to Reproduce

  1. Open the gregtech machine creative tabs.

Additional Information

Crash log

magcicada commented 1 year ago

this issue will happen on all latest versions

magcicada commented 1 year ago

Just change https://github.com/GregTechCEu/GregTech-Modern/blob/b75fec610ff6489cbcd51ae9aabcdee2f478a7c6/common/src/main/java/com/gregtechceu/gtceu/common/data/GTCreativeModeTabs.java#L24 this line to public static LDLItemGroup MACHINE = new LDLItemGroup(GTCEu.MOD_ID, "machine", () -> GTMachines.ELECTROLYZER[LV].asStack());

screret commented 1 year ago

I knew i missed something when doing that change. closed by #359 (once i commit the fix)

screret commented 1 year ago

sorry i attached the closing to the wrong PR, actual fix coming soon

magcicada commented 1 year ago

Still get this crash when https://github.com/GregTechCEu/GregTech-Modern/pull/359 merged, need put a fix at here: https://github.com/GregTechCEu/GregTech-Modern/blob/b75fec610ff6489cbcd51ae9aabcdee2f478a7c6/common/src/main/java/com/gregtechceu/gtceu/common/data/GTCreativeModeTabs.java#L24 @screret

screret commented 1 year ago

as i said, i did the fix and then i marked the wrong PR as closing.