當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。