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


Java TinkerRegistry.registerTableCasting方法代码示例

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


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

示例1: registerTableCasting

import slimeknights.tconstruct.library.TinkerRegistry; //导入方法依赖的package包/类
public static void registerTableCasting() {
  for (CastQueue cast : TiCQueues.getCastQueue()) {
    if (cast.getFluid() == null) {
      FluidStack fluid = getFluidForItems(cast.getItem());
      if (fluid != null) {
        cast.setFluid(fluid.getFluid());
        cast.setAmount(cast.getAmount() * fluid.amount);
      }
    }
    if (cast.getFluid() == null) {
      Log.warn("Item used in cast recipe '" + cast.getItem() + "' doesn't smelt into a fluid");
    } else {
      TinkerRegistry.registerTableCasting(new CastingRecipe(cast.getResult(), Prep.isValid(cast.getCast()) ? RecipeMatch.ofNBT(cast.getCast()) : null,
          cast.getFluid(), (int) Math.ceil(cast.getAmount()), cast.isConsumeCast(), false));
      Log.debug("Tinkers.registerTableCasting: " + cast.getResult() + ", " + cast.getCast() + ", " + cast.getFluid().getName() + ", " + cast.getAmount());
    }
  }
  TiCQueues.getCastQueue().clear();
}
 
开发者ID:SleepyTrousers,项目名称:EnderIO,代码行数:20,代码来源:TicRegistration.java

示例2: init

import slimeknights.tconstruct.library.TinkerRegistry; //导入方法依赖的package包/类
@Optional.Method(modid = "tconstruct")
public static void init()
{
	TinkerRegistry.registerMelting(new MeltingRecipe(RecipeMatch.of(ModBlocks.butter, 1000), ModFluids.liquid_butter, 300));
	TinkerRegistry.registerBasinCasting(new CastingRecipe(new ItemStack(ModBlocks.butter), ModFluids.liquid_butter, 1000, 60));

	if (Loader.isModLoaded("xlfoodmod"))
	{
		TinkerRegistry.registerMelting(new MeltingRecipe(RecipeMatch.of(ItemListxlfoodmod.butter, 250), ModFluids.liquid_butter, 200));
		TinkerRegistry.registerTableCasting(new CastingRecipe(new ItemStack(ItemListxlfoodmod.butter), RecipeMatch.of(TinkerSmeltery.castIngot), ModFluids.liquid_butter, 250, 15));
	}
}
 
开发者ID:DarkMorford,项目名称:BetterThanWeagles,代码行数:13,代码来源:IntegrationTinkers.java

示例3: addTableCast

import slimeknights.tconstruct.library.TinkerRegistry; //导入方法依赖的package包/类
/**
 * Add a recipe to the casting table
 * @param recipe    The recipe to add
 */
public static void addTableCast(ICastingRecipe recipe) {
    TinkerRegistry.registerTableCasting(recipe);
}
 
开发者ID:legendblade,项目名称:CraftingHarmonics,代码行数:8,代码来源:ReflectedTinkerRegistry.java


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