本文整理汇总了Java中net.minecraftforge.fluids.UniversalBucket.getFilledBucket方法的典型用法代码示例。如果您正苦于以下问题:Java UniversalBucket.getFilledBucket方法的具体用法?Java UniversalBucket.getFilledBucket怎么用?Java UniversalBucket.getFilledBucket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.fluids.UniversalBucket
的用法示例。
在下文中一共展示了UniversalBucket.getFilledBucket方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setFluid
import net.minecraftforge.fluids.UniversalBucket; //导入方法依赖的package包/类
protected void setFluid(Fluid fluid) {
if (fluid == null)
{
container.deserializeNBT(new ItemStack(Items.BUCKET).serializeNBT());
}
else if (fluid == FluidRegistry.WATER)
{
container.deserializeNBT(new ItemStack(Items.WATER_BUCKET).serializeNBT());
}
else if (fluid == FluidRegistry.LAVA)
{
container.deserializeNBT(new ItemStack(Items.LAVA_BUCKET).serializeNBT());
}
else if (fluid.getName().equals("milk"))
{
container.deserializeNBT(new ItemStack(Items.MILK_BUCKET).serializeNBT());
}
else if (FluidRegistry.isUniversalBucketEnabled() && FluidRegistry.getBucketFluids().contains(fluid))
{
ItemStack filledBucket = UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, fluid);
container.deserializeNBT(filledBucket.serializeNBT());
}
}
示例2: init
import net.minecraftforge.fluids.UniversalBucket; //导入方法依赖的package包/类
public static void init() {
liquidMana = registerFluid(liquidMana);
liquidWaterSource = registerFluid(liquidWaterSource);
liquidGrass = registerFluid(liquidGrass);
liquidFire = registerFluid(liquidFire);
FluidRegistry.addBucketForFluid(liquidMana);
FluidRegistry.addBucketForFluid(liquidWaterSource);
FluidRegistry.addBucketForFluid(liquidGrass);
FluidRegistry.addBucketForFluid(liquidFire);
bucketMana = UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, liquidMana);
bucketFire = UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, liquidFire);
bucketGrass = UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, liquidGrass);
bucketWaterSource = UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, liquidWaterSource);
bucketMana.getItem().setCreativeTab(powerofmagic.tabpowerofmagic);
bucketFire.getItem().setCreativeTab(powerofmagic.tabpowerofmagic);
bucketGrass.getItem().setCreativeTab(powerofmagic.tabpowerofmagic);
bucketWaterSource.getItem().setCreativeTab(powerofmagic.tabpowerofmagic);
}
示例3: getBucketStack
import net.minecraftforge.fluids.UniversalBucket; //导入方法依赖的package包/类
public static ItemStack getBucketStack(Fluid fluid)
{
return UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, fluid);
}