• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java HeatIndex类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: undo

import com.bioxx.tfc.api.HeatIndex; //导入依赖的package包/类
@Override
public void undo() 
{
	List<HeatIndex> heatList = HeatRegistry.getInstance().getHeatList();
	for (int i = 0; i < heatList.size(); i++)
	{
		if (heatList.get(i) != null)
		{
			if (heatList.get(i).matches(inputStack) && heatList.get(i).getOutputItem() == outputStack.getItem()
					&& heatList.get(i).meltTemp == meltingPoint && heatList.get(i).specificHeat == specificHeat)
				heatList.remove(i--);
		}
	}
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:15,代码来源:ItemHeat.java


示例2: apply

import com.bioxx.tfc.api.HeatIndex; //导入依赖的package包/类
@Override
public void apply() 
{
	List<HeatIndex> heatList = HeatRegistry.getInstance().getHeatList();
	for (int i = 0; i < heatList.size(); i++)
	{
		if (heatList.get(i) != null)
		{
			if (heatList.get(i).matches(inputStack))
				heatList.remove(i--);
		}
	}
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:14,代码来源:ItemHeat.java


示例3: careForInventorySlot

import com.bioxx.tfc.api.HeatIndex; //导入依赖的package包/类
@Override
public void careForInventorySlot(ItemStack is)
{
	if(is != null)
	{
		HeatRegistry manager = HeatRegistry.getInstance();
		HeatIndex index = manager.findMatchingIndex(is);

		if (index != null)
		{
			float temp = TFC_ItemHeat.getTemp(is);
			if (fuelTimeLeft > 0 && is.getItem() instanceof ICookableFood)
			{
				float inc = Food.getCooked(is) + Math.min(fireTemp / 700, 2f);
				Food.setCooked(is, inc);
				temp = inc;
				if (Food.isCooked(is))
				{
					int[] cookedTasteProfile = new int[]
					{ 0, 0, 0, 0, 0 };
					Random r = new Random(((ICookableFood) is.getItem()).getFoodID() + (((int) Food.getCooked(is) - 600) / 120));
					cookedTasteProfile[0] = r.nextInt(31) - 15;
					cookedTasteProfile[1] = r.nextInt(31) - 15;
					cookedTasteProfile[2] = r.nextInt(31) - 15;
					cookedTasteProfile[3] = r.nextInt(31) - 15;
					cookedTasteProfile[4] = r.nextInt(31) - 15;
					Food.setCookedProfile(is, cookedTasteProfile);
					Food.setFuelProfile(is, EnumFuelMaterial.getFuelProfile(fuelTasteProfile));
				}
			}
			else if (fireTemp > temp && index.hasOutput())
			{
				temp += TFC_ItemHeat.getTempIncrease(is);
			}
			else
				temp -= TFC_ItemHeat.getTempDecrease(is);
			TFC_ItemHeat.setTemp(is, temp);
		}
	}
}
 
开发者ID:StrayWolfe,项目名称:TerrafirmaPunk-Tweaks,代码行数:41,代码来源:TEBrickOven.java


示例4: setupItemHeat

import com.bioxx.tfc.api.HeatIndex; //导入依赖的package包/类
public static void setupItemHeat() {
    HeatRegistry manager = HeatRegistry.getInstance();

    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8193), 1, 500, new ItemStack(Items.potionitem, 1, 16385)).setMinMax(16385));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8194), 1, 500, new ItemStack(Items.potionitem, 1, 16386)).setMinMax(16386));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8195), 1, 500, new ItemStack(Items.potionitem, 1, 16387)).setMinMax(16387));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8196), 1, 500, new ItemStack(Items.potionitem, 1, 16388)).setMinMax(16388));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8197), 1, 500, new ItemStack(Items.potionitem, 1, 16389)).setMinMax(16389));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8198), 1, 500, new ItemStack(Items.potionitem, 1, 16390)).setMinMax(16390));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8200), 1, 500, new ItemStack(Items.potionitem, 1, 16392)).setMinMax(16392));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8201), 1, 500, new ItemStack(Items.potionitem, 1, 16393)).setMinMax(16393));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8202), 1, 500, new ItemStack(Items.potionitem, 1, 16394)).setMinMax(16394));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8204), 1, 500, new ItemStack(Items.potionitem, 1, 16396)).setMinMax(16396));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8205), 1, 500, new ItemStack(Items.potionitem, 1, 16397)).setMinMax(16397));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8206), 1, 500, new ItemStack(Items.potionitem, 1, 16398)).setMinMax(16398));

    //Enhance Potion
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8225), 1, 500, new ItemStack(Items.potionitem, 1, 16417)).setMinMax(16417));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8226), 1, 500, new ItemStack(Items.potionitem, 1, 16418)).setMinMax(16418));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8228), 1, 500, new ItemStack(Items.potionitem, 1, 16420)).setMinMax(16420));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8229), 1, 500, new ItemStack(Items.potionitem, 1, 16421)).setMinMax(16421));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8201), 1, 500, new ItemStack(Items.potionitem, 1, 16425)).setMinMax(16425));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8233), 1, 500, new ItemStack(Items.potionitem, 1, 16428)).setMinMax(16428));

    //Extend Potion
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8257), 1, 500, new ItemStack(Items.potionitem, 1, 16449)).setMinMax(16449));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8258), 1, 500, new ItemStack(Items.potionitem, 1, 16450)).setMinMax(16450));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8259), 1, 500, new ItemStack(Items.potionitem, 1, 16451)).setMinMax(16451));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8260), 1, 500, new ItemStack(Items.potionitem, 1, 16452)).setMinMax(16452));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8262), 1, 500, new ItemStack(Items.potionitem, 1, 16454)).setMinMax(16454));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8264), 1, 500, new ItemStack(Items.potionitem, 1, 16456)).setMinMax(16456));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8265), 1, 500, new ItemStack(Items.potionitem, 1, 16457)).setMinMax(16457));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8266), 1, 500, new ItemStack(Items.potionitem, 1, 16458)).setMinMax(16458));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8269), 1, 500, new ItemStack(Items.potionitem, 1, 16461)).setMinMax(16461));
    manager.addIndex(new HeatIndex(new ItemStack(Items.potionitem, 1, 8270), 1, 500, new ItemStack(Items.potionitem, 1, 16462)).setMinMax(16462));

    System.out.println("[" + ModDetails.ModName + "] Done Registering ItemHeat");
}
 
