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


Java TFCFluids类代码示例

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


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

示例1: setupFluids

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public void setupFluids()
{
	FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(TFCFluids.OLIVEOIL.getName()), new ItemStack(TFPItems.CustomBucketOliveOil), new ItemStack(TFCItems.woodenBucketEmpty));
	
	if(Loader.isModLoaded("BuildCraft|Core"))
	{
		FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(BuildCraftEnergy.fluidOil.getName()), new ItemStack(TFPItems.CustomBucketOil), new ItemStack(TFCItems.woodenBucketEmpty));
	}
	
	if(Loader.isModLoaded("necromancy"))
	{
		FluidContainerRegistry.registerFluidContainer(new FluidStack(TFPFluids.tfpFluidBlood, 1000), new ItemStack(TFPItems.CustomBucketBlood), new ItemStack(TFCItems.woodenBucketEmpty));
		FluidContainerRegistry.registerFluidContainer(new FluidStack(TFPFluids.tfpFluidBlood, 250), ItemGeneric.getItemStackFromName("Jar of Blood"), new ItemStack(TFCItems.glassBottle));
	}
	
	if(Loader.isModLoaded("steamcraft2"))
	{
		FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluid(TFPFluids.tfpFluidWhaleOil.getName()), new ItemStack(TFPItems.CustomBucketWhaleOil), new ItemStack(TFCItems.woodenBucketEmpty));
	}
}
 
开发者ID:StrayWolfe,项目名称:TerrafirmaPunk-Tweaks,代码行数:21,代码来源:CommonProxy.java

示例2: updateLampFuel

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
/**
 *  Updates the fuel timer of the lamp. Set burn to false to update the timer without consuming fuel, for when the lamp was off.
 * @param burn
 */
public void updateLampFuel(Boolean burn)
{
    if((int) TFC_Time.getTotalHours() - TFCOptions.oilLampFuelMult >= hourPlaced)
    {
        int diff = burn ? (int) TFC_Time.getTotalHours() - this.hourPlaced : 0; // Don't burn any fuel if set to false.
        this.hourPlaced = (int)TFC_Time.getTotalHours();

        if(fuel != null && getFuel().getFluid() != TFCFluids.LAVA && this.getFuelAmount() > 0)
        {
            fuel.amount -= diff;
            if(fuel.amount <= 0)
                fuel = null;
        }
    }
}
 
开发者ID:Bunsan,项目名称:TerraFirmaStuff,代码行数:20,代码来源:TEOilLampMod.java

示例3: registerPressRecipes

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
protected static void registerPressRecipes()
{
	PressManager pressmanager = PressManager.getInstance();
	
	pressmanager.addRecipe(new PressRecipe(TFCItems.olive, TFCFluids.OLIVEOIL, 1));
	
	if(Helper.isReqModVersion("tfcm", "0.10.0"))
	{					
		pressmanager.addRecipe(new PressRecipe(TFCItems.cherry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.plum, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.wintergreenBerry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.blueberry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.raspberry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.strawberry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.blackberry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.bunchberry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.cranberry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.snowberry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.elderberry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.gooseberry, TFCMFluids.FRUITJUICE, 8));
		pressmanager.addRecipe(new PressRecipe(TFCItems.cloudberry, TFCMFluids.FRUITJUICE, 8));
	}
}
 
开发者ID:StrayWolfe,项目名称:Cooking-with-TFC,代码行数:24,代码来源:CWTFCRegistries.java

