mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 20:12:19 +00:00
Creates a new command framework that supports trees of commands simply and easily.
Depreciated CommandMC. Many commands remain to be converted to the new system. Added a butterfly kill command.
This commit is contained in:
1 parent
2132c4457d
commit
4a390fe967
12 files changed
+624
-178
No files matched your search
@@ -23,7 +23,6 @@ import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import forestry.api.circuits.ChipsetManager;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.core.CommandForestry;
|
||||
import forestry.core.CreativeTabForestry;
|
||||
import forestry.core.GameMode;
|
||||
import forestry.core.PickupHandlerCore;
|
||||
@@ -31,6 +30,9 @@ import forestry.core.SaveEventHandlerCore;
|
||||
import forestry.core.circuits.CircuitRegistry;
|
||||
import forestry.core.circuits.ItemCircuitBoard;
|
||||
import forestry.core.circuits.ItemSolderingIron;
|
||||
import forestry.core.commands.CommandPlugins;
|
||||
import forestry.core.commands.CommandVersion;
|
||||
import forestry.core.commands.RootCommand;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
@@ -74,11 +76,15 @@ public class PluginCore extends ForestryPlugin {
|
||||
public static MachineDefinition definitionEscritoire;
|
||||
// ICrashCallable for highlighting certain mods during crashes.
|
||||
public static ForestryModEnvWarningCallable crashCallable;
|
||||
public static RootCommand rootCommand = new RootCommand();
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
super.preInit();
|
||||
|
||||
rootCommand.addChildCommand(new CommandVersion());
|
||||
rootCommand.addChildCommand(new CommandPlugins());
|
||||
|
||||
ChipsetManager.solderManager = new ItemSolderingIron.SolderManager();
|
||||
|
||||
CircuitRegistry circuitRegistry = new CircuitRegistry();
|
||||
@@ -109,7 +115,7 @@ public class PluginCore extends ForestryPlugin {
|
||||
OreDictionary.registerOre("oreApatite", ForestryBlock.resources.getItemStack(1, 0));
|
||||
OreDictionary.registerOre("oreCopper", ForestryBlock.resources.getItemStack(1, 1));
|
||||
OreDictionary.registerOre("oreTin", ForestryBlock.resources.getItemStack(1, 2));
|
||||
|
||||
|
||||
ForestryBlock.resourceStorage.registerBlock(new BlockResourceStorageBlock(), ItemForestryBlock.class, "resourceStorage");
|
||||
ForestryBlock.resourceStorage.block().setHarvestLevel("pickaxe", 0, 0);
|
||||
ForestryBlock.resourceStorage.block().setHarvestLevel("pickaxe", 0, 1);
|
||||
@@ -435,17 +441,17 @@ public class PluginCore extends ForestryPlugin {
|
||||
|
||||
// / Pipette
|
||||
Proxies.common.addRecipe(ForestryItem.pipette.getItemStack(), " #", " X ", "X ", 'X', Blocks.glass_pane, '#', new ItemStack(Blocks.wool, 1, Defaults.WILDCARD));
|
||||
|
||||
|
||||
// Storage Blocks
|
||||
Proxies.common.addRecipe(ForestryBlock.resourceStorage.getItemStack(1, 0), "###", "###", "###", '#', "gemApatite");
|
||||
Proxies.common.addShapelessRecipe(ForestryItem.apatite.getItemStack(9), "blockApatite");
|
||||
|
||||
Proxies.common.addRecipe(ForestryBlock.resourceStorage.getItemStack(1, 1), "###", "###", "###", '#', "ingotCopper");
|
||||
Proxies.common.addShapelessRecipe(ForestryItem.ingotCopper.getItemStack(9), "blockCopper");
|
||||
|
||||
|
||||
Proxies.common.addRecipe(ForestryBlock.resourceStorage.getItemStack(1, 2), "###", "###", "###", '#', "ingotTin");
|
||||
Proxies.common.addShapelessRecipe(ForestryItem.ingotTin.getItemStack(9), "blockTin");
|
||||
|
||||
|
||||
Proxies.common.addRecipe(ForestryBlock.resourceStorage.getItemStack(1, 3), "###", "###", "###", '#', "ingotBronze");
|
||||
Proxies.common.addShapelessRecipe(ForestryItem.ingotBronze.getItemStack(9), "blockBronze");
|
||||
}
|
||||
@@ -457,7 +463,7 @@ public class PluginCore extends ForestryPlugin {
|
||||
|
||||
@Override
|
||||
public ICommand[] getConsoleCommands() {
|
||||
return new ICommand[]{new CommandForestry()};
|
||||
return new ICommand[]{rootCommand};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,6 +48,7 @@ import forestry.core.utils.Utils;
|
||||
import forestry.lepidopterology.ButterflySpawner;
|
||||
import forestry.lepidopterology.GuiHandlerLepidopterology;
|
||||
import forestry.lepidopterology.MatingRecipe;
|
||||
import forestry.lepidopterology.commands.CommandButterfly;
|
||||
import forestry.lepidopterology.entities.EntityButterfly;
|
||||
import forestry.lepidopterology.gadgets.TileLepidopteristChest;
|
||||
import forestry.lepidopterology.genetics.AlleleButterflySpecies;
|
||||
@@ -110,6 +111,8 @@ public class PluginLepidopterology extends ForestryPlugin {
|
||||
|
||||
config.save();
|
||||
|
||||
PluginCore.rootCommand.addChildCommand(new CommandButterfly());
|
||||
|
||||
Utils.registerEntity(EntityButterfly.class, "butterflyGE", 0, 0x000000, 0xffffff, 50, 1, true);
|
||||
proxy.initializeRendering();
|
||||
registerTemplates();
|
||||
|
||||
Reference in new issue
Block a user