use of com.builtbroken.mc.lib.json.processors.block.JsonBlockListenerProcessor in project Engine by VoltzEngine-Project.
the class JsonContentLoader method preInit.
@Override
public void preInit() {
debug.start("Phase: Pre-Init");
//---------------------------------------------------------------------------
debug.start("Validating file paths");
//Init data
externalContentFolder = new File(References.BBM_CONFIG_FOLDER, "json");
//Validate data
validateFilePaths();
debug.end("Done...");
//===========================================================================
debug.start("Registering default processors");
//Load processors
add(blockProcessor);
blockProcessor.addSubProcessor(JsonBlockTileProcessor.KEY, new JsonBlockTileProcessor());
blockProcessor.addSubProcessor(JsonBlockListenerProcessor.KEY, new JsonBlockListenerProcessor());
add(itemProcessor);
add(new JsonOreNameProcessor());
//TODO add entity loading
add(worldOreGenProcessor);
add(craftingRecipeProcessor);
add(furnaceRecipeProcessor);
add(new JsonRecipeReplacementProcessor());
add(new JsonOverrideProcessor());
add(new JsonMultiBlockLayoutProcessor());
add(new JsonMissingMapEventProcessor());
//TODO add machine recipes
debug.end("Done...");
//===========================================================================
debug.start("Registering mod processors");
for (ModContainer container : Loader.instance().getModList()) {
Object mod = container.getMod();
if (mod instanceof IJsonGenMod) {
debug.log("Mod: " + container.getName() + " " + container.getDisplayVersion());
((IJsonGenMod) mod).loadJsonContentHandlers();
}
}
debug.end("Done...");
//===========================================================================
debug.start("Loading files");
//Resources are loaded before they can be processed to allow early processing
if (!ignoreFileLoading) {
//Load resources from file system
loadResources();
} else {
debug.log("Resource loading is disable, this might be due to testing suits or other reasons");
debug.log("JUnit: " + Engine.isJUnitTest());
}
debug.end("Done...");
//===========================================================================
debug.start("Process Run[1]");
processEntries();
debug.end("Done...");
//---------------------------------------------------------------------------
debug.end("Done...");
}
Aggregations