开发者ID:AnodeCathode,项目名称:TechNodefirmacraftMod,代码行数:39,代码来源:ItemHeat.java


示例5: removeHeatRecipe

import com.bioxx.tfc.api.HeatIndex; //导入依赖的package包/类
private static void removeHeatRecipe(HeatRegistry heatmanager, ItemStack inputStack, ItemStack outputStack, float meltingPoint, float specificHeat)
{
	List<HeatIndex> heatList = heatmanager.getHeatList();
	for (int i = 0; i < heatList.size(); i++)
	{
		if (heatList.get(i) != null)
		{
			if (heatList.get(i).matches(inputStack) && heatList.get(i).getOutputItem() == outputStack.getItem()
					&& heatList.get(i).meltTemp == meltingPoint && heatList.get(i).specificHeat == specificHeat)
				heatList.remove(i--);
		}
	}
}
 
开发者ID:StrayWolfe,项目名称:Cooking-with-TFC,代码行数:14,代码来源:HeatedItemRecipes.java


示例6: RegisterItemHeat

import com.bioxx.tfc.api.HeatIndex; //导入依赖的package包/类
public static void RegisterItemHeat(){
       HeatRegistry heatRegistry = HeatRegistry.getInstance();		
	heatRegistry.addIndex( new HeatIndex( new ItemStack( ModItems.itemWoodenTwig, 1 ), 0.7f, 500f, new ItemStack( ModItems.powderAsh, 1 ) ) );
}
 
开发者ID:Wahazar,项目名称:TFCPrimitiveTech,代码行数:5,代码来源:ModRecipes.java


示例7: onToolTip

