本文整理汇总了Java中dan200.turtle.api.TurtleAPI类的典型用法代码示例。如果您正苦于以下问题:Java TurtleAPI类的具体用法?Java TurtleAPI怎么用?Java TurtleAPI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TurtleAPI类属于dan200.turtle.api包,在下文中一共展示了TurtleAPI类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerUpgrade
import dan200.turtle.api.TurtleAPI; //导入依赖的package包/类
public static void registerUpgrade(ITurtleUpgrade upgrade) {
if (upgrade.getUpgradeID() > 255 && ccVersion != null && (ccVersion.contains("1.52") || ccVersion.contains("1.51"))) {
log.warning("Not registering upgrade [" + upgrade.getAdjective() + "] due to high ID and old CC (" + ccVersion + ")");
return;
}
TurtleAPI.registerUpgrade(upgrade);
Icons.registerUpgrade(upgrade);
CreativeTabMiscPeripherals.registerUpgrade(upgrade);
}
示例2: modsLoaded
import dan200.turtle.api.TurtleAPI; //导入依赖的package包/类
@EventHandler
public void modsLoaded(FMLPostInitializationEvent evt) {
try {
TagLibrary.instance.readLibrary();
} catch (Throwable t) {
throw Throwables.propagate(t);
}
for (TurtlePeripheralType type : TurtlePeripheralType.TYPES)
TurtleAPI.registerUpgrade(type);
TurtleAPI.registerUpgrade(TurtlePeripheralType.MANIPULATOR);
}