From d362a062a932dbdb52c0ecf3f2dc7f36027e2caa Mon Sep 17 00:00:00 2001 From: Hea3veN Date: Tue, 3 Feb 2015 22:46:21 -0300 Subject: [PATCH] added a registry for the robot ResourceId classes --- api/buildcraft/api/robots/AIRobot.java | 10 +- api/buildcraft/api/robots/AIRobotManager.java | 49 -------- api/buildcraft/api/robots/ResourceId.java | 12 +- api/buildcraft/api/robots/RobotManager.java | 80 ++++++++++++ common/buildcraft/BuildCraftCore.java | 118 +++++++++--------- 5 files changed, 156 insertions(+), 113 deletions(-) delete mode 100644 api/buildcraft/api/robots/AIRobotManager.java create mode 100644 api/buildcraft/api/robots/RobotManager.java diff --git a/api/buildcraft/api/robots/AIRobot.java b/api/buildcraft/api/robots/AIRobot.java index f03b6ad3..68420eab 100755 --- a/api/buildcraft/api/robots/AIRobot.java +++ b/api/buildcraft/api/robots/AIRobot.java @@ -148,7 +148,7 @@ public class AIRobot { } public final void writeToNBT(NBTTagCompound nbt) { - nbt.setString("aiName", AIRobotManager.getAIRobotName(getClass())); + nbt.setString("aiName", RobotManager.getAIRobotName(getClass())); NBTTagCompound data = new NBTTagCompound(); writeSelfToNBT(data); @@ -172,9 +172,9 @@ public class AIRobot { Class aiRobotClass = null; if (sub.hasKey("class")) { // Migration support for 6.4.x - aiRobotClass = AIRobotManager.getAIRobotByLegacyClassName(sub.getString("class")); + aiRobotClass = RobotManager.getAIRobotByLegacyClassName(sub.getString("class")); } else { - aiRobotClass = AIRobotManager.getAIRobotByName(sub.getString("aiName")); + aiRobotClass = RobotManager.getAIRobotByName(sub.getString("aiName")); } delegateAI = (AIRobot) aiRobotClass.getConstructor(EntityRobotBase.class) .newInstance(robot); @@ -196,9 +196,9 @@ public class AIRobot { Class aiRobotClass = null; if (nbt.hasKey("class")) { // Migration support for 6.4.x - aiRobotClass = AIRobotManager.getAIRobotByLegacyClassName(nbt.getString("class")); + aiRobotClass = RobotManager.getAIRobotByLegacyClassName(nbt.getString("class")); } else { - aiRobotClass = AIRobotManager.getAIRobotByName(nbt.getString("aiName")); + aiRobotClass = RobotManager.getAIRobotByName(nbt.getString("aiName")); } ai = (AIRobot) aiRobotClass.getConstructor(EntityRobotBase.class) .newInstance(robot); diff --git a/api/buildcraft/api/robots/AIRobotManager.java b/api/buildcraft/api/robots/AIRobotManager.java deleted file mode 100644 index 927313c8..00000000 --- a/api/buildcraft/api/robots/AIRobotManager.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team - * http://www.mod-buildcraft.com - * - * BuildCraft is distributed under the terms of the Minecraft Mod Public - * License 1.0, or MMPL. Please check the contents of the license located in - * http://www.mod-buildcraft.com/MMPL-1.0.txt - */ -package buildcraft.api.robots; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -public abstract class AIRobotManager { - - public static ArrayList> aiRobots = new ArrayList>(); - private static Map, String> aiRobotsNames = - new HashMap, String>(); - private static Map> aiRobotsByNames = - new HashMap>(); - private static Map> aiRobotsByLegacyClassNames = - new HashMap>(); - - public static void registerAIRobot(Class aiRobot, String name) { - registerAIRobot(aiRobot, name, null); - } - - public static void registerAIRobot(Class pluggable, String name, String legacyClassName) { - aiRobots.add(pluggable); - aiRobotsByNames.put(name, pluggable); - aiRobotsNames.put(pluggable, name); - if(legacyClassName != null) { - aiRobotsByLegacyClassNames.put(legacyClassName, pluggable); - } - } - - public static Class getAIRobotByName(String pluggableName) { - return aiRobotsByNames.get(pluggableName); - } - - public static String getAIRobotName(Class aClass) { - return aiRobotsNames.get(aClass); - } - - public static Class getAIRobotByLegacyClassName(String string) { - return aiRobotsByLegacyClassNames.get(string); - } -} diff --git a/api/buildcraft/api/robots/ResourceId.java b/api/buildcraft/api/robots/ResourceId.java index a3fbf87e..ed353e16 100755 --- a/api/buildcraft/api/robots/ResourceId.java +++ b/api/buildcraft/api/robots/ResourceId.java @@ -47,7 +47,7 @@ public abstract class ResourceId { nbt.setTag("index", indexNBT); nbt.setByte("side", (byte) side.ordinal()); nbt.setInteger("localId", localId); - nbt.setString("class", getClass().getCanonicalName()); + nbt.setString("resourceName", RobotManager.getResourceIdName(getClass())); } protected void readFromNBT(NBTTagCompound nbt) { @@ -58,9 +58,15 @@ public abstract class ResourceId { public static ResourceId load(NBTTagCompound nbt) { try { - Class clas = Class.forName(nbt.getString("class")); + Class cls = null; + if (nbt.hasKey("class")) { + // Migration support for 6.4.x + cls = RobotManager.getResourceIdByLegacyClassName(nbt.getString("class")); + } else { + cls = RobotManager.getResourceIdByName("resourceName"); + } - ResourceId id = (ResourceId) clas.newInstance(); + ResourceId id = (ResourceId) cls.newInstance(); id.readFromNBT(nbt); return id; diff --git a/api/buildcraft/api/robots/RobotManager.java b/api/buildcraft/api/robots/RobotManager.java new file mode 100644 index 00000000..011d0676 --- /dev/null +++ b/api/buildcraft/api/robots/RobotManager.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ +package buildcraft.api.robots; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +public abstract class RobotManager { + + public static ArrayList> aiRobots = new ArrayList>(); + private static Map, String> aiRobotsNames = + new HashMap, String>(); + private static Map> aiRobotsByNames = + new HashMap>(); + private static Map> aiRobotsByLegacyClassNames = + new HashMap>(); + + private static Map, String> resourceIdNames = + new HashMap, String>(); + private static Map> resourceIdByNames = + new HashMap>(); + private static Map> resourceIdLegacyClassNames = + new HashMap>(); + + public static void registerAIRobot(Class aiRobot, String name) { + registerAIRobot(aiRobot, name, null); + } + + public static void registerAIRobot(Class aiRobot, String name, String legacyClassName) { + aiRobots.add(aiRobot); + aiRobotsByNames.put(name, aiRobot); + aiRobotsNames.put(aiRobot, name); + if(legacyClassName != null) { + aiRobotsByLegacyClassNames.put(legacyClassName, aiRobot); + } + } + + public static Class getAIRobotByName(String aiRobotName) { + return aiRobotsByNames.get(aiRobotName); + } + + public static String getAIRobotName(Class aiRobotClass) { + return aiRobotsNames.get(aiRobotClass); + } + + public static Class getAIRobotByLegacyClassName(String aiRobotLegacyClassName) { + return aiRobotsByLegacyClassNames.get(aiRobotLegacyClassName); + } + + public static void registerResourceId(Class resourceId, String name) { + registerResourceId(resourceId, name, null); + } + + public static void registerResourceId(Class resourceId, String name, String legacyClassName) { + resourceIdByNames.put(name, resourceId); + resourceIdNames.put(resourceId, name); + if(legacyClassName != null) { + resourceIdLegacyClassNames.put(legacyClassName, resourceId); + } + } + + public static Class getResourceIdByName(String resourceIdName) { + return resourceIdByNames.get(resourceIdName); + } + + public static String getResourceIdName(Class resouceIdClass) { + return resourceIdNames.get(resouceIdClass); + } + + public static Class getResourceIdByLegacyClassName(String resourceIdLegacyClassName) { + return resourceIdLegacyClassNames.get(resourceIdLegacyClassName); + } +} diff --git a/common/buildcraft/BuildCraftCore.java b/common/buildcraft/BuildCraftCore.java index e4c21fd3..84636bd7 100644 --- a/common/buildcraft/BuildCraftCore.java +++ b/common/buildcraft/BuildCraftCore.java @@ -65,7 +65,7 @@ import buildcraft.api.core.IWorldProperty; import buildcraft.api.core.JavaTools; import buildcraft.api.fuels.BuildcraftFuelRegistry; import buildcraft.api.recipes.BuildcraftRecipeRegistry; -import buildcraft.api.robots.AIRobotManager; +import buildcraft.api.robots.RobotManager; import buildcraft.api.statements.IActionExternal; import buildcraft.api.statements.IActionInternal; import buildcraft.api.statements.IStatement; @@ -125,6 +125,9 @@ import buildcraft.core.utils.WorldPropertyIsWood; import buildcraft.energy.fuels.CoolantManager; import buildcraft.energy.fuels.FuelManager; import buildcraft.robots.EntityRobot; +import buildcraft.robots.ResourceIdAssemblyTable; +import buildcraft.robots.ResourceIdBlock; +import buildcraft.robots.ResourceIdRequest; import buildcraft.robots.ai.AIRobotAttack; import buildcraft.robots.ai.AIRobotBreak; import buildcraft.robots.ai.AIRobotCraftAssemblyTable; @@ -411,61 +414,64 @@ public class BuildCraftCore extends BuildCraftMod { StatementManager.registerTriggerProvider(new DefaultTriggerProvider()); StatementManager.registerActionProvider(new DefaultActionProvider()); - AIRobotManager.registerAIRobot(AIRobotMain.class, "aiRobotMain","buildcraft.core.robots.AIRobotMain"); - AIRobotManager.registerAIRobot(BoardRobotBomber.class, "boardRobotBomber", "buildcraft.core.robots.boards.BoardRobotBomber"); - AIRobotManager.registerAIRobot(BoardRobotBuilder.class, "boardRobotBuilder", "buildcraft.core.robots.boards.BoardRobotBuilder"); - AIRobotManager.registerAIRobot(BoardRobotButcher.class, "boardRobotButcher", "buildcraft.core.robots.boards.BoardRobotButcher"); - AIRobotManager.registerAIRobot(BoardRobotCarrier.class, "boardRobotCarrier", "buildcraft.core.robots.boards.BoardRobotCarrier"); - AIRobotManager.registerAIRobot(BoardRobotCrafter.class, "boardRobotCrafter", "buildcraft.core.robots.boards.BoardRobotCrafter"); - AIRobotManager.registerAIRobot(BoardRobotDelivery.class, "boardRobotDelivery", "buildcraft.core.robots.boards.BoardRobotDelivery"); - AIRobotManager.registerAIRobot(BoardRobotFarmer.class, "boardRobotFarmer", "buildcraft.core.robots.boards.BoardRobotFarmer"); - AIRobotManager.registerAIRobot(BoardRobotFluidCarrier.class, "boardRobotFluidCarrier", "buildcraft.core.robots.boards.BoardRobotFluidCarrier"); - AIRobotManager.registerAIRobot(BoardRobotHarvester.class, "boardRobotHarvester", "buildcraft.core.robots.boards.BoardRobotHarvester"); - AIRobotManager.registerAIRobot(BoardRobotKnight.class, "boardRobotKnight", "buildcraft.core.robots.boards.BoardRobotKnight"); - AIRobotManager.registerAIRobot(BoardRobotLeaveCutter.class, "boardRobotLeaveCutter", "buildcraft.core.robots.boards.BoardRobotLeaveCutter"); - AIRobotManager.registerAIRobot(BoardRobotLumberjack.class, "boardRobotLumberjack", "buildcraft.core.robots.boards.BoardRobotLumberjack"); - AIRobotManager.registerAIRobot(BoardRobotMiner.class, "boardRobotMiner", "buildcraft.core.robots.boards.BoardRobotMiner"); - AIRobotManager.registerAIRobot(BoardRobotPicker.class, "boardRobotPicker", "buildcraft.core.robots.boards.BoardRobotPicker"); - AIRobotManager.registerAIRobot(BoardRobotPlanter.class, "boardRobotPlanter", "buildcraft.core.robots.boards.BoardRobotPlanter"); - AIRobotManager.registerAIRobot(BoardRobotPump.class, "boardRobotPump", "buildcraft.core.robots.boards.BoardRobotPump"); - AIRobotManager.registerAIRobot(BoardRobotShovelman.class, "boardRobotShovelman", "buildcraft.core.robots.boards.BoardRobotShovelman"); - AIRobotManager.registerAIRobot(AIRobotAttack.class, "aiRobotAttack", "buildcraft.core.robots.AIRobotAttack"); - AIRobotManager.registerAIRobot(AIRobotBreak.class, "aiRobotBreak", "buildcraft.core.robots.AIRobotBreak"); - AIRobotManager.registerAIRobot(AIRobotCraftAssemblyTable.class, "aiRobotCraftAssemblyTable", "buildcraft.core.robots.AIRobotCraftAssemblyTable"); - AIRobotManager.registerAIRobot(AIRobotCraftFurnace.class, "aiRobotCraftFurnace", "buildcraft.core.robots.AIRobotCraftFurnace"); - AIRobotManager.registerAIRobot(AIRobotCraftWorkbench.class, "aiRobotCraftWorkbench", "buildcraft.core.robots.AIRobotCraftWorkbench"); - AIRobotManager.registerAIRobot(AIRobotDeliverRequested.class, "aiRobotDeliverRequested", "buildcraft.core.robots.AIRobotDeliverRequested"); - AIRobotManager.registerAIRobot(AIRobotDisposeItems.class, "aiRobotDisposeItems", "buildcraft.core.robots.AIRobotDisposeItems"); - AIRobotManager.registerAIRobot(AIRobotFetchAndEquipItemStack.class, "aiRobotFetchAndEquipItemStack", "buildcraft.core.robots.AIRobotFetchAndEquipItemStack"); - AIRobotManager.registerAIRobot(AIRobotFetchItem.class, "aiRobotFetchItem", "buildcraft.core.robots.AIRobotFetchItem"); - AIRobotManager.registerAIRobot(AIRobotGoAndLinkToDock.class, "aiRobotGoAndLinkToDock", "buildcraft.core.robots.AIRobotGoAndLinkToDock"); - AIRobotManager.registerAIRobot(AIRobotGoto.class, "aiRobotGoto", "buildcraft.core.robots.AIRobotGoto"); - AIRobotManager.registerAIRobot(AIRobotGotoBlock.class, "aiRobotGotoBlock", "buildcraft.core.robots.AIRobotGotoBlock"); - AIRobotManager.registerAIRobot(AIRobotGotoRandomGroundBlock.class, "aiRobotGotoRandomGroundBlock", "buildcraft.core.robots.AIRobotGotoRandomGroundBlock"); - AIRobotManager.registerAIRobot(AIRobotGotoSleep.class, "aiRobotGotoSleep", "buildcraft.core.robots.AIRobotGotoSleep"); - AIRobotManager.registerAIRobot(AIRobotGotoStation.class, "aiRobotGotoStation", "buildcraft.core.robots.AIRobotGotoStation"); - AIRobotManager.registerAIRobot(AIRobotGotoStationAndLoad.class, "aiRobotGotoStationAndLoad", "buildcraft.core.robots.AIRobotGotoStationAndLoad"); - AIRobotManager.registerAIRobot(AIRobotGotoStationAndLoadFluids.class, "aiRobotGotoStationAndLoadFluids", "buildcraft.core.robots.AIRobotGotoStationAndLoadFluids"); - AIRobotManager.registerAIRobot(AIRobotGotoStationAndUnload.class, "aiRobotGotoStationAndUnload", "buildcraft.core.robots.AIRobotGotoStationAndUnload"); - AIRobotManager.registerAIRobot(AIRobotGotoStationToLoad.class, "aiRobotGotoStationToLoad", "buildcraft.core.robots.AIRobotGotoStationToLoad"); - AIRobotManager.registerAIRobot(AIRobotGotoStationToLoadFluids.class, "aiRobotGotoStationToLoadFluids", "buildcraft.core.robots.AIRobotGotoStationToLoadFluids"); - AIRobotManager.registerAIRobot(AIRobotGotoStationToUnload.class, "aiRobotGotoStationToUnload", "buildcraft.core.robots.AIRobotGotoStationToUnload"); - AIRobotManager.registerAIRobot(AIRobotGotoStationToUnloadFluids.class, "aiRobotGotoStationToUnloadFluids", "buildcraft.core.robots.AIRobotGotoStationToUnloadFluids"); - AIRobotManager.registerAIRobot(AIRobotLoad.class, "aiRobotLoad", "buildcraft.core.robots.AIRobotLoad"); - AIRobotManager.registerAIRobot(AIRobotLoadFluids.class, "aiRobotLoadFluids", "buildcraft.core.robots.AIRobotLoadFluids"); - AIRobotManager.registerAIRobot(AIRobotPumpBlock.class, "aiRobotPumpBlock", "buildcraft.core.robots.AIRobotPumpBlock"); - AIRobotManager.registerAIRobot(AIRobotRecharge.class, "aiRobotRecharge", "buildcraft.core.robots.AIRobotRecharge"); - AIRobotManager.registerAIRobot(AIRobotSearchAndGotoStation.class, "aiRobotSearchAndGotoStation", "buildcraft.core.robots.AIRobotSearchAndGotoStation"); - AIRobotManager.registerAIRobot(AIRobotSearchBlock.class, "aiRobotSearchBlock", "buildcraft.core.robots.AIRobotSearchBlock"); - AIRobotManager.registerAIRobot(AIRobotSearchEntity.class, "aiRobotSearchEntity", "buildcraft.core.robots.AIRobotSearchEntity"); - AIRobotManager.registerAIRobot(AIRobotSearchRandomGroundBlock.class, "aiRobotSearchRandomGroundBlock", "buildcraft.core.robots.AIRobotSearchRandomGroundBlock"); - AIRobotManager.registerAIRobot(AIRobotSearchStackRequest.class, "aiRobotSearchStackRequest", "buildcraft.core.robots.AIRobotSearchStackRequest"); - AIRobotManager.registerAIRobot(AIRobotSearchStation.class, "aiRobotSearchStation", "buildcraft.core.robots.AIRobotSearchStation"); - AIRobotManager.registerAIRobot(AIRobotSleep.class, "aiRobotSleep", "buildcraft.core.robots.AIRobotSleep"); - AIRobotManager.registerAIRobot(AIRobotStraightMoveTo.class, "aiRobotStraightMoveTo", "buildcraft.core.robots.AIRobotStraightMoveTo"); - AIRobotManager.registerAIRobot(AIRobotUnload.class, "aiRobotUnload", "buildcraft.core.robots.AIRobotUnload"); - AIRobotManager.registerAIRobot(AIRobotUnloadFluids.class, "aiRobotUnloadFluids", "buildcraft.core.robots.AIRobotUnloadFluids"); - AIRobotManager.registerAIRobot(AIRobotUseToolOnBlock.class, "aiRobotUseToolOnBlock", "buildcraft.core.robots.AIRobotUseToolOnBlock"); + RobotManager.registerAIRobot(AIRobotMain.class, "aiRobotMain", "buildcraft.core.robots.AIRobotMain"); + RobotManager.registerAIRobot(BoardRobotBomber.class, "boardRobotBomber", "buildcraft.core.robots.boards.BoardRobotBomber"); + RobotManager.registerAIRobot(BoardRobotBuilder.class, "boardRobotBuilder", "buildcraft.core.robots.boards.BoardRobotBuilder"); + RobotManager.registerAIRobot(BoardRobotButcher.class, "boardRobotButcher", "buildcraft.core.robots.boards.BoardRobotButcher"); + RobotManager.registerAIRobot(BoardRobotCarrier.class, "boardRobotCarrier", "buildcraft.core.robots.boards.BoardRobotCarrier"); + RobotManager.registerAIRobot(BoardRobotCrafter.class, "boardRobotCrafter", "buildcraft.core.robots.boards.BoardRobotCrafter"); + RobotManager.registerAIRobot(BoardRobotDelivery.class, "boardRobotDelivery", "buildcraft.core.robots.boards.BoardRobotDelivery"); + RobotManager.registerAIRobot(BoardRobotFarmer.class, "boardRobotFarmer", "buildcraft.core.robots.boards.BoardRobotFarmer"); + RobotManager.registerAIRobot(BoardRobotFluidCarrier.class, "boardRobotFluidCarrier", "buildcraft.core.robots.boards.BoardRobotFluidCarrier"); + RobotManager.registerAIRobot(BoardRobotHarvester.class, "boardRobotHarvester", "buildcraft.core.robots.boards.BoardRobotHarvester"); + RobotManager.registerAIRobot(BoardRobotKnight.class, "boardRobotKnight", "buildcraft.core.robots.boards.BoardRobotKnight"); + RobotManager.registerAIRobot(BoardRobotLeaveCutter.class, "boardRobotLeaveCutter", "buildcraft.core.robots.boards.BoardRobotLeaveCutter"); + RobotManager.registerAIRobot(BoardRobotLumberjack.class, "boardRobotLumberjack", "buildcraft.core.robots.boards.BoardRobotLumberjack"); + RobotManager.registerAIRobot(BoardRobotMiner.class, "boardRobotMiner", "buildcraft.core.robots.boards.BoardRobotMiner"); + RobotManager.registerAIRobot(BoardRobotPicker.class, "boardRobotPicker", "buildcraft.core.robots.boards.BoardRobotPicker"); + RobotManager.registerAIRobot(BoardRobotPlanter.class, "boardRobotPlanter", "buildcraft.core.robots.boards.BoardRobotPlanter"); + RobotManager.registerAIRobot(BoardRobotPump.class, "boardRobotPump", "buildcraft.core.robots.boards.BoardRobotPump"); + RobotManager.registerAIRobot(BoardRobotShovelman.class, "boardRobotShovelman", "buildcraft.core.robots.boards.BoardRobotShovelman"); + RobotManager.registerAIRobot(AIRobotAttack.class, "aiRobotAttack", "buildcraft.core.robots.AIRobotAttack"); + RobotManager.registerAIRobot(AIRobotBreak.class, "aiRobotBreak", "buildcraft.core.robots.AIRobotBreak"); + RobotManager.registerAIRobot(AIRobotCraftAssemblyTable.class, "aiRobotCraftAssemblyTable", "buildcraft.core.robots.AIRobotCraftAssemblyTable"); + RobotManager.registerAIRobot(AIRobotCraftFurnace.class, "aiRobotCraftFurnace", "buildcraft.core.robots.AIRobotCraftFurnace"); + RobotManager.registerAIRobot(AIRobotCraftWorkbench.class, "aiRobotCraftWorkbench", "buildcraft.core.robots.AIRobotCraftWorkbench"); + RobotManager.registerAIRobot(AIRobotDeliverRequested.class, "aiRobotDeliverRequested", "buildcraft.core.robots.AIRobotDeliverRequested"); + RobotManager.registerAIRobot(AIRobotDisposeItems.class, "aiRobotDisposeItems", "buildcraft.core.robots.AIRobotDisposeItems"); + RobotManager.registerAIRobot(AIRobotFetchAndEquipItemStack.class, "aiRobotFetchAndEquipItemStack", "buildcraft.core.robots.AIRobotFetchAndEquipItemStack"); + RobotManager.registerAIRobot(AIRobotFetchItem.class, "aiRobotFetchItem", "buildcraft.core.robots.AIRobotFetchItem"); + RobotManager.registerAIRobot(AIRobotGoAndLinkToDock.class, "aiRobotGoAndLinkToDock", "buildcraft.core.robots.AIRobotGoAndLinkToDock"); + RobotManager.registerAIRobot(AIRobotGoto.class, "aiRobotGoto", "buildcraft.core.robots.AIRobotGoto"); + RobotManager.registerAIRobot(AIRobotGotoBlock.class, "aiRobotGotoBlock", "buildcraft.core.robots.AIRobotGotoBlock"); + RobotManager.registerAIRobot(AIRobotGotoRandomGroundBlock.class, "aiRobotGotoRandomGroundBlock", "buildcraft.core.robots.AIRobotGotoRandomGroundBlock"); + RobotManager.registerAIRobot(AIRobotGotoSleep.class, "aiRobotGotoSleep", "buildcraft.core.robots.AIRobotGotoSleep"); + RobotManager.registerAIRobot(AIRobotGotoStation.class, "aiRobotGotoStation", "buildcraft.core.robots.AIRobotGotoStation"); + RobotManager.registerAIRobot(AIRobotGotoStationAndLoad.class, "aiRobotGotoStationAndLoad", "buildcraft.core.robots.AIRobotGotoStationAndLoad"); + RobotManager.registerAIRobot(AIRobotGotoStationAndLoadFluids.class, "aiRobotGotoStationAndLoadFluids", "buildcraft.core.robots.AIRobotGotoStationAndLoadFluids"); + RobotManager.registerAIRobot(AIRobotGotoStationAndUnload.class, "aiRobotGotoStationAndUnload", "buildcraft.core.robots.AIRobotGotoStationAndUnload"); + RobotManager.registerAIRobot(AIRobotGotoStationToLoad.class, "aiRobotGotoStationToLoad", "buildcraft.core.robots.AIRobotGotoStationToLoad"); + RobotManager.registerAIRobot(AIRobotGotoStationToLoadFluids.class, "aiRobotGotoStationToLoadFluids", "buildcraft.core.robots.AIRobotGotoStationToLoadFluids"); + RobotManager.registerAIRobot(AIRobotGotoStationToUnload.class, "aiRobotGotoStationToUnload", "buildcraft.core.robots.AIRobotGotoStationToUnload"); + RobotManager.registerAIRobot(AIRobotGotoStationToUnloadFluids.class, "aiRobotGotoStationToUnloadFluids", "buildcraft.core.robots.AIRobotGotoStationToUnloadFluids"); + RobotManager.registerAIRobot(AIRobotLoad.class, "aiRobotLoad", "buildcraft.core.robots.AIRobotLoad"); + RobotManager.registerAIRobot(AIRobotLoadFluids.class, "aiRobotLoadFluids", "buildcraft.core.robots.AIRobotLoadFluids"); + RobotManager.registerAIRobot(AIRobotPumpBlock.class, "aiRobotPumpBlock", "buildcraft.core.robots.AIRobotPumpBlock"); + RobotManager.registerAIRobot(AIRobotRecharge.class, "aiRobotRecharge", "buildcraft.core.robots.AIRobotRecharge"); + RobotManager.registerAIRobot(AIRobotSearchAndGotoStation.class, "aiRobotSearchAndGotoStation", "buildcraft.core.robots.AIRobotSearchAndGotoStation"); + RobotManager.registerAIRobot(AIRobotSearchBlock.class, "aiRobotSearchBlock", "buildcraft.core.robots.AIRobotSearchBlock"); + RobotManager.registerAIRobot(AIRobotSearchEntity.class, "aiRobotSearchEntity", "buildcraft.core.robots.AIRobotSearchEntity"); + RobotManager.registerAIRobot(AIRobotSearchRandomGroundBlock.class, "aiRobotSearchRandomGroundBlock", "buildcraft.core.robots.AIRobotSearchRandomGroundBlock"); + RobotManager.registerAIRobot(AIRobotSearchStackRequest.class, "aiRobotSearchStackRequest", "buildcraft.core.robots.AIRobotSearchStackRequest"); + RobotManager.registerAIRobot(AIRobotSearchStation.class, "aiRobotSearchStation", "buildcraft.core.robots.AIRobotSearchStation"); + RobotManager.registerAIRobot(AIRobotSleep.class, "aiRobotSleep", "buildcraft.core.robots.AIRobotSleep"); + RobotManager.registerAIRobot(AIRobotStraightMoveTo.class, "aiRobotStraightMoveTo", "buildcraft.core.robots.AIRobotStraightMoveTo"); + RobotManager.registerAIRobot(AIRobotUnload.class, "aiRobotUnload", "buildcraft.core.robots.AIRobotUnload"); + RobotManager.registerAIRobot(AIRobotUnloadFluids.class, "aiRobotUnloadFluids", "buildcraft.core.robots.AIRobotUnloadFluids"); + RobotManager.registerAIRobot(AIRobotUseToolOnBlock.class, "aiRobotUseToolOnBlock", "buildcraft.core.robots.AIRobotUseToolOnBlock"); + RobotManager.registerResourceId(ResourceIdAssemblyTable.class, "resourceIdAssemblyTable", "buildcraft.core.robots.ResourceIdAssemblyTable"); + RobotManager.registerResourceId(ResourceIdBlock.class, "resourceIdBlock", "buildcraft.core.robots.ResourceIdBlock"); + RobotManager.registerResourceId(ResourceIdRequest.class, "resourceIdRequest", "buildcraft.core.robots.ResourceIdRequest"); if (BuildCraftCore.modifyWorld) { MinecraftForge.EVENT_BUS.register(new SpringPopulate());