Java Code Examples for net.minecraftforge.fluids.FluidRegistry#addBucketForFluid()

The following examples show how to use net.minecraftforge.fluids.FluidRegistry#addBucketForFluid() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FluidBase.java    From EmergingTechnology with MIT License 5 votes vote down vote up
public FluidBase(String fluidName, boolean canBeStill) {
	super(fluidName, stillTextureLocation(fluidName, canBeStill), flowingTextureLocation(fluidName, canBeStill));
	
	if (FluidRegistry.registerFluid(this)) {
		FluidRegistry.addBucketForFluid(this);
	}
}
 
Example 2
Source File: FluidBase.java    From EmergingTechnology with MIT License 5 votes vote down vote up
public FluidBase(String fluidName, boolean canBeStill, String textureName, Integer color) {
	super(fluidName, stillTextureLocation(textureName, canBeStill), flowingTextureLocation(textureName, canBeStill));
	
	// int fixedColor = color.intValue();
	// if (((fixedColor >> 24) & 0xFF) == 0) {
	// 	fixedColor |= 0xFF << 24;
	// }
	// setColor(fixedColor);
	
	if (FluidRegistry.registerFluid(this)) {
		FluidRegistry.addBucketForFluid(this);
	}
}
 
Example 3
Source File: BlockFluid.java    From customstuff4 with GNU General Public License v3.0 5 votes vote down vote up
public BlockFluid(Material material, ContentBlockFluid content)
{
    super(createFluid(content), material);
    this.content = content;
    setQuantaPerBlock(content.flowLength);

    if (content.addUniversalBucket)
        FluidRegistry.addBucketForFluid(getFluid());
}
 
Example 4
Source File: ENBlocks.java    From ExNihiloAdscensio with MIT License 5 votes vote down vote up
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);
}
 
Example 5
Source File: Fluids.java    From BaseMetals with GNU Lesser General Public License v2.1 5 votes vote down vote up
private static BlockFluidBase registerFluidBlock(Fluid f, BlockFluidBase block, String name) {
	block.setUnlocalizedName(BaseMetals.MODID+"."+name);
	GameRegistry.registerBlock(block, name);
	block.setCreativeTab(CreativeTabs.MISC);
	FluidRegistry.addBucketForFluid(f);
	fluidBlocks.put(f, block);
	fluidBlockNames.put(block, name);
	return block;
}
 
Example 6
Source File: RegistrationHandler.java    From EmergingTechnology with MIT License 4 votes vote down vote up
public static void registerFluid(Fluid fluid) {
    FluidRegistry.registerFluid(fluid);
    FluidRegistry.addBucketForFluid(fluid);
}
 
Example 7
Source File: ModLiquids.java    From YouTubeModdingTutorial with MIT License 4 votes vote down vote up
public static void init() {
    FluidRegistry.registerFluid(fload);
    FluidRegistry.addBucketForFluid(fload);
}