本文整理汇总了Java中slimeknights.tconstruct.library.materials.ExtraMaterialStats类的典型用法代码示例。如果您正苦于以下问题:Java ExtraMaterialStats类的具体用法?Java ExtraMaterialStats怎么用?Java ExtraMaterialStats使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExtraMaterialStats类属于slimeknights.tconstruct.library.materials包,在下文中一共展示了ExtraMaterialStats类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import slimeknights.tconstruct.library.materials.ExtraMaterialStats; //导入依赖的package包/类
@Override
public void init() throws OperationException {
// Get our original and copy:
original = ReflectedTinkerRegistry.getMaterial(material);
if(original == null) throw new OperationException("Unable to get TiCon material '" + material + "'.");
updated = ReflectedTinkerRegistry.copyMaterial(original);
// Figure out what to change:
if(head != null) {
updated.addStats(new HeadMaterialStats(head.durability, head.miningSpeed, head.attack, head.harvestLevel));
}
if(handle != null) {
updated.addStats(new HandleMaterialStats(handle.modifier, handle.durability));
}
if(extra != null) {
updated.addStats(new ExtraMaterialStats(extra.bonusDurability));
}
}
示例2: registerMaterials
import slimeknights.tconstruct.library.materials.ExtraMaterialStats; //导入依赖的package包/类
/** Add the mod's materials */
private static void registerMaterials() {
// support for both new and old Tinker's versions
Class traitHolder = null;
try {
traitHolder = Class.forName("slimeknights.tconstruct.tools.TinkerTraits");
} catch (ClassNotFoundException e1) {
try {
traitHolder = Class.forName("slimeknights.tconstruct.tools.TinkerMaterials");
} catch (ClassNotFoundException e2) {}
}
AbstractTrait autosmelt = null;
try {
autosmelt = (AbstractTrait)traitHolder.getField("autosmelt").get(null);
} catch (Exception e) {}
// continue tool integration if there were no errors
if(autosmelt != null) {
electricium = registerMaterial("electricium", LCFluids.moltenElectricium,
"ingotElectricium", new ItemStack(LCItems.ingot, 1, Ingot.ELEC), lightning1);
skyfather = registerMaterial("skyfather", LCFluids.moltenSkyfather,
"ingotSkyfather", new ItemStack(LCItems.ingot, 1, Ingot.SKY), lightning2, autosmelt);
mystic = registerMaterial("mystic", LCFluids.moltenMystic,
"ingotMystic", new ItemStack(LCItems.ingot, 1, Ingot.MYSTIC), lightning2, autosmelt, repairTrait);
TinkerRegistry.addMaterialStats(electricium,
new HeadMaterialStats(800, 8.00f, 7.00f, 4),
new HandleMaterialStats(0.90f, 50),
new ExtraMaterialStats(100));
TinkerRegistry.addMaterialStats(skyfather,
new HeadMaterialStats(1000, 12.00f, 9.00f, 5),
new HandleMaterialStats(0.90f, 60),
new ExtraMaterialStats(100));
TinkerRegistry.addMaterialStats(mystic,
new HeadMaterialStats(1200, 15.00f, 11.00f, 6),
new HandleMaterialStats(0.90f, 70),
new ExtraMaterialStats(100));
for(Material m : matList) TinkerSmeltery.registerToolpartMeltingCasting(m);
} else {
Log.logger.error("Unable to find Tinker's Construct trait class, aborting tool integration.");
}
}
示例3: stats
import slimeknights.tconstruct.library.materials.ExtraMaterialStats; //导入依赖的package包/类
@Override
public void stats(@Nonnull Material material) {
TinkerRegistry.addMaterialStats(material, new HeadMaterialStats(306, 6.50f, 2.25f, HarvestLevels.DIAMOND), new HandleMaterialStats(0.75f, 80),
new ExtraMaterialStats(75), new BowMaterialStats(1.5f, 0.9f, 1f));
}