actually push robot safeguard, remove some commented out code

This commit is contained in:
Adrian 2015-07-19 15:18:02 +02:00
parent 29c90c77b9
commit 547254a32a
3 changed files with 9 additions and 10 deletions

View file

@ -51,6 +51,14 @@ public abstract class RobotManager {
if (aiRobotsByNames.containsKey(name)) {
BCLog.logger.info("Overriding " + aiRobotsByNames.get(name).getName() + " with " + aiRobot.getName());
}
// Check if NBT-load constructor is present
try {
aiRobot.getConstructor(EntityRobotBase.class);
} catch (NoSuchMethodException e) {
throw new RuntimeException("AI class " + aiRobot.getName() + " lacks NBT load construtor! This is a bug!");
}
aiRobots.add(aiRobot);
aiRobotsByNames.put(name, aiRobot);
aiRobotsNames.put(aiRobot, name);

View file

@ -6,7 +6,7 @@
* Please check the contents of the license, which should be located
* as "LICENSE.API" in the BuildCraft source code distribution.
*/
@API(apiVersion = "2.1", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|robotics")
@API(apiVersion = "2.2", owner = "BuildCraftAPI|core", provides = "BuildCraftAPI|robotics")
package buildcraft.api.robots;
import cpw.mods.fml.common.API;

View file

@ -18,7 +18,6 @@ import cpw.mods.fml.relauncher.SideOnly;
import buildcraft.core.proxy.CoreProxy;
public class TickHandlerCore {
private boolean nagged;
@SideOnly(Side.CLIENT)
@ -30,23 +29,15 @@ public class TickHandlerCore {
EntityPlayer player = evt.player;
// if(!Config.disableVersionCheck) {
if (Version.needsUpdateNoticeAndMarkAsSeen()) {
player.addChatMessage(new ChatComponentTranslation("bc_update.new_version",
Version.getRecommendedVersion(),
CoreProxy.proxy.getMinecraftVersion()));
player.addChatMessage(new ChatComponentTranslation("bc_update.download"));
// TODO: This takes too much realstate. See how to improve
// Version.displayChangelog(player);
player.addChatMessage(new ChatComponentTranslation("bc_update.once"));
player.addChatMessage(new ChatComponentTranslation("bc_update.again"));
}
// }
nagged = true;
}
}