本文整理汇总了Java中tconstruct.library.crafting.Smeltery类的典型用法代码示例。如果您正苦于以下问题:Java Smeltery类的具体用法?Java Smeltery怎么用?Java Smeltery使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Smeltery类属于tconstruct.library.crafting包,在下文中一共展示了Smeltery类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SmeltMekanism
import tconstruct.library.crafting.Smeltery; //导入依赖的package包/类
protected static void SmeltMekanism()
{
for (int i = 0; i < 3; i++)
{
Smeltery.addMelting(getBlock(Info.osmiumore), i, 550, new FluidStack(getFluid("molten.osmium"), ingotCostSmeltery));
if (Configurations.miniSmelting)
{
CrucibleRegistry.register(getIDs(Info.osmiumore), i, ingotCost*2, getFluid("molten.osmium"), ingotCost, getBlock(Info.osmiumore));
}
}
if (Configurations.allowDustSmelting)
{
Smeltery.addMelting(new ItemStack(getItem(Info.osmiumgrav),4,0), getIDs(Info.osmiumore), 0, 600, new FluidStack(getFluid("molten.osmium"), dustCostSmeltery));
Smeltery.addMelting(new ItemStack(getItem(Info.osmiumsand),4,0), getIDs(Info.osmiumore), 1, 600, new FluidStack(getFluid("molten.osmium"), dustCostSmeltery));
Smeltery.addMelting(new ItemStack(getItem(Info.osmiumdust),4,0), getIDs(Info.osmiumore), 2, 600, new FluidStack(getFluid("molten.osmium"), dustCostSmeltery));
if (Configurations.miniSmelting)
{
CrucibleRegistry.register(getItem(Info.osmiumgrav).itemID, 0, dustCostGeneral*2, getFluid("molten.osmium"), dustCostGeneral, getBlock(Info.osmiumore));
CrucibleRegistry.register(getItem(Info.osmiumsand).itemID, 0, dustCostGeneral*2, getFluid("molten.osmium"), dustCostGeneral, getBlock(Info.osmiumore));
CrucibleRegistry.register(getItem(Info.osmiumdust).itemID, 0, dustCostGeneral*2, getFluid("molten.osmium"), dustCostGeneral, getBlock(Info.osmiumore));
}
}
}
示例2: setMeltingTemp
import tconstruct.library.crafting.Smeltery; //导入依赖的package包/类
public static void setMeltingTemp (final String fluidName, final int newTemp)
{
// If either the input or new temperature are null or invalid, back out.
if (fluidName == null || newTemp <= 0)
{
return;
}
// Otherwise, find matching recipe and adjust its melting temperature.
for (Entry<ItemMetaWrapper, FluidStack> meltingEntry : Smeltery.instance.getSmeltingList().entrySet())
{
// FluidStack's getUnlocalizedName method sticks "fluid." before the actual name,
// so I guess we'll be doing the same thing here
String prefixedFluidName = !fluidName.startsWith("fluid.")
? "fluid." + fluidName
: fluidName;
if (meltingEntry.getValue().getUnlocalizedName().equals(prefixedFluidName))
{
ItemMetaWrapper inputWrapper = meltingEntry.getKey();
ItemStack inputStack = new ItemStack(inputWrapper.item, 1, inputWrapper.meta);
if (inputStack != null)
{
smeltingRegistry.addMeltable(inputStack, isOre(inputStack), meltingEntry.getValue(), newTemp);
}
}
}
}
示例3: addSmelteryRecipes
import tconstruct.library.crafting.Smeltery; //导入依赖的package包/类
private static void addSmelteryRecipes() {
Smeltery.addMelting(new ItemStack(BlockRegistry.oresOres), 800, new FluidStack(LiquidRegistry.moltenStarSteel, ingot * 2));
Smeltery.addMelting(new ItemStack(BlockRegistry.storage, 1, 3), 800, new FluidStack(LiquidRegistry.pureMoltenStarSteel, block));
Smeltery.addMelting(new ItemStack(BlockRegistry.storage, 1, 4), 800, new FluidStack(TinkerSmeltery.moltenSteelFluid, block));
Smeltery.addMelting(new ItemStack(ItemRegistry.ingotsMeta, 1, 0), BlockRegistry.storage, 3, 400, new FluidStack(LiquidRegistry.pureMoltenStarSteel, ingot));
Smeltery.addMelting(new ItemStack(ItemRegistry.ingotsMeta, 1, 1), BlockRegistry.storage, 4, 400, new FluidStack(TinkerSmeltery.moltenSteelFluid, ingot));
Smeltery.addAlloyMixing(new FluidStack(LiquidRegistry.pureMoltenStarSteel, ingot * 2), new FluidStack(TinkerSmeltery.moltenSteelFluid, ingot * 2), new FluidStack(LiquidRegistry.moltenStarSteel, ingot));
}
示例4: SmeltArs
import tconstruct.library.crafting.Smeltery; //导入依赖的package包/类
protected static void SmeltArs()
{
for (int i = 0; i < 10; i++)
{
Smeltery.addMelting(new ItemStack(getItem(Info.essences), 1, i), getIDs(Info.essenceBlock), 0, 800, new FluidStack(getFluid("liquidessence"), 1000));
}
}
示例5: addMelting
import tconstruct.library.crafting.Smeltery; //导入依赖的package包/类
private void addMelting(ItemStack input, FluidStack output, int temp) {
if (output.getFluid() == FluidRegistry.LAVA) {
output = FluidRegistry.getFluidStack("stone.seared", SEARED_STONE_FOR_BLOCK);
}
BlockWithMeta<Block> render = getRenderBlock(input, output);
if (render != null) {
temp /= 2;
if (!(input.getItem() instanceof ItemBlock)) {
temp -= temp / 3;
}
Smeltery.addMelting(input, render.block, render.meta, temp, output);
}
}
示例6: addBedrockiumMaterial
import tconstruct.library.crafting.Smeltery; //导入依赖的package包/类
public void addBedrockiumMaterial() {
if (ExtraUtils.bedrockiumBlock == null || ExtraUtils.bedrockium == null) {
ExtraUtils.tcon_bedrock_material_id = -1;
return;
}
final int id = ExtraUtils.tcon_bedrock_material_id;
if (id <= 0) {
return;
}
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("Id", id);
final String name = "Bedrockium";
tag.setString("Name", "Bedrockium");
tag.setString("localizationString", "material.extrautils.bedrockium");
tag.setInteger("Durability", 7500);
tag.setInteger("MiningSpeed", 800);
tag.setInteger("HarvestLevel", 7);
tag.setInteger("Attack", 4);
tag.setFloat("HandleModifier", 1.75f);
tag.setInteger("Reinforced", 0);
tag.setFloat("Bow_ProjectileSpeed", 3.0f);
tag.setInteger("Bow_DrawSpeed", 200);
tag.setFloat("Projectile_Mass", 40.0f);
tag.setFloat("Projectile_Fragility", 0.4f);
tag.setString("Style", EnumChatFormatting.BLACK.toString());
tag.setInteger("Color", 16777215);
FMLInterModComms.sendMessage("TConstruct", "addMaterial", tag);
FluidRegistry.registerFluid(TConIntegration.bedrock);
FluidType.registerFluidType(TConIntegration.bedrock.getName(), (Block)ExtraUtils.bedrockiumBlock, 0, 850, TConIntegration.bedrock, true);
Smeltery.addMelting(new ItemStack((Block)ExtraUtils.bedrockiumBlock, 1), (Block)ExtraUtils.bedrockiumBlock, 0, 850, new FluidStack(TConIntegration.bedrock, 1296));
Smeltery.addMelting(new ItemStack((Item)ExtraUtils.bedrockium, 1, 0), (Block)ExtraUtils.bedrockiumBlock, 0, 850, new FluidStack(TConIntegration.bedrock, 144));
final ItemStack ingotcast = new ItemStack(TinkerSmeltery.metalPattern, 1, 0);
TConstructRegistry.getBasinCasting().addCastingRecipe(new ItemStack((Block)ExtraUtils.bedrockiumBlock, 1), new FluidStack(TConIntegration.bedrock, 1296), (ItemStack)null, true, 100);
TConstructRegistry.getTableCasting().addCastingRecipe(new ItemStack((Item)ExtraUtils.bedrockium, 1), new FluidStack(TConIntegration.bedrock, 144), ingotcast, false, 50);
tag = new NBTTagCompound();
tag.setString("FluidName", TConIntegration.bedrock.getName());
tag.setInteger("MaterialId", id);
FMLInterModComms.sendMessage("TConstruct", "addPartCastingMaterial", tag);
tag = new NBTTagCompound();
tag.setInteger("MaterialId", id);
tag.setTag("Item", (NBTBase)new ItemStack((Item)ExtraUtils.bedrockium, 1, 0).writeToNBT(new NBTTagCompound()));
tag.setInteger("Value", 2);
FMLInterModComms.sendMessage("TConstruct", "addMaterialItem", tag);
ExtraUtilsMod.proxy.exectuteClientCode(new IClientCode() {
@SideOnly(Side.CLIENT)
@Override
public void exectuteClientCode() {
new TConTextureResourcePackBedrockium("Bedrockium").register();
}
});
}
示例7: addUnstableMaterial
import tconstruct.library.crafting.Smeltery; //导入依赖的package包/类
public void addUnstableMaterial() {
if (ExtraUtils.unstableIngot == null || ExtraUtils.decorative1 == null) {
ExtraUtils.tcon_unstable_material_id = -1;
return;
}
final int id = ExtraUtils.tcon_unstable_material_id;
if (id <= 0) {
return;
}
NBTTagCompound tag = new NBTTagCompound();
tag.setInteger("Id", id);
final String name = "unstableIngot";
final ToolMaterial mat = new ToolMaterial("unstableIngot", "material.extrautils.unstableIngot", 4, 100, 700, 2, 0.6f, 4, 0.0f, EnumChatFormatting.WHITE.toString(), 16777215);
TConstructRegistry.addtoolMaterial(id, mat);
TConstructRegistry.addDefaultToolPartMaterial(id);
TConstructRegistry.addBowMaterial(id, 109, 1.0f);
TConstructRegistry.addArrowMaterial(id, 2.4f, 0.0f);
ExtraUtilsMod.proxy.exectuteClientCode(new IClientCode() {
@SideOnly(Side.CLIENT)
@Override
public void exectuteClientCode() {
if (FMLCommonHandler.instance().getSide().isClient()) {
TConstructClientRegistry.addMaterialRenderMapping(id, "tinker", mat.name().toLowerCase(), true);
}
}
});
FluidRegistry.registerFluid(TConIntegration.unstable);
FluidType.registerFluidType(TConIntegration.unstable.getName(), (Block)ExtraUtils.decorative1, 5, 850, TConIntegration.unstable, true);
Smeltery.addMelting(new ItemStack((Block)ExtraUtils.decorative1, 1, 5), (Block)ExtraUtils.decorative1, 5, 850, new FluidStack(TConIntegration.unstable, 648));
Smeltery.addMelting(new ItemStack(ExtraUtils.unstableIngot, 1, 0), (Block)ExtraUtils.decorative1, 5, 850, new FluidStack(TConIntegration.unstable, 72));
Smeltery.addMelting(new ItemStack(ExtraUtils.unstableIngot, 1, 1), (Block)ExtraUtils.decorative1, 5, 850, new FluidStack(TConIntegration.unstable, 8));
Smeltery.addMelting(new ItemStack(ExtraUtils.unstableIngot, 1, 2), (Block)ExtraUtils.decorative1, 5, 850, new FluidStack(TConIntegration.unstable, 144));
TConstructRegistry.getBasinCasting().addCastingRecipe(new ItemStack((Block)ExtraUtils.decorative1, 1, 5), new FluidStack(TConIntegration.unstable, 1296), (ItemStack)null, true, 100);
final List<CastingRecipe> newRecipies = new LinkedList<CastingRecipe>();
for (final CastingRecipe recipe : TConstructRegistry.getTableCasting().getCastingRecipes()) {
if (recipe.castingMetal.getFluid() == TinkerSmeltery.moltenIronFluid && recipe.cast != null && recipe.cast.getItem() instanceof IPattern) {
if (!(recipe.getResult().getItem() instanceof DynamicToolPart)) {
continue;
}
newRecipies.add(recipe);
}
}
final FluidType ft = FluidType.getFluidType(TConIntegration.unstable);
for (final CastingRecipe recipe2 : newRecipies) {
final ItemStack output = recipe2.getResult().copy();
output.setItemDamage(id);
final FluidStack liquid2 = new FluidStack(TConIntegration.unstable, recipe2.castingMetal.amount);
TConstructRegistry.getTableCasting().addCastingRecipe(output, liquid2, recipe2.cast, recipe2.consumeCast, recipe2.coolTime);
Smeltery.addMelting(ft, output, 0, liquid2.amount / 2);
}
tag = new NBTTagCompound();
tag.setInteger("MaterialId", id);
tag.setTag("Item", (NBTBase)new ItemStack(ExtraUtils.unstableIngot, 1, 0).writeToNBT(new NBTTagCompound()));
tag.setInteger("Value", 2);
FMLInterModComms.sendMessage("TConstruct", "addMaterialItem", tag);
tag = new NBTTagCompound();
tag.setInteger("MaterialId", id);
tag.setTag("Item", (NBTBase)new ItemStack(ExtraUtils.unstableIngot, 1, 2).writeToNBT(new NBTTagCompound()));
tag.setInteger("Value", 2);
FMLInterModComms.sendMessage("TConstruct", "addMaterialItem", tag);
ExtraUtilsMod.proxy.exectuteClientCode(new IClientCode() {
@SideOnly(Side.CLIENT)
@Override
public void exectuteClientCode() {
new TConTextureResourcePackUnstableIngot("unstableIngot").register();
}
});
}
示例8: registerAlloyingRecipe
import tconstruct.library.crafting.Smeltery; //导入依赖的package包/类
@Override
public void registerAlloyingRecipe(FluidStack output, List<FluidStack> inputs) {
Smeltery.addAlloyMixing(output, inputs.toArray(new FluidStack[0]));
}