当前位置: 首页>>代码示例>>Java>>正文


Java ITurtleUpgrade类代码示例

本文整理汇总了Java中dan200.turtle.api.ITurtleUpgrade的典型用法代码示例。如果您正苦于以下问题:Java ITurtleUpgrade类的具体用法?Java ITurtleUpgrade怎么用?Java ITurtleUpgrade使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ITurtleUpgrade类属于dan200.turtle.api包,在下文中一共展示了ITurtleUpgrade类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: displayAllReleventItems

import dan200.turtle.api.ITurtleUpgrade; //导入依赖的package包/类
@Override
public void displayAllReleventItems(List list) {
	super.displayAllReleventItems(list);
	
	ItemStack base = GameRegistry.findItemStack("CCTurtle", "CC-TurtleExpanded", 1);
	if (base == null) return;
	
	for (ITurtleUpgrade upgrade : upgrades) {
		boolean isTool = upgrade.getType() == TurtleUpgradeType.Tool;
		
		ItemStack upg1 = base.copy();
		upg1.stackTagCompound = new NBTTagCompound();
		upg1.stackTagCompound.setShort(isTool ? "leftUpgrade" : "rightUpgrade", (short) upgrade.getUpgradeID());
		
		for (int id : new int[] {1,2,3,4,5,6,7}) {
			if (isTool && id > 2) continue;
			
			ItemStack upg2 = upg1.copy();
			upg2.stackTagCompound.setShort(isTool ? "rightUpgrade" : "leftUpgrade", (short) id);
			list.add(upg2);
		}
	}
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:24,代码来源:CreativeTabMiscPeripherals.java

示例2: registerUpgrade

import dan200.turtle.api.ITurtleUpgrade; //导入依赖的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);
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:11,代码来源:MiscPeripherals.java

示例3: registerUpgrade

import dan200.turtle.api.ITurtleUpgrade; //导入依赖的package包/类
public static void registerUpgrade(ITurtleUpgrade upgrade) {
	upgrades.add(upgrade);
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:4,代码来源:Icons.java

示例4: setTurtleUpgrade

import dan200.turtle.api.ITurtleUpgrade; //导入依赖的package包/类
public static void setTurtleUpgrade(ITurtleAccess turtle, TurtleSide side, ITurtleUpgrade upgrade) {
	Reflector.invoke(turtle, "set"+side.name()+"Upgrade", Object.class, upgrade);
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:4,代码来源:Util.java

示例5: registerUpgradeIcons

import dan200.turtle.api.ITurtleUpgrade; //导入依赖的package包/类
@Override
public void registerUpgradeIcons(ITurtleUpgrade icons) {
	Icons.registerUpgrade(icons);
}
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:5,代码来源:APICallHandler.java

示例6: createTurtleItemStack

import dan200.turtle.api.ITurtleUpgrade; //导入依赖的package包/类
public static ItemStack createTurtleItemStack(boolean advanced, ITurtleUpgrade left, ITurtleUpgrade right) {
    return createTurtleItemStack(advanced,
            left == null ? null : (short)left.getUpgradeID(),
            right == null ? null : (short)right.getUpgradeID());
}
 
开发者ID:boq,项目名称:cctags,代码行数:6,代码来源:Recipes.java

示例7: addUpgradedTurtles

import dan200.turtle.api.ITurtleUpgrade; //导入依赖的package包/类
private static void addUpgradedTurtles(List<ItemStack> result, ITurtleUpgrade upgrade, boolean advanced) {
    for (int i = 0; i < NUMBER_OF_TURTLE_TOOLS; i++)
        result.add(createTurtleItemStack(advanced, (short)upgrade.getUpgradeID(), (short)i));
}
 
开发者ID:boq,项目名称:cctags,代码行数:5,代码来源:Recipes.java

示例8: registerUpgradeIcons

import dan200.turtle.api.ITurtleUpgrade; //导入依赖的package包/类
/**
 * Register an upgrade implementing {@link IUpgradeIcons} or {@link IUpgradeToolIcons} to receive icons.
 * 
 * @param icons Upgrade to be registered
 */
public abstract void registerUpgradeIcons(ITurtleUpgrade icons);
 
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:7,代码来源:MiscPeripheralsAPI.java


注:本文中的dan200.turtle.api.ITurtleUpgrade类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。