本文整理汇总了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));
}
}
示例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;
}
}
}
示例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));
}
}
示例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));
}
示例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");
}
}
示例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);
}
示例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");
}
示例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;
}
示例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;
}
示例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;
}
示例11: isFuelValid
import com.bioxx.tfc.api.TFCFluids; //导入依赖的package包/类
public boolean isFuelValid()
{
if(getFuel() != null && getFuel().getFluid() == TFCFluids.OLIVEOIL)
{
return true;
}
return false;
}
示例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;
}
示例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));
}
}
示例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);
}
}
示例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
};
}