GregTechCEu Modern

GregTechCEu Modern

6M Downloads

NullPointerException when accessing MachineDefinition.asStack() in GTCreativeModeTabs

pen787 opened this issue ยท 6 comments

commented

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

commented

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

commented

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

commented

this issue will happen on all latest versions

commented

Just change

public static LDLItemGroup MACHINE = new LDLItemGroup(GTCEu.MOD_ID, "machine", () -> GTMachines.ELECTROLYZER[0].asStack());
this line to
public static LDLItemGroup MACHINE = new LDLItemGroup(GTCEu.MOD_ID, "machine", () -> GTMachines.ELECTROLYZER[LV].asStack());

commented

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

commented

Still get this crash when #359 merged, need put a fix at here:

public static LDLItemGroup MACHINE = new LDLItemGroup(GTCEu.MOD_ID, "machine", () -> GTMachines.ELECTROLYZER[0].asStack());

@screret