本文整理匯總了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);
}