mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +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
@@ -10,6 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.plugins;
|
||||
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -25,7 +26,6 @@ import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraftforge.common.ChestGenHooks;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
@@ -36,7 +36,6 @@ import forestry.api.arboriculture.EnumGermlingType;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.ITreeRoot;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.core.PluginInfo;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
@@ -126,7 +125,6 @@ import forestry.arboriculture.worldgen.WorldGenWalnut;
|
||||
import forestry.arboriculture.worldgen.WorldGenWenge;
|
||||
import forestry.arboriculture.worldgen.WorldGenWillow;
|
||||
import forestry.core.GameMode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.config.ForestryItem;
|
||||
@@ -134,9 +132,7 @@ import forestry.core.gadgets.BlockBase;
|
||||
import forestry.core.gadgets.MachineDefinition;
|
||||
import forestry.core.genetics.Allele;
|
||||
import forestry.core.genetics.FruitFamily;
|
||||
import forestry.core.interfaces.IOreDictionaryHandler;
|
||||
import forestry.core.interfaces.IPacketHandler;
|
||||
import forestry.core.interfaces.ISaveEventHandler;
|
||||
import forestry.core.items.ItemForestryBlock;
|
||||
import forestry.core.items.ItemFruit.EnumFruit;
|
||||
import forestry.core.proxy.Proxies;
|
||||
@@ -145,8 +141,8 @@ import forestry.core.utils.RecipeUtil;
|
||||
import forestry.core.utils.ShapedRecipeCustom;
|
||||
import java.util.EnumSet;
|
||||
|
||||
@PluginInfo(pluginID = "Arboriculture", name = "Arboriculture", author = "Binnie & SirSengir", url = Defaults.URL, description = "Adds additional tree species and products.")
|
||||
public class PluginArboriculture extends NativePlugin implements IFuelHandler {
|
||||
@Plugin(pluginID = "Arboriculture", name = "Arboriculture", author = "Binnie & SirSengir", url = Defaults.URL, description = "Adds additional tree species and products.")
|
||||
public class PluginArboriculture extends ForestryPlugin {
|
||||
|
||||
@SidedProxy(clientSide = "forestry.arboriculture.proxy.ClientProxyArboriculture", serverSide = "forestry.arboriculture.proxy.ProxyArboriculture")
|
||||
public static ProxyArboriculture proxy;
|
||||
@@ -177,11 +173,6 @@ public class PluginArboriculture extends NativePlugin implements IFuelHandler {
|
||||
ForestryBlock.fences1,
|
||||
ForestryBlock.fences1);
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return !Config.disableArboriculture;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
@@ -958,16 +949,6 @@ public class PluginArboriculture extends NativePlugin implements IFuelHandler {
|
||||
return new GuiHandlerArboriculture();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISaveEventHandler getSaveEventHandler() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IOreDictionaryHandler getDictionaryHandler() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICommand[] getConsoleCommands() {
|
||||
return new ICommand[]{new CommandSpawnTree(), new CommandSpawnForest(),
|
||||
@@ -975,11 +956,16 @@ public class PluginArboriculture extends NativePlugin implements IFuelHandler {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (ForestryItem.sapling.isItemEqual(fuel))
|
||||
return 100;
|
||||
public IFuelHandler getFuelHandler() {
|
||||
return new IFuelHandler() {
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (ForestryItem.sapling.isItemEqual(fuel))
|
||||
return 100;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user