示例4: registerBarrelRecipes

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
private static void registerBarrelRecipes()
{
    BarrelManager.getInstance().addRecipe(new BarrelRecipe(new ItemStack(ModItems.powderAsh, 1, 0), new FluidStack(TFCFluids.FRESHWATER, 500), null, new FluidStack(FluidList.BasePotashLiquor, 500), 8).setMinTechLevel(0).setSealedRecipe(true).setRemovesLiquid(false).setAllowAnyStack(false));
    BarrelManager.getInstance().addRecipe(new BarrelRecipe(new ItemStack(TFCItems.reeds, 1, 0), new FluidStack(FluidList.BasePotashLiquor, 156), new ItemStack(ModItems.itemCelluloseFibers, 1, 0), new FluidStack(FluidList.Waste, 156), 24).setMinTechLevel(0).setSealedRecipe(true).setRemovesLiquid(false).setAllowAnyStack(false));
    
    BarrelManager.getInstance().addRecipe(new BarrelMultiItemRecipe(new ItemStack(TFCItems.hide, 1, 0), new FluidStack(FluidList.BasePotashLiquor, 300), new ItemStack(TFCItems.soakedHide, 1, 0), new FluidStack(FluidList.Waste, 300)).setMinTechLevel(0));
    BarrelManager.getInstance().addRecipe(new BarrelMultiItemRecipe(new ItemStack(TFCItems.hide, 1, 1), new FluidStack(FluidList.BasePotashLiquor, 600), new ItemStack(TFCItems.soakedHide, 1, 1), new FluidStack(FluidList.Waste, 600)).setMinTechLevel(0));
    BarrelManager.getInstance().addRecipe(new BarrelMultiItemRecipe(new ItemStack(TFCItems.hide, 1, 2), new FluidStack(FluidList.BasePotashLiquor, 900), new ItemStack(TFCItems.soakedHide, 1, 2), new FluidStack(FluidList.Waste, 900)).setMinTechLevel(0));
    
}
 
开发者ID:Wahazar,项目名称:TFCPrimitiveTech,代码行数:11,代码来源:ModRecipes.java

示例5: addInformation

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
@SuppressWarnings({
		"rawtypes",
		"unchecked"
})
@Override
public void addInformation(ItemStack is, EntityPlayer player, List arraylist, boolean flag) {
	super.addInformation(is, player, arraylist, flag);
	if (is.hasTagCompound()) {
		FluidStack fs = FluidStack.loadFluidStackFromNBT(is.getTagCompound());
		if (fs != null && fs.getFluid() == TFCFluids.OLIVEOIL)
			arraylist.add(StatCollector.translateToLocal("gui.qty") + ": " + fs.amount + " mB / " + Globals.OIL_CAN_CAPACITY + " mB");
	}
}
 
开发者ID:Shurgent,项目名称:TFCTech,代码行数:14,代码来源:ItemOilCan.java

示例6: getFluid

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
@SuppressWarnings("ALL")
private static Fluid getFluid(String fluidName)
{
    if (FluidHacks.makeAllWaterFTCWater && fluidName.equals("water")) return TFCFluids.FRESHWATER;
    else if (FluidHacks.makeAllLavaFTCLava && fluidName.equals("lava")) return TFCFluids.LAVA;

    return fluids.get(fluidName);
}
 
开发者ID:dries007,项目名称:TFC-Tweaks,代码行数:9,代码来源:FluidRegistryCT.java

示例7: doTheMagic

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public static void doTheMagic()
{
    if (magic) throw new IllegalStateException("You can't magic twice.");
    magic = true;

    // do the hack
    if (makeAllWaterFTCWater)
    {
        Helper.setFinalStatic(ReflectionHelper.findField(FluidRegistry.class, "WATER"), TFCFluids.FRESHWATER);
        Helper.setFinalStatic(ReflectionHelper.findField(Blocks.class, "field_150355_j", "water"), TFCBlocks.freshWaterStationary);
        Helper.setFinalStatic(ReflectionHelper.findField(Blocks.class, "field_150358_i", "flowing_water"), TFCBlocks.freshWater);

        FluidContainerRegistry.registerFluidContainer(TFCFluids.FRESHWATER, new ItemStack(Items.water_bucket), FluidContainerRegistry.EMPTY_BUCKET);
        FluidContainerRegistry.registerFluidContainer(TFCFluids.FRESHWATER, new ItemStack(Items.potionitem), FluidContainerRegistry.EMPTY_BOTTLE);
    }
    else
    {
        FluidRegistry.registerFluid(OLD_WATER_FLUID);
        FluidContainerRegistry.registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.water_bucket), FluidContainerRegistry.EMPTY_BUCKET);
        FluidContainerRegistry.registerFluidContainer(FluidRegistry.WATER, new ItemStack(Items.potionitem), FluidContainerRegistry.EMPTY_BOTTLE);
    }

    if (makeAllLavaFTCLava)
    {
        Helper.setFinalStatic(ReflectionHelper.findField(FluidRegistry.class, "LAVA"), TFCFluids.LAVA);
        Helper.setFinalStatic(ReflectionHelper.findField(Blocks.class, "field_150353_l", "lava"), TFCBlocks.lavaStationary);
        Helper.setFinalStatic(ReflectionHelper.findField(Blocks.class, "field_150356_k", "flowing_lava"), TFCBlocks.lava);
        FluidContainerRegistry.registerFluidContainer(TFCFluids.LAVA, new ItemStack(Items.lava_bucket),  FluidContainerRegistry.EMPTY_BUCKET);
    }
    else
    {
        FluidRegistry.registerFluid(OLD_LAVA_FLUID);
        FluidContainerRegistry.registerFluidContainer(FluidRegistry.LAVA, new ItemStack(Items.lava_bucket), FluidContainerRegistry.EMPTY_BUCKET);
    }

    ReflectionHelper.setPrivateValue(FluidRegistry.class, null, null, "fluidBlocks");
}
 
