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


Java MineTweakerMC.getLiquidStack方法代码示例

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


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

示例1: ageFluid

import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
@ZenMethod
public static void ageFluid(ILiquidStack outputFS, ILiquidStack inputFS, int minTechLevel, boolean sealed, int sealtime)
{		
	FluidStack inputFluid = MineTweakerMC.getLiquidStack(inputFS);
	FluidStack outputFluid = MineTweakerMC.getLiquidStack(outputFS);
	
	if(inputFluid.amount <= 0)
		MineTweakerAPI.logError("InputFluid must contain more than 0 mb of fluid");
	else if(outputFluid == null || outputFluid.getFluid() == null)
		MineTweakerAPI.logError("Missing OutputFluid");
	else if(outputFluid.amount <= 0)
		MineTweakerAPI.logError("OutputFluid must contain more than 0 mb of fluid");
	else if(sealed == false && sealtime > 0)
		MineTweakerAPI.logError("Sealed time must be 0 if barrel is unsealed");
	else
		MineTweakerAPI.apply(new addAgedFluidAction(inputFluid, outputFluid, sealtime, sealed, minTechLevel));
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:18,代码来源:Barrel.java

示例2: addFluidCombination

import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
@ZenMethod
public static void addFluidCombination(ILiquidStack outputFluid, ILiquidStack fluidInBarrel, ILiquidStack inputFluid)
{
	FluidStack barrelContents = MineTweakerMC.getLiquidStack(fluidInBarrel);
	FluidStack inputfluid = MineTweakerMC.getLiquidStack(inputFluid);
	FluidStack outputfluid = MineTweakerMC.getLiquidStack(outputFluid);
	
	if(barrelContents == null || barrelContents.getFluid() == null)
		MineTweakerAPI.logError("Missing Barrel Contents");
	else if(barrelContents.amount <= 0)
		MineTweakerAPI.logError("Barrel Contents must contain more than 0 mb of fluid");
	else if(inputfluid == null || inputfluid.getFluid() == null)
		MineTweakerAPI.logError("Missing Input Fluid");
	else if(inputfluid.amount <= 0)
		MineTweakerAPI.logError("Input Fluid must contain more than 0 mb of fluid");
	else if(outputfluid == null || outputfluid.getFluid() == null)
		MineTweakerAPI.logError("Missing Input Fluid");
	else if(outputfluid.amount <= 0)
		MineTweakerAPI.logError("Output Fluid must contain more than 0 mb of fluid");
	else		
		MineTweakerAPI.apply(new addFluidCombinationAction(barrelContents, inputfluid, outputfluid));
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:23,代码来源:Barrel.java

示例3: removeFluidCombination

import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
@ZenMethod
public static void removeFluidCombination(ILiquidStack outputFluid, ILiquidStack fluidInBarrel, ILiquidStack inputFluid)
{
	FluidStack barrelContents = MineTweakerMC.getLiquidStack(fluidInBarrel);
	FluidStack inputfluid = MineTweakerMC.getLiquidStack(inputFluid);
	FluidStack outputfluid = MineTweakerMC.getLiquidStack(outputFluid);
	
	if(barrelContents == null || barrelContents.getFluid() == null)
		MineTweakerAPI.logError("Missing Barrel Contents");
	else if(barrelContents.amount <= 0)
		MineTweakerAPI.logError("Barrel Contents must contain more than 0 mb of fluid");
	else if(inputfluid == null || inputfluid.getFluid() == null)
		MineTweakerAPI.logError("Missing Input Fluid");
	else if(inputfluid.amount <= 0)
		MineTweakerAPI.logError("Input Fluid must contain more than 0 mb of fluid");
	else if(outputfluid == null || outputfluid.getFluid() == null)
		MineTweakerAPI.logError("Missing Input Fluid");
	else if(outputfluid.amount <= 0)
		MineTweakerAPI.logError("Output Fluid must contain more than 0 mb of fluid");
	else	
		MineTweakerAPI.apply(new removeFluidCombinationAction(barrelContents, inputfluid, outputfluid));
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:23,代码来源:Barrel.java

示例4: addItemFluidConversion

import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
@ZenMethod
public static void addItemFluidConversion(IItemStack outputIS, ILiquidStack outputFS, IItemStack inputIS, ILiquidStack inputFS, int minTechLevel, boolean sealed, int sealtime, boolean removesLiquid, boolean allowAnyStack)
{
	ItemStack inputStack = MineTweakerMC.getItemStack(inputIS);
	FluidStack inputFluid = MineTweakerMC.getLiquidStack(inputFS);
	ItemStack outputStack = MineTweakerMC.getItemStack(outputIS);
	FluidStack outputFluid = MineTweakerMC.getLiquidStack(outputFS);
	
	if(inputStack == null || inputStack.getItem() == null)
		MineTweakerAPI.logError("Missing InputStack");
	else if(inputFluid == null || inputFluid.getFluid() == null)
		MineTweakerAPI.logError("Missing InputFluid");
	else if(inputFluid.amount <= 0)
		MineTweakerAPI.logError("InputFluid must contain more than 0 mb of fluid");
	else if(outputFluid == null || outputFluid.getFluid() == null)
		MineTweakerAPI.logError("Missing OutputFluid");
	else if(outputFluid.amount <= 0)
		MineTweakerAPI.logError("OutputFluid must contain more than 0 mb of fluid");
	else if(sealed == false && sealtime > 0)
		MineTweakerAPI.logError("Sealed time must be 0 if barrel is unsealed");
	else if(minTechLevel < 0)
		MineTweakerAPI.logError("Tech level must be at least 0");
	else if(sealtime < 0)
		MineTweakerAPI.logError("Sealed time must be at least 0");
	else
		MineTweakerAPI.apply(new addFluidConversionAction(inputStack, inputFluid, outputStack, outputFluid, sealtime, removesLiquid, sealed, minTechLevel, allowAnyStack));
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:28,代码来源:Barrel.java

示例5: removeItemFluidConversion

import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
@ZenMethod
public static void removeItemFluidConversion(IItemStack inputIS, ILiquidStack inputFS)
{
	ItemStack inputStack = MineTweakerMC.getItemStack(inputIS);
	FluidStack inputFluid = MineTweakerMC.getLiquidStack(inputFS);
	
	if(inputStack == null || inputStack.getItem() == null)
		MineTweakerAPI.logError("Missing InputStack");
	else if(inputFluid == null || inputFluid.getFluid() == null)
		MineTweakerAPI.logError("Missing InputFluid");
	else if(inputFluid.amount <= 0)
		MineTweakerAPI.logError("InputFluid must contain more than 0 mb of fluid");
	else
		MineTweakerAPI.apply(new removeItemFluidConversionAction(inputStack, inputFluid));
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:16,代码来源:Barrel.java

示例6: addItemConversion

import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
@ZenMethod
public static void addItemConversion(IItemStack outputIS, IItemStack inputIS, ILiquidStack inputFS, int minTechLevel, boolean sealed, int sealedTime, boolean allowAnyStack)
{
	ItemStack inputStack = MineTweakerMC.getItemStack(inputIS);
	ItemStack outputStack = MineTweakerMC.getItemStack(outputIS);
	FluidStack inputFluid = MineTweakerMC.getLiquidStack(inputFS);
	
	if(inputStack == null || inputStack.getItem() == null)
		MineTweakerAPI.logError("Missing InputStack");
	else if(inputStack.stackSize < 1)
		MineTweakerAPI.logError("InputStack must be at least 1 item");
	else if(inputFluid == null || inputFluid.getFluid() == null)
		MineTweakerAPI.logError("Missing InputFluid");
	else if(inputFluid.amount <= 0)
		MineTweakerAPI.logError("InputFluid must contain more than 0 mb of fluid");
	else if(outputStack == null || outputStack.getItem() == null)
		MineTweakerAPI.logError("Missing OutputStack");
	else if(minTechLevel < 0)
		MineTweakerAPI.logError("Tech level must be at least 0");
	else if(sealedTime < 0)
		MineTweakerAPI.logError("Sealed time must be at least 0");
	else
	{
		inputFluid.amount = inputFluid.amount/inputStack.stackSize;
		MineTweakerAPI.apply(new addItemConversionAction(inputStack, inputFluid, outputStack, sealed, sealedTime, minTechLevel, allowAnyStack));
	}
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:28,代码来源:Barrel.java

示例7: removeItemConversion

import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
@ZenMethod
public static void removeItemConversion(IItemStack inputIS, ILiquidStack inputFS)
{
	ItemStack inputStack = MineTweakerMC.getItemStack(inputIS);
	FluidStack inputFluid = MineTweakerMC.getLiquidStack(inputFS);
	
	if(inputStack == null || inputStack.getItem() == null)
		MineTweakerAPI.logError("Missing InputStack");
	else if(inputFluid == null || inputFluid.getFluid() == null)
		MineTweakerAPI.logError("Missing InputFluid");
	else if(inputFluid.amount <= 0)
		MineTweakerAPI.logError("InputFluid must contain more than 0 mb of fluid");
	else		
		MineTweakerAPI.apply(new removeItemFluidConversionAction(inputStack, inputFluid));
}
 
开发者ID:StrayWolfe,项目名称:TFC-Tweaker,代码行数:16,代码来源:Barrel.java

示例8: addRecipe

import minetweaker.api.minecraft.MineTweakerMC; //导入方法依赖的package包/类
@ZenMethod
   public static void addRecipe(ILiquidStack outputLiquid, int ticks, IItemStack...inputs) 
{
	ItemStack[] inputStacks = MineTweakerMC.getItemStacks(inputs);
	FluidStack outputStack = MineTweakerMC.getLiquidStack(outputLiquid);
	
	MineTweakerAPI.apply(new addSqueezerAction(outputStack, ticks, inputStacks));
}
 
开发者ID:StrayWolfe,项目名称:TerrafirmaPunk-Tweaks,代码行数:9,代码来源:Squeezer.java


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