• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java HeadMaterialStats类的典型用法和代码示例

java 2次浏览

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

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

示例1: init

点赞 3

import slimeknights.tconstruct.library.materials.HeadMaterialStats; //导入依赖的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));
    }
}
 

开发者ID:legendblade,
项目名称:CraftingHarmonics,
代码行数:22,
代码来源:SetMaterialStats.java

示例2: getExtraInfo

点赞 2

import slimeknights.tconstruct.library.materials.HeadMaterialStats; //导入依赖的package包/类
@Override
public List<String> getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) {
    StatNBT pool = getBonus(TagUtil.getTagSafe(tool));

    return ImmutableList.of(HeadMaterialStats.formatDurability(pool.durability),
            HeadMaterialStats.formatMiningSpeed(pool.speed),
            HeadMaterialStats.formatAttack(pool.attack));
}
 

开发者ID:TeamFRM,
项目名称:TAIGA,
代码行数:9,
代码来源:TraitDecay.java

示例3: insertDefaults

点赞 2

import slimeknights.tconstruct.library.materials.HeadMaterialStats; //导入依赖的package包/类
@Override
public void insertDefaults() {
  if(materials.isEmpty()) {
    for(Material material : TinkerRegistry.getAllMaterialsWithStats(MaterialTypes.HEAD)) {
      HeadMaterialStats stat = material.getStats(MaterialTypes.HEAD);
      materials.computeIfAbsent(material.getIdentifier(), s -> {
        setNeedsSaving();
        return stat.harvestLevel;
      });
    }
  }
}
 

开发者ID:SlimeKnights,
项目名称:HarvestTweaks,
代码行数:13,
代码来源:TinkerConfig.java

示例4: registerMaterials

点赞 2

import slimeknights.tconstruct.library.materials.HeadMaterialStats; //导入依赖的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.");
	}
}
 

开发者ID:sblectric,
项目名称:LightningCraft,
代码行数:47,
代码来源:ToolIntegration.java

示例5: stats

点赞 2

import slimeknights.tconstruct.library.materials.HeadMaterialStats; //导入依赖的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));
}
 

开发者ID:SleepyTrousers,
项目名称:EnderIO,
代码行数:6,
代码来源:TicMaterials.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)