开发者ID:dries007,项目名称:TFC-Tweaks,代码行数:38,代码来源:FluidHacks.java

示例8: getFullLamp

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public static ItemStack getFullLamp(int meta)
{
    ItemStack is = new ItemStack(ModBlocks.oilLampMod3, 1, meta);
    FluidStack fs = new FluidStack(TFCFluids.OLIVEOIL, 250);
    is.setTagCompound(fs.writeToNBT(new NBTTagCompound()));
    return is;
}
 
开发者ID:Bunsan,项目名称:TerraFirmaStuff,代码行数:8,代码来源:ItemOilLampMod3.java

示例9: getFullLamp

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public static ItemStack getFullLamp(int meta)
{
    ItemStack is = new ItemStack(ModBlocks.oilLampMod, 1, meta);
    FluidStack fs = new FluidStack(TFCFluids.OLIVEOIL, 250);
    is.setTagCompound(fs.writeToNBT(new NBTTagCompound()));
    return is;
}
 
开发者ID:Bunsan,项目名称:TerraFirmaStuff,代码行数:8,代码来源:ItemOilLampMod.java

示例10: getFullLamp

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public static ItemStack getFullLamp(int meta)
{
    ItemStack is = new ItemStack(ModBlocks.oilLampMod2, 1, meta);
    FluidStack fs = new FluidStack(TFCFluids.OLIVEOIL, 250);
    is.setTagCompound(fs.writeToNBT(new NBTTagCompound()));
    return is;
}
 
开发者ID:Bunsan,项目名称:TerraFirmaStuff,代码行数:8,代码来源:ItemOilLampMod2.java

示例11: isFuelValid

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public boolean isFuelValid()
{
    if(getFuel() != null && getFuel().getFluid() == TFCFluids.OLIVEOIL)
    {
        return true;
    }
    return false;
}
 
开发者ID:Bunsan,项目名称:TerraFirmaStuff,代码行数:9,代码来源:TEOilLampMod.java

示例12: oilLampBody

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public List<String> oilLampBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
{
    NBTTagCompound tag = accessor.getNBTData();
    if (tag.hasKey("Fuel"))
    {
        FluidStack fuel = FluidStack.loadFluidStackFromNBT(tag.getCompoundTag("Fuel"));
        int hours = fuel.amount * TFCOptions.oilLampFuelMult / 8;
        if (fuel.getFluid() == TFCFluids.OLIVEOIL)
            currenttip.add(hours + " " + TFC_Core.translate("gui.hoursRemaining") + " (" + Helper.roundNumber((hours / (250f * TFCOptions.oilLampFuelMult)) * 100f, 10) + "%)");
        else if (fuel.getFluid() == TFCFluids.LAVA)
            currenttip.add(TFC_Core.translate("gui.infinite") + " " + TFC_Core.translate("gui.hoursRemaining"));
    }
    return currenttip;
}
 
开发者ID:Bunsan,项目名称:TerraFirmaStuff,代码行数:15,代码来源:WAILADataMod.java

