diff --git a/src/minecraft/assets/biomesoplenty/textures/blocks/item_wildcarrot.png b/src/minecraft/assets/biomesoplenty/textures/blocks/item_wildcarrot.png new file mode 100644 index 000000000..6f4437103 Binary files /dev/null and b/src/minecraft/assets/biomesoplenty/textures/blocks/item_wildcarrot.png differ diff --git a/src/minecraft/assets/biomesoplenty/textures/blocks/wildcarrot.png b/src/minecraft/assets/biomesoplenty/textures/blocks/wildcarrot.png index d0c880b7c..b26bb0e6c 100644 Binary files a/src/minecraft/assets/biomesoplenty/textures/blocks/wildcarrot.png and b/src/minecraft/assets/biomesoplenty/textures/blocks/wildcarrot.png differ diff --git a/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java b/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java index 6ad8b7831..6b7751795 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeDecoratorBOP.java @@ -454,7 +454,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator netherWartGen = new WorldGenNetherWart(Block.netherStalk.blockID, 0); canyonGrassGen = new WorldGenCanyonGrass(Blocks.foliage.get().blockID, 2); steppeGen = new WorldGenSteppe(Block.sand.blockID, 0); - carrotGen = new WorldGenCarrots(Block.tallGrass.blockID, 0); + carrotGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 11); potatoGen = new WorldGenPotatoes(Block.tallGrass.blockID, 0); bigMushroomGen = new WorldGenBigMushroom(); reedGen = new WorldGenReed(); diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenChaparral.java b/src/minecraft/biomesoplenty/biomes/BiomeGenChaparral.java index 42e416813..1c61fa57e 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenChaparral.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenChaparral.java @@ -30,6 +30,7 @@ public class BiomeGenChaparral extends BiomeGenBase customBiomeDecorator.berryBushesPerChunk = 2; customBiomeDecorator.generateStoneInGrass = true; customBiomeDecorator.generatePumpkins = false; + customBiomeDecorator.carrotsPerChunk = 1; spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6)); } diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenForestNew.java b/src/minecraft/biomesoplenty/biomes/BiomeGenForestNew.java index b1e558d20..dc4a5124c 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenForestNew.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenForestNew.java @@ -29,6 +29,7 @@ public class BiomeGenForestNew extends BiomeGenBase customBiomeDecorator.poisonIvyPerChunk = 2; customBiomeDecorator.sunflowersPerChunk = 1; customBiomeDecorator.berryBushesPerChunk = 2; + customBiomeDecorator.carrotsPerChunk = 1; } /** diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenFungiForest.java b/src/minecraft/biomesoplenty/biomes/BiomeGenFungiForest.java index 09e37a44f..de09cbff7 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenFungiForest.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenFungiForest.java @@ -43,6 +43,7 @@ public class BiomeGenFungiForest extends BiomeGenBase customBiomeDecorator.highCattailsPerChunk = 2; customBiomeDecorator.reedsBOPPerChunk = 1; customBiomeDecorator.lilyflowersPerChunk = 2; + customBiomeDecorator.carrotsPerChunk = 1; customBiomeDecorator.generateMycelium = true; customBiomeDecorator.generatePumpkins = true; waterColorMultiplier = 65326; diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenGarden.java b/src/minecraft/biomesoplenty/biomes/BiomeGenGarden.java index 6862934c9..2e95c42e9 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenGarden.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenGarden.java @@ -36,6 +36,7 @@ public class BiomeGenGarden extends BiomeGenBase customBiomeDecorator.sandPerChunk2 = -999; customBiomeDecorator.bushesPerChunk = 10; customBiomeDecorator.lilyflowersPerChunk = 4; + customBiomeDecorator.carrotsPerChunk = 1; customBiomeDecorator.generatePumpkins = true; customBiomeDecorator.generateMelons = true; spawnableCreatureList.clear(); diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenHighland.java b/src/minecraft/biomesoplenty/biomes/BiomeGenHighland.java index 2dd54b144..3c4050cbd 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenHighland.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenHighland.java @@ -20,6 +20,7 @@ public class BiomeGenHighland extends BiomeGenBase customBiomeDecorator.grassPerChunk = 25; customBiomeDecorator.potatoesPerChunk = -999; customBiomeDecorator.generateBoulders = false; + customBiomeDecorator.carrotsPerChunk = 1; } @Override diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenJadeCliffs.java b/src/minecraft/biomesoplenty/biomes/BiomeGenJadeCliffs.java index 137201380..28fc5746c 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenJadeCliffs.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenJadeCliffs.java @@ -22,6 +22,7 @@ public class BiomeGenJadeCliffs extends BiomeGenBase customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator; customBiomeDecorator.treesPerChunk = 12; customBiomeDecorator.grassPerChunk = 3; + customBiomeDecorator.carrotsPerChunk = 1; } @Override diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenMeadow.java b/src/minecraft/biomesoplenty/biomes/BiomeGenMeadow.java index d69bddede..ca53abccd 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenMeadow.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenMeadow.java @@ -25,7 +25,7 @@ public class BiomeGenMeadow extends BiomeGenBase customBiomeDecorator.grassPerChunk = 10; customBiomeDecorator.tinyFlowersPerChunk = 14; customBiomeDecorator.flowersPerChunk = 10; - customBiomeDecorator.carrotsPerChunk = -999; + customBiomeDecorator.carrotsPerChunk = 1; customBiomeDecorator.sandPerChunk = -999; customBiomeDecorator.sandPerChunk2 = -999; customBiomeDecorator.hydrangeasPerChunk = 3; diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenMeadowForest.java b/src/minecraft/biomesoplenty/biomes/BiomeGenMeadowForest.java index 688cfecb3..78903bd09 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenMeadowForest.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenMeadowForest.java @@ -22,7 +22,7 @@ public class BiomeGenMeadowForest extends BiomeGenBase customBiomeDecorator.grassPerChunk = 10; customBiomeDecorator.tinyFlowersPerChunk = 7; customBiomeDecorator.flowersPerChunk = 10; - customBiomeDecorator.carrotsPerChunk = -999; + customBiomeDecorator.carrotsPerChunk = 1; customBiomeDecorator.sandPerChunk = -999; customBiomeDecorator.sandPerChunk2 = -999; customBiomeDecorator.hydrangeasPerChunk = 3; diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenOrchard.java b/src/minecraft/biomesoplenty/biomes/BiomeGenOrchard.java index c47e50ad9..cd3dc8a6f 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenOrchard.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenOrchard.java @@ -29,6 +29,7 @@ public class BiomeGenOrchard extends BiomeGenBase customBiomeDecorator.sunflowersPerChunk = 1; customBiomeDecorator.lilyflowersPerChunk = 2; customBiomeDecorator.berryBushesPerChunk = 3; + customBiomeDecorator.carrotsPerChunk = 1; spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6)); } diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenPrairie.java b/src/minecraft/biomesoplenty/biomes/BiomeGenPrairie.java index 70abdf37f..d0d3bcb50 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenPrairie.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenPrairie.java @@ -26,6 +26,7 @@ public class BiomeGenPrairie extends BiomeGenBase customBiomeDecorator.whiteFlowersPerChunk = 45; customBiomeDecorator.portobellosPerChunk = 2; customBiomeDecorator.berryBushesPerChunk = 2; + customBiomeDecorator.carrotsPerChunk = 1; spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6)); } diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenSpruceWoods.java b/src/minecraft/biomesoplenty/biomes/BiomeGenSpruceWoods.java index 1777ad439..81d1ed65b 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenSpruceWoods.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenSpruceWoods.java @@ -27,6 +27,7 @@ public class BiomeGenSpruceWoods extends BiomeGenBase customBiomeDecorator.sproutsPerChunk = 3; customBiomeDecorator.poisonIvyPerChunk = 1; customBiomeDecorator.berryBushesPerChunk = 3; + customBiomeDecorator.carrotsPerChunk = 1; } /** diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenTemperateRainforest.java b/src/minecraft/biomesoplenty/biomes/BiomeGenTemperateRainforest.java index b928f9964..8ebd18d76 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenTemperateRainforest.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenTemperateRainforest.java @@ -28,6 +28,7 @@ public class BiomeGenTemperateRainforest extends BiomeGenBase customBiomeDecorator.generatePumpkins = false; customBiomeDecorator.blueMilksPerChunk = 3; customBiomeDecorator.poisonIvyPerChunk = 1; + customBiomeDecorator.carrotsPerChunk = 1; } /** diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java index a9a1437ff..cd976a2f1 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPPlant.java @@ -19,11 +19,12 @@ import net.minecraft.world.World; import net.minecraftforge.common.IShearable; import biomesoplenty.BiomesOPlenty; import biomesoplenty.api.Blocks; +import biomesoplenty.api.Items; import biomesoplenty.blocks.renderers.RenderUtils; public class BlockBOPPlant extends BlockFlower implements IShearable { - private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "reed", "cattailtop", "cattailbottom"}; + private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "reed", "cattailtop", "cattailbottom", "wildcarrot"}; private Icon[] textures; private static final int CATTAILTOP = 9; @@ -89,8 +90,11 @@ public class BlockBOPPlant extends BlockFlower implements IShearable @SuppressWarnings({ "rawtypes", "unchecked" }) public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { - for (int i = 0; i < CATTAILTOP; ++i) { - list.add(new ItemStack(blockID, 1, i)); + for (int i = 0; i < 12; ++i) { + if (i != 9 && i != 10) + { + list.add(new ItemStack(blockID, 1, i)); + } } } @@ -222,19 +226,35 @@ public class BlockBOPPlant extends BlockFlower implements IShearable @Override public int idDropped(int par1, Random par2Random, int par3) { - if (par1 > 5) + if (par1 > 5 && par1 != 11) + { return blockID; + } + else if (par1 == 11) + { + return Items.berries.get().itemID; + } else + { return -1; + } } @Override public int damageDropped(int meta) { if (meta == 9) + { return 7; + } + else if (meta == 11) + { + return 2; + } else + { return meta; + } } @Override @@ -244,6 +264,8 @@ public class BlockBOPPlant extends BlockFlower implements IShearable return random.nextInt(5) == 0 ? 1 : 0; else if (meta == 7 || meta == 8 || meta == 9) return 1; + else if (meta == 11) + return random.nextInt(7) == 0 ? 2 : 1; else return 0; } diff --git a/src/minecraft/biomesoplenty/configuration/BOPCrafting.java b/src/minecraft/biomesoplenty/configuration/BOPCrafting.java index 96e961656..a921d9ee5 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPCrafting.java +++ b/src/minecraft/biomesoplenty/configuration/BOPCrafting.java @@ -250,6 +250,9 @@ public class BOPCrafting //Plants GameRegistry.addShapelessRecipe(new ItemStack(Items.shroomPowder.get(), 2), new Object[] {new ItemStack(Blocks.mushrooms.get(),1,0)}); GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 1, 3), new Object[] {new ItemStack(Blocks.foliage.get(),1,7)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 1, 4), new Object[] {Item.bowlEmpty, new ItemStack(Items.berries.get(), 1, 0), Item.appleRed, Item.melon}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 1, 5), new Object[] {Item.bowlEmpty, new ItemStack(Items.berries.get(), 1, 2), Item.carrot, Item.potato}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 1, 6), new Object[] {Item.bowlEmpty, new ItemStack(Blocks.mushrooms.get(), 1, 0), new ItemStack(Blocks.mushrooms.get(), 1, 1), new ItemStack(Blocks.mushrooms.get(), 1, 2)}); //Glass GameRegistry.addRecipe(new ItemStack(Blocks.glass.get(), 1, 0), new Object [] {"GGG", "GGG", "GGG", Character.valueOf('G'), Block.glass}); diff --git a/src/minecraft/biomesoplenty/itemblocks/ItemBlockPlant.java b/src/minecraft/biomesoplenty/itemblocks/ItemBlockPlant.java index 30161137e..5ac2a2deb 100644 --- a/src/minecraft/biomesoplenty/itemblocks/ItemBlockPlant.java +++ b/src/minecraft/biomesoplenty/itemblocks/ItemBlockPlant.java @@ -13,7 +13,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class ItemBlockPlant extends ItemBlock { - private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "reed", "cattailtop", "cattailbottom"}; + private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "reed", "cattailtop", "cattailbottom", "wildcarrot"}; @SideOnly(Side.CLIENT) private Icon[] textures; @@ -34,11 +34,12 @@ public class ItemBlockPlant extends ItemBlock @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister) { - textures = new Icon[3]; + textures = new Icon[4]; textures[0] = iconRegister.registerIcon("biomesoplenty:item_barley"); textures[1] = iconRegister.registerIcon("biomesoplenty:item_cattail"); textures[2] = iconRegister.registerIcon("biomesoplenty:item_reed"); + textures[3] = iconRegister.registerIcon("biomesoplenty:item_wildcarrot"); } @Override @@ -61,6 +62,8 @@ public class ItemBlockPlant extends ItemBlock return textures[1]; else if (meta == 8) return textures[2]; + else if (meta == 11) + return textures[3]; else return Block.blocksList[itemID].getIcon(0, meta); } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPFood.java b/src/minecraft/biomesoplenty/items/ItemBOPFood.java index ca3b28a8c..302d9c1e9 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPFood.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPFood.java @@ -15,7 +15,7 @@ import biomesoplenty.BiomesOPlenty; public class ItemBOPFood extends ItemFood { - private static final String[] foodTypes = new String[] {"berries", "shroomPowder"}; + private static final String[] foodTypes = new String[] {"berries", "shroomPowder", "wildcarrots", "sunflowerseeds", "saladfruit", "saladveggie", "saladshroom"}; private Icon[] textures; public ItemBOPFood(int par1) @@ -31,7 +31,7 @@ public class ItemBOPFood extends ItemFood { if (itemstack.getItemDamage() == 0) { - return addFoodAndSaturation(world, itemstack, player, 3, 0.2F); + return addFoodAndSaturation(world, itemstack, player, 2, 0.2F); } else if (itemstack.getItemDamage() == 1) { @@ -42,6 +42,41 @@ public class ItemBOPFood extends ItemFood return addFoodAndSaturation(world, itemstack, player, 1, 0.1F); } + else if (itemstack.getItemDamage() == 2) + { + return addFoodAndSaturation(world, itemstack, player, 3, 0.5F); + } + else if (itemstack.getItemDamage() == 3) + { + return addFoodAndSaturation(world, itemstack, player, 2, 0.5F); + } + else if (itemstack.getItemDamage() == 4) + { + if (world.rand.nextFloat() < 0.05F) + { + player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 550, 1)); + } + + return addFoodAndSaturation(world, itemstack, player, 6, 0.8F); + } + else if (itemstack.getItemDamage() == 5) + { + if (world.rand.nextFloat() < 0.05F) + { + player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 1100, 1)); + } + + return addFoodAndSaturation(world, itemstack, player, 6, 1.2F); + } + else if (itemstack.getItemDamage() == 6) + { + if (world.rand.nextFloat() < 0.05F) + { + player.addPotionEffect(new PotionEffect(Potion.jump.id, 550, 1)); + } + + return addFoodAndSaturation(world, itemstack, player, 6, 1.6F); + } return addFoodAndSaturation(world, itemstack, player, 0, 0); }