2022-05-06 13:40:42 +02:00
|
|
|
package com.falsepattern.lib.internal;
|
2022-01-10 02:35:24 +01:00
|
|
|
|
2022-05-06 23:48:24 +02:00
|
|
|
import com.falsepattern.lib.config.ConfigurationManager;
|
2022-05-06 13:47:53 +02:00
|
|
|
import com.falsepattern.lib.util.ResourceUtil;
|
2022-01-11 00:26:36 +01:00
|
|
|
import com.google.common.eventbus.EventBus;
|
2022-01-10 02:35:24 +01:00
|
|
|
import cpw.mods.fml.common.DummyModContainer;
|
2022-01-11 00:26:36 +01:00
|
|
|
import cpw.mods.fml.common.LoadController;
|
2022-05-06 13:47:53 +02:00
|
|
|
import cpw.mods.fml.common.MetadataCollection;
|
2022-05-07 19:45:43 +02:00
|
|
|
import cpw.mods.fml.common.Mod;
|
|
|
|
|
import cpw.mods.fml.common.event.FMLConstructionEvent;
|
|
|
|
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
2022-05-06 13:39:00 +02:00
|
|
|
import lombok.Getter;
|
2022-01-10 02:35:24 +01:00
|
|
|
import net.minecraft.launchwrapper.Launch;
|
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
|
|
2022-05-06 13:39:00 +02:00
|
|
|
/**
|
|
|
|
|
* Utility class used by FalsePatternLib's internal code. This can change between versions without notice, so do not use this in your code!
|
|
|
|
|
*/
|
2022-01-10 02:35:24 +01:00
|
|
|
public class FalsePatternLib extends DummyModContainer {
|
2022-05-06 13:39:00 +02:00
|
|
|
@Getter
|
2022-05-06 13:42:31 +02:00
|
|
|
private static final Logger log = LogManager.getLogger(Tags.MODNAME);
|
2022-01-10 02:35:24 +01:00
|
|
|
|
2022-05-06 13:39:00 +02:00
|
|
|
@Getter
|
|
|
|
|
private static final boolean developerEnvironment = (boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment");
|
2022-01-10 02:35:24 +01:00
|
|
|
|
|
|
|
|
public FalsePatternLib() {
|
2022-05-06 13:47:53 +02:00
|
|
|
super(MetadataCollection.from(ResourceUtil.getResourceFromJar("/mcmod.info", FalsePatternLib.class), Tags.MODID).getMetadataForId(Tags.MODID, null));
|
|
|
|
|
log.info("Version " + Tags.VERSION + " initialized!");
|
2022-01-10 02:35:24 +01:00
|
|
|
}
|
|
|
|
|
|
2022-05-07 19:45:43 +02:00
|
|
|
@Mod.EventHandler
|
|
|
|
|
public void construct(FMLConstructionEvent e) {
|
|
|
|
|
ConfigurationManager.init();
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-11 00:26:36 +01:00
|
|
|
@SuppressWarnings("UnstableApiUsage")
|
|
|
|
|
@Override
|
|
|
|
|
public boolean registerBus(EventBus bus, LoadController controller) {
|
2022-05-07 19:45:43 +02:00
|
|
|
bus.register(this);
|
2022-01-11 00:26:36 +01:00
|
|
|
return true;
|
|
|
|
|
}
|
2022-01-10 02:35:24 +01:00
|
|
|
}
|