本文整理汇总了Java中net.minecraftforge.fluids.FluidRegistry.addBucketForFluid方法的典型用法代码示例。如果您正苦于以下问题:Java FluidRegistry.addBucketForFluid方法的具体用法?Java FluidRegistry.addBucketForFluid怎么用?Java FluidRegistry.addBucketForFluid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.fluids.FluidRegistry
的用法示例。
在下文中一共展示了FluidRegistry.addBucketForFluid方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFluid
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
private static <T extends Block & IFluidBlock> Fluid createFluid(String name, boolean hasFlowIcon, Consumer<Fluid> fluidPropertyApplier, Function<Fluid, T> blockFactory, boolean hasBucket) {
final ResourceLocation still = new ResourceLocation(LibMod.MOD_ID + ":blocks/fluid/" + name + "_still");
final ResourceLocation flowing = hasFlowIcon ? new ResourceLocation(LibMod.MOD_ID + ":blocks/fluid/" + name + "_flow") : still;
Fluid fluid = new Fluid(name, still, flowing);
final boolean useOwnFluid = FluidRegistry.registerFluid(fluid);
if (useOwnFluid) {
fluidPropertyApplier.accept(fluid);
MOD_FLUID_BLOCKS.add(blockFactory.apply(fluid));
if (hasBucket)
FluidRegistry.addBucketForFluid(fluid);
} else {
fluid = FluidRegistry.getFluid(name);
}
return fluid;
}
示例2: registerFluids
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public static void registerFluids(){
if(!FluidRegistry.isFluidRegistered("creosote")){
Creosote=new FluidCreosote("creosote", new ResourceLocation(Constants.MODID, "blocks/creosote_still"), new ResourceLocation(Constants.MODID, "blocks/creosote_flow"));
Creosote.setViscosity(2000);
FluidRegistry.registerFluid(Creosote);
FluidRegistry.addBucketForFluid(Creosote);
BlockCreosote=new BlockFluidCreosote();
Creosote.setBlock(BlockCreosote);
}else{
Creosote=FluidRegistry.getFluid("creosote");
if(Creosote.getBlock()==null){
BlockCreosote=new BlockFluidCreosote();
Creosote.setBlock(BlockCreosote);
}
}
}
示例3: registerFluids
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public static final void registerFluids()
{
QBarFluids.fluidSteam = new Fluid("steam", new ResourceLocation(QBarConstants.MODID +
":blocks/fluid/steam_still"), new ResourceLocation(QBarConstants.MODID + ":blocks/fluid/steam_flow"))
.setDensity(-1000).setViscosity(500).setGaseous(true);
if (!FluidRegistry.registerFluid(QBarFluids.fluidSteam))
QBarFluids.fluidSteam = FluidRegistry.getFluid("steam");
FluidRegistry.addBucketForFluid(QBarFluids.fluidSteam);
QBarFluids.blockFluidSteam = new BlockQBarFluid(QBarFluids.fluidSteam, Material.WATER, "blockfluidsteam");
QBarBlocks.registerBlock(QBarFluids.blockFluidSteam);
QBarMaterials.metals.stream().filter(metal -> !FluidRegistry.isFluidRegistered("molten" + metal))
.forEach(metal ->
{
Fluid moltenMetal = new Fluid("molten" + metal,
new ResourceLocation(QBarConstants.MODID + ":blocks/fluid/" + metal + "_still"),
new ResourceLocation(QBarConstants.MODID + ":blocks/fluid/" + metal + "_flow"));
FluidRegistry.registerFluid(moltenMetal);
FluidRegistry.addBucketForFluid(moltenMetal);
QBarBlocks.registerBlock(new BlockQBarFluid(moltenMetal, Material.LAVA, "blockmolten" + metal));
});
}
示例4: fluidBlock
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public static BlockFluidSimple fluidBlock(IForgeRegistry<Block> registry, Fluid f) {
FluidRegistry.registerFluid(f);
BlockFluidSimple result = block(registry, new BlockFluidSimple(f, f.getName()));
f.setBlock(result);
FluidRegistry.addBucketForFluid(f);
return result;
}
示例5: preInit
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public static void preInit() {
//Add soulforged steel as a liquid
if (Loader.isModLoaded("betterwithmods")) {
Fluid soulforgedSteel = new Fluid("soulforged_steel", new ResourceLocation("tconstruct:blocks/fluids/molten_metal"), new ResourceLocation("tconstruct:blocks/fluids/molten_metal_flow"));
FluidRegistry.registerFluid(soulforgedSteel);
FluidRegistry.addBucketForFluid(soulforgedSteel);
NBTTagCompound tag = new NBTTagCompound();
tag.setString("fluid", soulforgedSteel.getName());
tag.setString("ore", "SoulforgedSteel");
tag.setBoolean("toolforge", false);
FMLInterModComms.sendMessage("tconstruct", "integrateSmeltery", tag);
}
}
示例6: BlockFluid
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public BlockFluid(Material material, ContentBlockFluid content)
{
super(createFluid(content), material);
this.content = content;
setQuantaPerBlock(content.flowLength);
if (content.addUniversalBucket)
FluidRegistry.addBucketForFluid(getFluid());
}
示例7: createBuckets
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public static void createBuckets() {
for(Fluid fluid : bucketFluids){
if (FluidRegistry.isUniversalBucketEnabled()) {
FluidRegistry.addBucketForFluid(fluid);
bucketList.put(fluid, UniversalBucket.getFilledBucket(ForgeModContainer.getInstance().universalBucket, fluid));
} else {
bucketList.put(fluid, new ItemStack(ItemBucketCrystalMod.create(null, fluid)));
}
}
}
示例8: FluidNacre
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public FluidNacre() {
super("nacre_fluid",
new ResourceLocation(Wizardry.MODID, "fluid/nacre_still"),
new ResourceLocation(Wizardry.MODID, "fluid/nacre_flowing"));
FluidRegistry.registerFluid(this);
FluidRegistry.addBucketForFluid(this);
setViscosity(500);
setDensity(500);
}
示例9: FluidMana
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public FluidMana() {
super("mana_fluid",
new ResourceLocation(Wizardry.MODID, "fluid/mana_still"),
new ResourceLocation(Wizardry.MODID, "fluid/mana_flowing"));
FluidRegistry.registerFluid(this);
FluidRegistry.addBucketForFluid(this);
setViscosity(500);
setTemperature(200);
setDensity(500);
}
示例10: init
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public static void init()
{
dust = new BlockBaseFalling(SoundType.CLOTH, "blockDust");
dust.setCreativeTab(ExNihiloAdscensio.tabExNihilo);
dust.setHardness(0.7F);
netherrackCrushed = new BlockBaseFalling(SoundType.GROUND, "blockNetherrackCrushed");
netherrackCrushed.setCreativeTab(ExNihiloAdscensio.tabExNihilo);
netherrackCrushed.setHardness(0.7F);
endstoneCrushed = new BlockBaseFalling(SoundType.GROUND, "blockEndstoneCrushed");
endstoneCrushed.setCreativeTab(ExNihiloAdscensio.tabExNihilo);
endstoneCrushed.setHardness(0.7F);
barrelWood = new BlockBarrel(0, Material.WOOD);
barrelWood.setCreativeTab(ExNihiloAdscensio.tabExNihilo);
GameRegistry.registerTileEntity(TileBarrel.class, "blockBarrel0");
barrelStone = new BlockBarrel(1, Material.ROCK);
barrelStone.setCreativeTab(ExNihiloAdscensio.tabExNihilo);
GameRegistry.registerTileEntity(TileBarrel.class, "blockBarrel1");
infestedLeaves = new BlockInfestedLeaves();
GameRegistry.registerTileEntity(TileInfestedLeaves.class, "blockInfestedLeaves");
infestedLeaves.setCreativeTab(ExNihiloAdscensio.tabExNihilo);
crucible = new BlockCrucible();
crucible.setCreativeTab(ExNihiloAdscensio.tabExNihilo);
GameRegistry.registerTileEntity(TileCrucible.class, "blockCrucible");
sieve = new BlockSieve();
sieve.setCreativeTab(ExNihiloAdscensio.tabExNihilo);
GameRegistry.registerTileEntity(TileSieve.class, "blockSieve");
fluidWitchwater = new FluidWitchWater();
blockWitchwater = new BlockFluidWitchwater();
FluidRegistry.addBucketForFluid(fluidWitchwater);
}
示例11: createFluid
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
/** Create a fluid with the given properties */
private static Fluid createFluid(String name, int density, int viscosity, int temperature, int luminosity, int tintColor) {
Fluid fluid = new ModFluid(name, new ResourceLocation(RefStrings.MODID, "blocks/molten_metal_still"),
new ResourceLocation(RefStrings.MODID, "blocks/molten_metal_flow"), tintColor);
fluid.setDensity(density);
fluid.setViscosity(viscosity);
fluid.setTemperature(temperature);
fluid.setLuminosity(luminosity);
fluid.setUnlocalizedName(RefStrings.MODID + ":" + name);
FluidRegistry.registerFluid(fluid);
FluidRegistry.addBucketForFluid(fluid);
return fluid;
}
示例12: UtilsFluid
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public UtilsFluid(String fluidName, ResourceLocation still, ResourceLocation flowing, String fluidBlockName, Material material, String modid) {
super(fluidName, still, flowing);
FluidRegistry.registerFluid(this);
FluidRegistry.addBucketForFluid(this);
setUnlocalizedName(fluidName);
new UtilsFluidBlock(this, material, fluidBlockName, modid);
}
示例13: register
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public void register() {
FluidRegistry.registerFluid(this);
FluidRegistry.addBucketForFluid(this);
}
示例14: registerFluid
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
private static Fluid registerFluid(Fluid fluid)
{
FluidRegistry.addBucketForFluid(fluid);
return fluid;
}
示例15: registerFluids
import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public static void registerFluids()
{
FluidRegistry.addBucketForFluid(ModFluids.liquid_butter);
}