diff --git a/src/minecraft/biomesoplenty/BiomesOPlenty.java b/src/minecraft/biomesoplenty/BiomesOPlenty.java index 172ca30ae..d5ca0e639 100644 --- a/src/minecraft/biomesoplenty/BiomesOPlenty.java +++ b/src/minecraft/biomesoplenty/BiomesOPlenty.java @@ -10,13 +10,13 @@ import net.minecraft.client.Minecraft; import net.minecraft.creativetab.CreativeTabs; import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; -import biomesoplenty.api.BlockReferences; import biomesoplenty.configuration.BOPBiomes; import biomesoplenty.configuration.BOPBlocks; import biomesoplenty.configuration.BOPConfiguration; import biomesoplenty.configuration.BOPCrafting; import biomesoplenty.configuration.BOPEntities; import biomesoplenty.configuration.BOPItems; +import biomesoplenty.configuration.BOPLiquids; import biomesoplenty.configuration.BOPVanillaCompat; import biomesoplenty.helpers.AchievementHelper; import biomesoplenty.helpers.BOPCraft; @@ -24,13 +24,10 @@ import biomesoplenty.helpers.BonemealUse; import biomesoplenty.helpers.CreativeTabsBOP; import biomesoplenty.helpers.EntitiesHelper; import biomesoplenty.integration.BOPCrossIntegration; -import biomesoplenty.integration.ThaumcraftIntegration; import biomesoplenty.world.WorldProviderBOPhell; import biomesoplenty.world.WorldProviderPromised; -import biomesoplenty.world.WorldTypeBOP; import biomesoplenty.world.WorldTypeSize; import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; @@ -100,6 +97,8 @@ public class BiomesOPlenty BOPBlocks.init(); BOPItems.init(); + + BOPLiquids.init(); BOPCrafting.init(); diff --git a/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java b/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java index 5df7492e5..2b5e8910d 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java +++ b/src/minecraft/biomesoplenty/configuration/BOPConfiguration.java @@ -227,8 +227,11 @@ public class BOPConfiguration { public static int bootsAmethystID; public static int flowerBandID; + + //Liquid IDs + public static int springWaterStillID; - //Biome IDS + //Biome IDs public static int alpsID; public static int arcticID; public static int badlandsID; @@ -706,6 +709,8 @@ public class BOPConfiguration { bonesID = config.getBlock("Bones ID", 1968, null).getInt(); coralID = config.getBlock("Coral ID", 1969, null).getInt(); + + //1970 & 1971 used by Liquids // Get Item ID's shroomPowderID = config.getItem("Shroom Powder ID", 21001, null).getInt(); @@ -744,7 +749,10 @@ public class BOPConfiguration { bootsAmethystID = config.getItem("Amethyst Boots ID", 21077, null).getInt(); flowerBandID = config.getItem("Flower Band ID", 21078, null).getInt(); - + + //Liquid Ids + springWaterStillID = config.get("Liquid IDs", "Spring Water Still ID (ID before this must be free!)", 1971, null).getInt(); + //Mob IDs jungleSpiderID = config.get("Mob IDs", "Jungle Spider ID", 101, null).getInt(); rosesterID = config.get("Mob IDs", "Rosester ID", 102, null).getInt(); diff --git a/src/minecraft/biomesoplenty/configuration/BOPLiquids.java b/src/minecraft/biomesoplenty/configuration/BOPLiquids.java new file mode 100644 index 000000000..1ed10110b --- /dev/null +++ b/src/minecraft/biomesoplenty/configuration/BOPLiquids.java @@ -0,0 +1,48 @@ +package biomesoplenty.configuration; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.liquids.LiquidStack; +import biomesoplenty.api.Blocks; +import biomesoplenty.items.ItemBOPMud; +import biomesoplenty.liquids.BlockSpringWaterFlowing; +import biomesoplenty.liquids.BlockSpringWaterStill; +import cpw.mods.fml.common.registry.GameRegistry; +import cpw.mods.fml.common.registry.LanguageRegistry; + +public class BOPLiquids { + + public static Block springWaterFlowing; + public static Block springWaterStill; + + public static Item bucketSpringWater; + + public static LiquidStack springWaterLiquid; + + public static void init() + { + initializeLiquids(); + registerLiquids(); + registerNames(); + } + + private static void initializeLiquids() + { + springWaterFlowing = (new BlockSpringWaterFlowing(BOPConfiguration.springWaterStillID - 1).setUnlocalizedName("springWaterFlowing")); + springWaterStill = (new BlockSpringWaterStill(BOPConfiguration.springWaterStillID).setUnlocalizedName("springWaterStill")); + } + + private static void registerLiquids() + { + GameRegistry.registerBlock(springWaterFlowing, "springWaterFlowing"); + GameRegistry.registerBlock(springWaterStill, "springWaterStill"); + } + + private static void registerNames() + { + LanguageRegistry.addName(springWaterFlowing, "Spring Water"); + LanguageRegistry.addName(springWaterStill, "Spring Water"); + } +} diff --git a/src/minecraft/biomesoplenty/liquids/BlockSpringWaterFlowing.java b/src/minecraft/biomesoplenty/liquids/BlockSpringWaterFlowing.java new file mode 100644 index 000000000..be765b70d --- /dev/null +++ b/src/minecraft/biomesoplenty/liquids/BlockSpringWaterFlowing.java @@ -0,0 +1,42 @@ +package biomesoplenty.liquids; + +import net.minecraft.block.BlockFlowing; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.Icon; +import net.minecraft.world.World; +import biomesoplenty.BiomesOPlenty; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class BlockSpringWaterFlowing extends BlockFlowing +{ + public BlockSpringWaterFlowing(int id) + { + super(id, Material.water); + + this.blockHardness = 100F; + this.setLightOpacity(3); + this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + } + + @Override + public void onEntityCollidedWithBlock(World par1World, int x, int y, int z, Entity par5Entity) + { + int meta = par1World.getBlockMetadata(x, y, z); + + if (par5Entity instanceof EntityLiving) + ((EntityLiving)par5Entity).addPotionEffect(new PotionEffect(Potion.regeneration.id, 1)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + this.theIcon = new Icon[]{iconRegister.registerIcon("BiomesOPlenty:spring_water_still"), iconRegister.registerIcon("BiomesOPlenty:spring_water_flowing")}; + } +} diff --git a/src/minecraft/biomesoplenty/liquids/BlockSpringWaterStill.java b/src/minecraft/biomesoplenty/liquids/BlockSpringWaterStill.java new file mode 100644 index 000000000..7f563e7a0 --- /dev/null +++ b/src/minecraft/biomesoplenty/liquids/BlockSpringWaterStill.java @@ -0,0 +1,44 @@ +package biomesoplenty.liquids; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.BlockStationary; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.Icon; +import net.minecraft.world.World; + +import biomesoplenty.BiomesOPlenty; + +public class BlockSpringWaterStill extends BlockStationary +{ + public BlockSpringWaterStill(int id) + { + super(id, Material.water); + + this.blockHardness = 100F; + this.setLightOpacity(3); + this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty); + this.disableStats(); + } + + @Override + public void onEntityCollidedWithBlock(World par1World, int x, int y, int z, Entity par5Entity) + { + int meta = par1World.getBlockMetadata(x, y, z); + + if (par5Entity instanceof EntityLiving) + ((EntityLiving)par5Entity).addPotionEffect(new PotionEffect(Potion.regeneration.id, 1)); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IconRegister iconRegister) + { + this.theIcon = new Icon[]{iconRegister.registerIcon("BiomesOPlenty:spring_water_still"), iconRegister.registerIcon("BiomesOPlenty:spring_water_flowing")}; + } +} diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_flowing.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_flowing.png new file mode 100644 index 000000000..da43d1a7e Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_flowing.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_flowing.txt b/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_flowing.txt new file mode 100644 index 000000000..0af6f629f --- /dev/null +++ b/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_flowing.txt @@ -0,0 +1,32 @@ +0*2 +1*2 +2*2 +3*2 +4*2 +5*2 +6*2 +7*2 +8*2 +9*2 +10*2 +11*2 +12*2 +13*2 +14*2 +15*2 +16*2 +17*2 +18*2 +19*2 +20*2 +21*2 +22*2 +23*2 +24*2 +25*2 +26*2 +27*2 +28*2 +29*2 +30*2 +31*2 \ No newline at end of file diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_still.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_still.png new file mode 100644 index 000000000..a28cc7dd1 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_still.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_still.txt b/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_still.txt new file mode 100644 index 000000000..0af6f629f --- /dev/null +++ b/src/minecraft/mods/BiomesOPlenty/textures/blocks/spring_water_still.txt @@ -0,0 +1,32 @@ +0*2 +1*2 +2*2 +3*2 +4*2 +5*2 +6*2 +7*2 +8*2 +9*2 +10*2 +11*2 +12*2 +13*2 +14*2 +15*2 +16*2 +17*2 +18*2 +19*2 +20*2 +21*2 +22*2 +23*2 +24*2 +25*2 +26*2 +27*2 +28*2 +29*2 +30*2 +31*2 \ No newline at end of file