2013-07-09 04:10:57 +00:00
|
|
|
package biomesoplenty.configuration;
|
|
|
|
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraftforge.fluids.FluidContainerRegistry;
|
|
|
|
import net.minecraftforge.fluids.FluidRegistry;
|
|
|
|
import biomesoplenty.api.Fluids;
|
2013-09-14 10:16:39 +00:00
|
|
|
import biomesoplenty.configuration.configfile.BOPConfigurationIDs;
|
2013-10-28 04:20:08 +00:00
|
|
|
import biomesoplenty.fluids.BlockFluidHoney;
|
2013-07-09 04:10:57 +00:00
|
|
|
import biomesoplenty.fluids.BlockFluidLiquidPoison;
|
|
|
|
import biomesoplenty.fluids.BlockFluidSpringWater;
|
2013-10-28 04:20:08 +00:00
|
|
|
import biomesoplenty.fluids.HoneyFluid;
|
2013-07-09 04:10:57 +00:00
|
|
|
import biomesoplenty.fluids.LiquidPoisonFluid;
|
|
|
|
import biomesoplenty.fluids.SpringWaterFluid;
|
|
|
|
import biomesoplenty.items.ItemBOPBucket;
|
|
|
|
|
|
|
|
import com.google.common.base.Optional;
|
|
|
|
|
|
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
|
|
|
|
|
|
|
public class BOPFluids
|
|
|
|
{
|
|
|
|
public static void init()
|
|
|
|
{
|
|
|
|
registerFluids();
|
|
|
|
initializeLiquids();
|
|
|
|
initializeContainers();
|
|
|
|
registerBlocks();
|
|
|
|
}
|
|
|
|
|
|
|
|
private static void registerFluids()
|
|
|
|
{
|
2013-09-14 10:16:39 +00:00
|
|
|
Fluids.liquidPoisonFluid = Optional.of(new LiquidPoisonFluid("bop.liquidPoison").setBlockID(BOPConfigurationIDs.liquidPoisonStillID));
|
2013-07-09 04:10:57 +00:00
|
|
|
FluidRegistry.registerFluid(Fluids.liquidPoisonFluid.get());
|
|
|
|
|
2013-09-14 10:16:39 +00:00
|
|
|
Fluids.springWaterFluid = Optional.of(new SpringWaterFluid("bop.springWater").setBlockID(BOPConfigurationIDs.springWaterStillID));
|
2013-07-09 04:10:57 +00:00
|
|
|
FluidRegistry.registerFluid(Fluids.springWaterFluid.get());
|
2013-10-28 04:20:08 +00:00
|
|
|
|
|
|
|
Fluids.honeyFluid = Optional.of(new HoneyFluid("bop.honey").setBlockID(BOPConfigurationIDs.honeyStillID));
|
|
|
|
FluidRegistry.registerFluid(Fluids.honeyFluid.get());
|
2013-07-09 04:10:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private static void initializeLiquids()
|
|
|
|
{
|
2013-09-14 10:16:39 +00:00
|
|
|
Fluids.liquidPoison = Optional.of(new BlockFluidLiquidPoison(BOPConfigurationIDs.liquidPoisonStillID, Fluids.liquidPoisonFluid.get(), Material.water).setUnlocalizedName("bop.liquidPoison"));
|
2013-07-09 04:10:57 +00:00
|
|
|
|
2013-09-14 10:16:39 +00:00
|
|
|
Fluids.springWater = Optional.of(new BlockFluidSpringWater(BOPConfigurationIDs.springWaterStillID, Fluids.springWaterFluid.get(), Material.water).setUnlocalizedName("bop.springWater"));
|
2013-10-28 04:20:08 +00:00
|
|
|
|
|
|
|
Fluids.honey = Optional.of(new BlockFluidHoney(BOPConfigurationIDs.honeyStillID, Fluids.honeyFluid.get(), Material.water).setUnlocalizedName("bop.honey"));
|
2013-07-09 04:10:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private static void initializeContainers()
|
|
|
|
{
|
2013-09-14 10:16:39 +00:00
|
|
|
Fluids.bopBucket = Optional.of((new ItemBOPBucket(BOPConfigurationIDs.bopBucketID).setMaxStackSize(1).setUnlocalizedName("bop.bopBucket")));
|
2013-07-09 04:10:57 +00:00
|
|
|
|
2013-07-19 12:12:24 +00:00
|
|
|
FluidContainerRegistry.registerFluidContainer(Fluids.liquidPoisonFluid.get(), new ItemStack(Fluids.bopBucket.get(), 1, 1), new ItemStack(Item.bucketEmpty));
|
2013-10-28 04:20:08 +00:00
|
|
|
FluidContainerRegistry.registerFluidContainer(Fluids.honeyFluid.get(), new ItemStack(Fluids.bopBucket.get(), 1, 3), new ItemStack(Item.bucketEmpty));
|
2013-07-19 12:12:24 +00:00
|
|
|
FluidContainerRegistry.registerFluidContainer(Fluids.springWaterFluid.get(), new ItemStack(Fluids.bopBucket.get(), 1, 2), new ItemStack(Fluids.bopBucket.get(), 1, 0));
|
2013-07-09 04:10:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private static void registerBlocks()
|
|
|
|
{
|
|
|
|
GameRegistry.registerBlock(Fluids.liquidPoison.get(), "liquidPoison");
|
|
|
|
GameRegistry.registerBlock(Fluids.springWater.get(), "springWater");
|
2013-10-28 04:20:08 +00:00
|
|
|
GameRegistry.registerBlock(Fluids.honey.get(), "honey");
|
2013-07-09 04:10:57 +00:00
|
|
|
}
|
|
|
|
}
|