Config watching and config events now actually work!

Also fixed small bug with MOD_CLASSES not defaulting to empty string.

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-01-29 15:42:56 -05:00
1 parent 7a02ccc3a8
commit 6365674a2a
4 files changed
+17 -9

No files matched your search

@@ -35,6 +35,7 @@ import net.minecraftforge.forgespi.language.ModFileScanData;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.util.Optional;
import java.util.function.Consumer;
import static net.minecraftforge.fml.Logging.LOADING;
@@ -61,7 +62,7 @@ public class FMLModContainer extends ModContainer
triggerMap.put(ModLoadingStage.PROCESS_IMC, dummy().andThen(this::beforeEvent).andThen(this::fireEvent).andThen(this::afterEvent));
triggerMap.put(ModLoadingStage.COMPLETE, dummy().andThen(this::beforeEvent).andThen(this::completeLoading).andThen(this::fireEvent).andThen(this::afterEvent));
this.eventBus = IEventBus.create(this::onEventFailed);
this.configHandler = Optional.of(event -> this.eventBus.post(event));
try
{
modClass = Class.forName(className, true, modClassLoader);