示例13: registerBarrelRecipes

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
private static void registerBarrelRecipes()
{
    BarrelManager.getInstance().addRecipe(new BarrelRecipe(new ItemStack(ItemList.Powder, 1, 0), new FluidStack(TFCFluids.FRESHWATER, 500), null, new FluidStack(FluidList.Plaster, 500), 0).setMinTechLevel(0).setSealedRecipe(false).setRemovesLiquid(false).setAllowAnyStack(false));
    BarrelManager.getInstance().addRecipe(new BarrelRecipe(new ItemStack(TFCBlocks.sand, 1, 32767), new FluidStack(FluidList.Plaster, 100), new ItemStack(TFCItems.mortar, 16), new FluidStack(FluidList.Plaster, 100)).setMinTechLevel(0));
    BarrelManager.getInstance().addRecipe(new BarrelRecipe(new ItemStack(TFCBlocks.sand2, 1, 32767), new FluidStack(FluidList.Plaster, 100), new ItemStack(TFCItems.mortar, 16), new FluidStack(FluidList.Plaster, 100)).setMinTechLevel(0));
    BarrelManager.getInstance().addRecipe(new BarrelPlasterRecipe(new ItemStack(ItemList.Powder, 1, 0), new FluidStack(FluidList.Plaster, 50), new ItemStack(BlockList.Alabaster, 1), new FluidStack(FluidList.Plaster, 50)).setMinTechLevel(0));
    
    for(int i = 0; i < FluidList.LiquidDyes.length; i++)
    {
        DyeFluid dye = FluidList.LiquidDyes[i];
        
        BarrelManager.getInstance().addRecipe(new BarrelRecipe(new ItemStack(TFCItems.dye, 1, dye.TFCDyeIndex), new FluidStack(TFCFluids.FRESHWATER, 400), null, new FluidStack(dye, 400), 0).setMinTechLevel(0).setSealedRecipe(false).setRemovesLiquid(false).setAllowAnyStack(false));
    }
}
 
开发者ID:Aleksey-Terzi,项目名称:DecorationsTFC,代码行数:15,代码来源:Recipes.java

示例14: register

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public static void register()
{
    AlcoholFluids = new Fluid[]
    {
		TFCFluids.RUM,
		TFCFluids.BEER,
		TFCFluids.RYEWHISKEY,
		TFCFluids.WHISKEY,
		TFCFluids.CORNWHISKEY,
		TFCFluids.SAKE,
		TFCFluids.VODKA,
		TFCFluids.CIDER
    };
    
    FluidRegistry.registerFluid(Plaster);
    
    LiquidDyes = new DyeFluid[ItemDyeCustom.DYE_COLOR_NAMES.length];
    
    for(int i = 0; i < LiquidDyes.length; i++)
    {
        int dyeIndex;
        
        if(i == 0)
            dyeIndex = LiquidDyes.length - 1;
        else if(i == LiquidDyes.length - 1)
            dyeIndex = 0;
        else
            dyeIndex = i;
        
        String fluidName = "liquid_dye." + ItemDyeCustom.DYE_COLOR_NAMES[dyeIndex];
        int color = Constants.DyeColors[dyeIndex];
        DyeFluid fluid = new DyeFluid(fluidName, dyeIndex);
        
        fluid.setBaseColor(color);
        
        FluidRegistry.registerFluid(LiquidDyes[i] = fluid);
    }
}
 
开发者ID:Aleksey-Terzi,项目名称:DecorationsTFC,代码行数:39,代码来源:FluidList.java

示例15: setup

import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public static void setup()
{
    AlcoholFluids = new Fluid[]
    {
        TFCFluids.RUM,
        TFCFluids.BEER,
        TFCFluids.RYEWHISKEY,
        TFCFluids.WHISKEY,
        TFCFluids.CORNWHISKEY,
        TFCFluids.SAKE,
        TFCFluids.VODKA,
        TFCFluids.CIDER
    };
}
 
开发者ID:Aleksey-Terzi,项目名称:LanternsTFC,代码行数:15,代码来源:FluidList.java


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