Started working on Spring Water

This commit is contained in:
Adubbz 2013-05-25 12:33:57 +10:00
parent 506f3d96b5
commit 091448efbe
9 changed files with 211 additions and 6 deletions

View file

@ -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();

View file

@ -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();

View file

@ -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");
}
}

View file

@ -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")};
}
}

View file

@ -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")};
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View file

@ -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