clean up
This commit is contained in:
parent
57a8c23eff
commit
0b1f3a8656
|
@ -1,10 +0,0 @@
|
|||
package com.notsimibubi.badcreateaddon;
|
||||
|
||||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.foundation.data.CreateRegistrate;
|
||||
|
||||
public class Test {
|
||||
public static void test() {
|
||||
CreateRegistrate plscrash = Create.registrate();
|
||||
}
|
||||
}
|
|
@ -2,8 +2,6 @@ package com.simibubi.create;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import com.notsimibubi.badcreateaddon.Test;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
@ -89,10 +87,11 @@ public class Create {
|
|||
Class<?> callerClass = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE).getCallerClass();
|
||||
if(callerClass.getName().contains("com.simibubi.create"))
|
||||
return REGISTRATE;
|
||||
RuntimeException t = new IllegalCallerException(String.format("Mod %s tried to access Create's registrate! Class: %s", ModLoadingContext.get().getActiveContainer().getModId(), callerClass.getName()));
|
||||
RuntimeException t = new IllegalCallerException(String.format("Mod %s tried to access Create's registrate! Instead, make your own. Class: %s",
|
||||
ModLoadingContext.get().getActiveContainer().getModId(), callerClass.getName()));
|
||||
// throw t; // this gets caught by Forge's try-catch, (FMLModContainer line 70)
|
||||
// which makes it harder to pinpoint for new devs
|
||||
// what is going wrong.
|
||||
// which makes it harder to pinpoint for new devs what is going wrong.
|
||||
|
||||
alternative: // most useful java label
|
||||
t.printStackTrace(); // error shows at bottom of log, clearly indicating what happened
|
||||
System.exit(1);
|
||||
|
@ -115,7 +114,6 @@ public class Create {
|
|||
}
|
||||
|
||||
public static void onCtor() {
|
||||
Test.test();
|
||||
ModLoadingContext modLoadingContext = ModLoadingContext.get();
|
||||
|
||||
IEventBus modEventBus = FMLJavaModLoadingContext.get()
|
||||
|
|
Loading…
Reference in a new issue