import com.bioxx.tfc.api.HeatIndex; //导入依赖的package包/类
@SubscribeEvent
public void onToolTip(ItemTooltipEvent event)
{
	ItemStack object = event.itemStack;
	
	if(!(object.getItem() instanceof ItemTerra || object.getItem() instanceof ItemTerraBlock
			|| object.getItem() instanceof ItemTFCArmor))
	{
		if (object.hasTagCompound())
		{
			if(TFC_ItemHeat.hasTemp(object))
			{
				float temp = TFC_ItemHeat.getTemp(object);
				float meltTemp = -1;
				HeatIndex hi = HeatRegistry.getInstance().findMatchingIndex(object);
				if(hi != null)
					meltTemp = hi.meltTemp;

				if(meltTemp != -1)
				{
					event.toolTip.add(TFC_ItemHeat.getHeatColor(temp, meltTemp));
				}
			}
		}
	}
	
	if(!(object.getItem() instanceof ItemIngot ||
		object.getItem() instanceof ItemMetalSheet ||
		object.getItem() instanceof ItemUnfinishedArmor ||
		object.getItem() instanceof ItemBloom ||
		object.getItem() == TFCItems.wroughtIronKnifeHead))
	{
		if (object.hasTagCompound())
		{
			if(TFC_ItemHeat.hasTemp(object))
			{
				if(ReferenceList.getInstance().isAnvilInged(object))
				{
					String s = "";
					if(HeatRegistry.getInstance().isTemperatureDanger(object))
					{
						s += EnumChatFormatting.WHITE + TFC_Core.translate("gui.ingot.danger") + " | ";
					}
	
					if(HeatRegistry.getInstance().isTemperatureWeldable(object))
					{
						s += EnumChatFormatting.WHITE + TFC_Core.translate("gui.ingot.weldable") + " | ";
					}
	
					if(HeatRegistry.getInstance().isTemperatureWorkable(object))
					{
						s += EnumChatFormatting.WHITE + TFC_Core.translate("gui.ingot.workable");
					}
	
					if (!"".equals(s))
						event.toolTip.add(s);
				}
			}
		}
	}
	
	if(!(object.getItem() instanceof ItemTerra))
	{
		if (object.hasTagCompound())
		{
			if (object.getTagCompound().hasKey(TEAnvil.ITEM_CRAFTING_VALUE_TAG) || object.getTagCompound().hasKey(TEAnvil.ITEM_CRAFTING_RULE_1_TAG))
				event.toolTip.add(TFC_Core.translate("gui.ItemWorked"));
		}
	}
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:71,代码来源:PlayerInteractionHandler.java


示例8: setupItemHeat

import com.bioxx.tfc.api.HeatIndex; //导入依赖的package包/类
public static void setupItemHeat() {
    HeatRegistry manager = HeatRegistry.getInstance();

    final int WILDCARD_VALUE = OreDictionary.WILDCARD_VALUE;

    HeatRaw bismuthRaw = new HeatRaw(0.14, 270);
    HeatRaw bismuthBronzeRaw = new HeatRaw(0.35, 985);
    HeatRaw blackBronzeRaw = new HeatRaw(0.35, 1070);
    HeatRaw blackSteelRaw = new HeatRaw(0.35, 1485);
    HeatRaw blueSteelRaw = new HeatRaw(0.35, 1540);
    HeatRaw brassRaw = new HeatRaw(0.35, 930);
    HeatRaw bronzeRaw = new HeatRaw(0.35, 950);
    HeatRaw copperRaw = new HeatRaw(0.35, 1080);
    HeatRaw goldRaw = new HeatRaw(0.6, 1060);
    HeatRaw ironRaw = new HeatRaw(0.35, 1535);
    HeatRaw leadRaw = new HeatRaw(0.22, 328);
    HeatRaw nickelRaw = new HeatRaw(0.48, 1453);
    HeatRaw pigIronRaw = new HeatRaw(0.35, 1500);
    HeatRaw platinumRaw = new HeatRaw(0.35, 1730);
    HeatRaw redSteelRaw = new HeatRaw(0.35, 1540);
    HeatRaw roseGoldRaw = new HeatRaw(0.35, 960);
    HeatRaw silverRaw = new HeatRaw(0.48, 961);
    HeatRaw steelRaw = new HeatRaw(0.35, 1540);//sh = 0.63F; boil = 3500; melt = 1540;
    HeatRaw sterlingSilverRaw = new HeatRaw(0.35, 900);//sh = 0.72F; boil = 2212; melt = 893;
    HeatRaw tinRaw = new HeatRaw(0.14, 230);
    HeatRaw zincRaw = new HeatRaw(0.21, 420);//sh = 0.66F; boil = 907; melt = 420;

    for(int i = 0; i < 16; i++) {
        ItemStack input = new ItemStack((ModBlocks.clayRawColor), 1, i);
        ItemStack output = new ItemStack((ModBlocks.clayStained), 1, i);

        manager.addIndex(new HeatIndex(input, 1, 600, output).setMinMax(output.getItemDamage()));
    }
    for(int i = 0; i < 17; i++)
    {
        ItemStack input2 = new ItemStack((ModItems.clayRawBrick), 1, i);
        ItemStack output2 = new ItemStack((ModItems.clayBrick), 1, i);

        manager.addIndex(new HeatIndex(input2, 1, 150, output2).setMinMax(output2.getItemDamage()));
    }

    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.clayRaw, 1, 0), 1, 600, new ItemStack(ModBlocks.clayStained2, 1)));

    //Lamp->Unshaped
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod, 1, 0), bismuthBronzeRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod, 1, 1), blackBronzeRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod, 1, 2), blackSteelRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod, 1, 3), brassRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod, 1, 4), bronzeRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod, 1, 5), redSteelRaw, null));

    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod2, 1, 0), bismuthRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod2, 1, 1), copperRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod2, 1, 2), ironRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod2, 1, 3), leadRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod2, 1, 4), nickelRaw, null));

    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod3, 1, 0), pigIronRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod3, 1, 1), steelRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod3, 1, 2), tinRaw, null));
    manager.addIndex(new HeatIndex(new ItemStack(ModBlocks.oilLampMod3, 1, 3), zincRaw, null));
}
 
开发者ID:Bunsan,项目名称:TerraFirmaStuff,代码行数:63,代码来源:ItemHeat.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EntitySquid类代码示例发布时间:2022-05-22
下一篇:
Java Polygon类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap