mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 20:12:19 +00:00
General clean up and improvement of internal plugin system
This commit is contained in:
1 parent
3ad5bdd598
commit
7cc3668a70
26 files changed
+593
-762
No files matched your search
@@ -31,8 +31,6 @@ import buildcraft.api.power.PowerHandler.PowerReceiver;
|
||||
import buildcraft.api.recipes.BuildcraftRecipes;
|
||||
import buildcraft.api.transport.IPipeTile;
|
||||
|
||||
import forestry.api.core.IPlugin;
|
||||
import forestry.api.core.PluginInfo;
|
||||
import forestry.core.GameMode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Configuration;
|
||||
@@ -43,8 +41,8 @@ import forestry.core.gadgets.TileForestry;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.LiquidHelper;
|
||||
|
||||
@PluginInfo(pluginID = "BC6", name = "BuildCraft 6", author = "SirSengir", url = Defaults.URL, description = "Compatibility plugin for BuildCraft 6.")
|
||||
public class PluginBuildCraft implements IPlugin, ITriggerProvider {
|
||||
@Plugin(pluginID = "BC6", name = "BuildCraft 6", author = "SirSengir", url = Defaults.URL, description = "Compatibility plugin for BuildCraft 6.")
|
||||
public class PluginBuildCraft extends ForestryPlugin implements ITriggerProvider {
|
||||
|
||||
public static PluginBuildCraft instance;
|
||||
public static Configuration config;
|
||||
@@ -68,6 +66,11 @@ public class PluginBuildCraft implements IPlugin, ITriggerProvider {
|
||||
return (Proxies.common.isModLoaded("BuildCraft|Core", validVersionRange) && Proxies.common.isModLoaded("BuildCraft|Transport", validVersionRange));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFailMessage() {
|
||||
return "Compatible Buildcraft version not found";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doInit() {
|
||||
config = Config.config;
|
||||
@@ -92,10 +95,6 @@ public class PluginBuildCraft implements IPlugin, ITriggerProvider {
|
||||
initLiquids();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
}
|
||||
|
||||
private void initLiquids() {
|
||||
LiquidHelper.injectWaxContainer(Defaults.LIQUID_OIL, Defaults.BUCKET_VOLUME, ForestryItem.waxCapsuleOil.getItemStack(), ForestryItem.waxCapsule.getItemStack());
|
||||
LiquidHelper.injectWaxContainer(Defaults.LIQUID_FUEL, Defaults.BUCKET_VOLUME, ForestryItem.waxCapsuleFuel.getItemStack(), ForestryItem.waxCapsule.getItemStack());
|
||||
@@ -156,8 +155,4 @@ public class PluginBuildCraft implements IPlugin, ITriggerProvider {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user