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


Java FluidRegistry.addBucketForFluid方法代码示例

本文整理汇总了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;
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:19,代码来源:Fluids.java

示例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);
		}
	}
}
 
开发者ID:EnderiumSmith,项目名称:CharcoalPit,代码行数:17,代码来源:FluidsRegistry.java

示例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));
            });
}
 
开发者ID:OPMCorp,项目名称:Qbar,代码行数:25,代码来源:QBarFluids.java

示例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;
}
 
开发者ID:elytra,项目名称:ThermionicsWorld,代码行数:8,代码来源:TWBlocks.java

示例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);
	}
}
 
开发者ID:the-realest-stu,项目名称:Adventurers-Toolbox,代码行数:15,代码来源:TConstructCompat.java

示例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());
}
 
开发者ID:cubex2,项目名称:customstuff4,代码行数:10,代码来源:BlockFluid.java

示例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)));
	    }
	}
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:11,代码来源:ModFluids.java

示例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);
}
 
开发者ID:TeamWizardry,项目名称:Wizardry,代码行数:10,代码来源:FluidNacre.java

示例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);
}
 
开发者ID:TeamWizardry,项目名称:Wizardry,代码行数:11,代码来源:FluidMana.java

示例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);
}
 
开发者ID:MikeLydeamore,项目名称:ExNihiloAdscensio,代码行数:39,代码来源:ENBlocks.java

示例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;
}
 
开发者ID:sblectric,项目名称:LightningCraft,代码行数:14,代码来源:LCFluids.java

示例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);
}
 
开发者ID:AshIndigo,项目名称:Alloycraft,代码行数:8,代码来源:UtilsFluid.java

示例13: register

import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public void register() {
    FluidRegistry.registerFluid(this);
    FluidRegistry.addBucketForFluid(this);
}
 
开发者ID:Buuz135,项目名称:Industrial-Foregoing,代码行数:5,代码来源:IFCustomFluid.java

示例14: registerFluid

import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
private static Fluid registerFluid(Fluid fluid)
{
       FluidRegistry.addBucketForFluid(fluid);
       return fluid;
}
 
开发者ID:kenijey,项目名称:harshencastle,代码行数:6,代码来源:HarshenFluids.java

示例15: registerFluids

import net.minecraftforge.fluids.FluidRegistry; //导入方法依赖的package包/类
public static void registerFluids()
{
	FluidRegistry.addBucketForFluid(ModFluids.liquid_butter);
}
 
开发者ID:DarkMorford,项目名称:BetterThanWeagles,代码行数:5,代码来源:CommonProxy.java


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