Fix and migrate Tree commands to new format. Remove CommandMC

This commit is contained in:
mezz committed 2014-12-13 23:38:36 -08:00
1 parent a8b7098f39
commit a68cbc54e7
25 files changed
+621 -589

No files matched your search

@@ -30,7 +30,6 @@ import net.minecraftforge.client.event.TextureStitchEvent;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.FMLCommonHandler;
@@ -73,7 +72,7 @@ import forestry.apiculture.GuiHandlerApiculture;
import forestry.apiculture.PacketHandlerApiculture;
import forestry.apiculture.SaveEventHandlerApiculture;
import forestry.apiculture.VillageHandlerApiculture;
import forestry.apiculture.commands.CommandBeekeeping;
import forestry.apiculture.commands.CommandBee;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.apiculture.gadgets.BlockBeehives;
import forestry.apiculture.gadgets.BlockCandle;
@@ -269,8 +268,15 @@ public class PluginApiculture extends ForestryPlugin {
// Register village components with the Structure registry.
VillageHandlerApiculture.registerVillageComponents();
// Modes
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.easy);
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.normal);
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.hard);
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.hardcore);
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.insane);
// Commands
PluginCore.rootCommand.addChildCommand(new CommandBeekeeping());
PluginCore.rootCommand.addChildCommand(new CommandBee());
}
@Override
@@ -306,12 +312,6 @@ public class PluginApiculture extends ForestryPlugin {
createMutations();
registerBeehiveDrops();
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.easy);
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.normal);
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.hard);
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.hardcore);
PluginApiculture.beeInterface.registerBeekeepingMode(BeekeepingMode.insane);
// Inducers for swarmer
BeeManager.inducers.put(ForestryItem.royalJelly.getItemStack(), 10);
@@ -16,7 +16,6 @@ import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.command.ICommand;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -46,7 +45,6 @@ import forestry.api.genetics.IClassification.EnumClassLevel;
import forestry.api.genetics.IFruitFamily;
import forestry.api.recipes.RecipeManagers;
import forestry.api.storage.BackpackManager;
import forestry.arboriculture.CommandTreekeepingMode;
import forestry.arboriculture.EventHandlerArboriculture;
import forestry.arboriculture.FruitProviderNone;
import forestry.arboriculture.FruitProviderPod;
@@ -57,7 +55,7 @@ import forestry.arboriculture.GuiHandlerArboriculture;
import forestry.arboriculture.PacketHandlerArboriculture;
import forestry.arboriculture.VillageHandlerArboriculture;
import forestry.arboriculture.WoodType;
import forestry.arboriculture.commands.CommandTrees;
import forestry.arboriculture.commands.CommandTree;
import forestry.arboriculture.gadgets.BlockArbFence;
import forestry.arboriculture.gadgets.BlockArbFence.FenceCat;
import forestry.arboriculture.gadgets.BlockArbStairs;
@@ -295,8 +293,15 @@ public class PluginArboriculture extends ForestryPlugin {
validFences.add(Blocks.fence_gate);
validFences.add(Blocks.nether_brick_fence);
// Modes
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.easy);
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.normal);
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.hard);
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.hardcore);
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.insane);
// Commands
PluginCore.rootCommand.addChildCommand(new CommandTrees());
PluginCore.rootCommand.addChildCommand(new CommandTree());
}
@Override
@@ -313,12 +318,6 @@ public class PluginArboriculture extends ForestryPlugin {
registerTemplates();
registerErsatzGenomes();
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.easy);
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.normal);
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.hard);
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.hardcore);
PluginArboriculture.treeInterface.registerTreekeepingMode(TreekeepingMode.insane);
MinecraftForge.EVENT_BUS.register(new EventHandlerArboriculture());
VillagerRegistry.instance().registerVillagerId(Defaults.ID_VILLAGER_LUMBERJACK);
@@ -1102,11 +1101,6 @@ public class PluginArboriculture extends ForestryPlugin {
return new GuiHandlerArboriculture();
}
@Override
public ICommand[] getConsoleCommands() {
return new ICommand[]{new CommandTreekeepingMode()};
}
@Override
public IFuelHandler getFuelHandler() {
return new IFuelHandler() {