mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-26 14:53:05 +00:00
Cleanup Log, loading from nbt, remove Version check
This commit is contained in:
1 parent
14c42afd29
commit
7b0259a343
89 files changed
+450
-930
No files matched your search
@@ -29,7 +29,7 @@ public class ForestryPluginUtil {
|
||||
T instance = asmInstanceClass.newInstance();
|
||||
instances.add(instance);
|
||||
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
|
||||
Log.severe("Failed to load: {}", asmData.getClassName(), e);
|
||||
Log.error("Failed to load: {}", asmData.getClassName(), e);
|
||||
}
|
||||
}
|
||||
return instances;
|
||||
|
||||
@@ -219,7 +219,7 @@ public class PluginApiculture extends BlankForestryPlugin {
|
||||
}
|
||||
|
||||
beekeepingMode = config.getStringLocalized("beekeeping", "mode", "NORMAL", validBeekeepingModeNames);
|
||||
Log.finer("Beekeeping mode read from config: " + beekeepingMode);
|
||||
Log.debug("Beekeeping mode read from config: " + beekeepingMode);
|
||||
|
||||
secondPrincessChance = config.getFloatLocalized("beekeeping", "second.princess", secondPrincessChance, 0.0f, 100.0f);
|
||||
|
||||
@@ -247,7 +247,7 @@ public class PluginApiculture extends BlankForestryPlugin {
|
||||
|
||||
Set<Flower> acceptableFlowers = flowerRegistry.getAcceptableFlowers(flowerType);
|
||||
if (acceptableFlowers == null || acceptableFlowers.size() == 0) {
|
||||
Log.severe("Flower type '" + flowerType + "' has no valid flowers set in apiculture.cfg. Add valid flowers or delete the config to set it to default.");
|
||||
Log.error("Flower type '" + flowerType + "' has no valid flowers set in apiculture.cfg. Add valid flowers or delete the config to set it to default.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ public class PluginApiculture extends BlankForestryPlugin {
|
||||
for (Flower flower : flowers) {
|
||||
String name = ItemStackUtil.getBlockNameFromRegistryAsSting(flower.getBlock());
|
||||
if (name == null) {
|
||||
Log.severe("Could not find name for flower: " + flower + " with type: " + flowerType);
|
||||
Log.warning("Could not find name for flower: " + flower + " with type: " + flowerType);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ import forestry.core.blocks.BlockTypeCoreTesr;
|
||||
import forestry.core.circuits.CircuitRegistry;
|
||||
import forestry.core.circuits.SolderManager;
|
||||
import forestry.core.commands.CommandPlugins;
|
||||
import forestry.core.commands.CommandVersion;
|
||||
import forestry.core.commands.RootCommand;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Constants;
|
||||
@@ -114,7 +113,6 @@ public class PluginCore extends BlankForestryPlugin {
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
rootCommand.addChildCommand(new CommandVersion());
|
||||
rootCommand.addChildCommand(new CommandPlugins());
|
||||
|
||||
blocks.core.addDefinitions(BlockTypeCoreTesr.VALUES);
|
||||
|
||||
@@ -80,7 +80,7 @@ public class PluginFluids extends BlankForestryPlugin {
|
||||
}
|
||||
} else {
|
||||
GameRegistry.UniqueIdentifier blockID = GameRegistry.findUniqueIdentifierFor(fluidBlock);
|
||||
Log.severe("Pre-existing {0} fluid block detected, deferring to {1}:{2}, "
|
||||
Log.warning("Pre-existing {0} fluid block detected, deferring to {1}:{2}, "
|
||||
+ "this may cause issues if the server/client have different mod load orders, "
|
||||
+ "recommended that you disable all but one instance of {0} fluid blocks via your configs.", fluid.getName(), blockID.modId, blockID.name);
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class PluginManager {
|
||||
}
|
||||
|
||||
private static void registerHandlers(IForestryPlugin plugin) {
|
||||
Log.fine("Registering Handlers for Plugin: {0}", plugin);
|
||||
Log.debug("Registering Handlers for Plugin: {}", plugin);
|
||||
|
||||
IPacketRegistry packetRegistry = plugin.getPacketRegistry();
|
||||
if (packetRegistry != null) {
|
||||
@@ -199,24 +199,24 @@ public class PluginManager {
|
||||
configurePlugins(forestryPlugins);
|
||||
|
||||
for (IForestryPlugin plugin : loadedPlugins) {
|
||||
Log.fine("Setup Start: {0}", plugin);
|
||||
Log.debug("Setup Start: {0}", plugin);
|
||||
plugin.setupAPI();
|
||||
plugin.registerItemsAndBlocks();
|
||||
Log.fine("Setup Complete: {0}", plugin);
|
||||
Log.debug("Setup Complete: {0}", plugin);
|
||||
}
|
||||
|
||||
stage = Stage.SETUP_DISABLED;
|
||||
for (IForestryPlugin plugin : unloadedPlugins) {
|
||||
Log.fine("Disabled-Setup Start: {0}", plugin);
|
||||
Log.debug("Disabled-Setup Start: {0}", plugin);
|
||||
plugin.disabledSetupAPI();
|
||||
Log.fine("Disabled-Setup Complete: {0}", plugin);
|
||||
Log.debug("Disabled-Setup Complete: {0}", plugin);
|
||||
}
|
||||
}
|
||||
|
||||
public static void runPreInit() {
|
||||
stage = Stage.PRE_INIT;
|
||||
for (IForestryPlugin plugin : loadedPlugins) {
|
||||
Log.fine("Pre-Init Start: {0}", plugin);
|
||||
Log.debug("Pre-Init Start: {0}", plugin);
|
||||
registerHandlers(plugin);
|
||||
plugin.preInit();
|
||||
if (ForestryAPI.enabledPlugins.contains(ForestryPluginUids.BUILDCRAFT_STATEMENTS)) {
|
||||
@@ -226,26 +226,26 @@ public class PluginManager {
|
||||
plugin.registerBackpackItems();
|
||||
plugin.registerCrates();
|
||||
}
|
||||
Log.fine("Pre-Init Complete: {0}", plugin);
|
||||
Log.debug("Pre-Init Complete: {0}", plugin);
|
||||
}
|
||||
}
|
||||
|
||||
public static void runInit() {
|
||||
stage = Stage.INIT;
|
||||
for (IForestryPlugin plugin : loadedPlugins) {
|
||||
Log.fine("Init Start: {0}", plugin);
|
||||
Log.debug("Init Start: {0}", plugin);
|
||||
plugin.doInit();
|
||||
plugin.registerRecipes();
|
||||
Log.fine("Init Complete: {0}", plugin);
|
||||
Log.debug("Init Complete: {0}", plugin);
|
||||
}
|
||||
}
|
||||
|
||||
public static void runPostInit() {
|
||||
stage = Stage.POST_INIT;
|
||||
for (IForestryPlugin plugin : loadedPlugins) {
|
||||
Log.fine("Post-Init Start: {0}", plugin);
|
||||
Log.debug("Post-Init Start: {0}", plugin);
|
||||
plugin.postInit();
|
||||
Log.fine("Post-Init Complete: {0}", plugin);
|
||||
Log.debug("Post-Init Complete: {0}", plugin);
|
||||
}
|
||||
|
||||
stage = Stage.FINISHED;
|
||||
|
||||
@@ -46,7 +46,7 @@ public class PluginBuildCraftTransport extends BlankForestryPlugin {
|
||||
if (pipeWaterproof != null) {
|
||||
RecipeUtil.addShapelessRecipe(new ItemStack(pipeWaterproof), beeswax);
|
||||
} else {
|
||||
Log.fine("No BuildCraft pipe waterproof found.");
|
||||
Log.warning("No BuildCraft pipe waterproof found.");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user