diff --git a/common/biomesoplenty/blocks/BlockHive.java b/common/biomesoplenty/blocks/BlockHive.java index 3da0ed6b9..a42360793 100644 --- a/common/biomesoplenty/blocks/BlockHive.java +++ b/common/biomesoplenty/blocks/BlockHive.java @@ -13,11 +13,12 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.Items; import biomesoplenty.entities.EntityWasp; public class BlockHive extends Block { - private static final String[] hiveTypes = new String[] {"honeycomb", "hive", "honeycombempty"}; + private static final String[] hiveTypes = new String[] {"honeycomb", "hive", "honeycombempty", "honeycombfilled"}; private Icon[] textures; public BlockHive(int par1) @@ -61,6 +62,47 @@ public class BlockHive extends Block } } + @Override + public int idDropped(int meta, Random par2Random, int par3) + { + if (meta == 3) + { + return Items.food.get().itemID; + } + + return this.blockID; + } + + @Override + public int damageDropped(int meta) + { + if (meta == 2) + { + return 0; + } + if (meta == 3) + { + return 9; + } + + return meta; + } + + @Override + public int quantityDropped(int meta, int fortune, Random random) + { + if (meta == 2) + { + return 0; + } + if (meta == 3) + { + return random.nextInt(3); + } + + return 1; + } + @Override public int getFlammability(IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) { diff --git a/common/biomesoplenty/itemblocks/ItemBlockHive.java b/common/biomesoplenty/itemblocks/ItemBlockHive.java index c419d4261..c8a77718e 100644 --- a/common/biomesoplenty/itemblocks/ItemBlockHive.java +++ b/common/biomesoplenty/itemblocks/ItemBlockHive.java @@ -8,7 +8,7 @@ import net.minecraft.world.World; public class ItemBlockHive extends ItemBlock { - private static final String[] types = new String[] {"honeycomb", "hive", "honeycombempty"}; + private static final String[] types = new String[] {"honeycomb", "hive", "honeycombempty", "honeycombfilled"}; public ItemBlockHive(int par1) { diff --git a/common/biomesoplenty/items/ItemBOPFood.java b/common/biomesoplenty/items/ItemBOPFood.java index 435d3b438..0a436b7ff 100644 --- a/common/biomesoplenty/items/ItemBOPFood.java +++ b/common/biomesoplenty/items/ItemBOPFood.java @@ -16,7 +16,7 @@ import biomesoplenty.BiomesOPlenty; public class ItemBOPFood extends ItemFood { - private static final String[] foodTypes = new String[] {"berries", "shroompowder", "wildcarrots", "sunflowerseeds", "saladfruit", "saladveggie", "saladshroom", "earth", "persimmon"}; + private static final String[] foodTypes = new String[] {"berries", "shroompowder", "wildcarrots", "sunflowerseeds", "saladfruit", "saladveggie", "saladshroom", "earth", "persimmon", "filledhoneycomb"}; private Icon[] textures; public ItemBOPFood(int par1) @@ -85,6 +85,10 @@ public class ItemBOPFood extends ItemFood player.getFoodStats().addStats(5, 0.2F); break; + case 9: + player.getFoodStats().addStats(3, 0.4F); + break; + default: player.getFoodStats().addStats(0, 0.0F); break; diff --git a/common/biomesoplenty/worldgen/WorldGenHive.java b/common/biomesoplenty/worldgen/WorldGenHive.java index 65af7a2cd..eefb4622d 100644 --- a/common/biomesoplenty/worldgen/WorldGenHive.java +++ b/common/biomesoplenty/worldgen/WorldGenHive.java @@ -75,6 +75,8 @@ public class WorldGenHive extends WorldGenerator spawnWasps(world, rand, x, y, z); spawnEmptyHoneycombs(world, rand, x, y, z); + + spawnFilledHoneycombs(world, rand, x, y, z); } return true; @@ -187,7 +189,25 @@ public class WorldGenHive extends WorldGenerator { if (world.getBlockMetadata(spawnx, spawny, spawnz) == 0) { - world.setBlock(spawnx, spawny, spawnz, Blocks.hive.get().blockID, 2, 0); + world.setBlock(spawnx, spawny, spawnz, Blocks.hive.get().blockID, 2, 2); + } + } + } + } + + public void spawnFilledHoneycombs(World world, Random rand, int x, int y, int z) + { + for (int spawn = 0; spawn < 20; spawn++) + { + int spawnx = (x - 8) + rand.nextInt(16); + int spawny = y - rand.nextInt(12); + int spawnz = (z - 8) + rand.nextInt(16); + + if (world.getBlockId(spawnx, spawny, spawnz) == Blocks.hive.get().blockID) + { + if (world.getBlockMetadata(spawnx, spawny, spawnz) == 0) + { + world.setBlock(spawnx, spawny, spawnz, Blocks.hive.get().blockID, 3, 2); } } } diff --git a/resources/assets/biomesoplenty/lang/en_US.lang b/resources/assets/biomesoplenty/lang/en_US.lang index 03f8b25ec..7b81f7092 100644 --- a/resources/assets/biomesoplenty/lang/en_US.lang +++ b/resources/assets/biomesoplenty/lang/en_US.lang @@ -160,6 +160,7 @@ tile.bop.cloud.name=Cloud Block tile.bop.hive.honeycomb.name=Honeycomb Block tile.bop.hive.hive.name=Hive Block tile.bop.hive.honeycombempty.name=Empty Honeycomb Block +tile.bop.hive.honeycombfilled.name=Filled Honeycomb Block tile.bop.honeyBlock.name=Honey Block @@ -298,6 +299,7 @@ item.bop.food.saladfruit.name=Fruit Salad item.bop.food.saladveggie.name=Veggie Salad item.bop.food.saladshroom.name=Shroom Salad item.bop.food.persimmon.name=Persimmon +item.bop.food.filledhoneycomb.name=Honeycomb item.bop.dartblower.name=Dart Blower item.bop.dart.dart.name=Dart diff --git a/resources/assets/biomesoplenty/textures/blocks/honeycombfilled.png b/resources/assets/biomesoplenty/textures/blocks/honeycombfilled.png new file mode 100644 index 000000000..fd4e6ec8e Binary files /dev/null and b/resources/assets/biomesoplenty/textures/blocks/honeycombfilled.png differ diff --git a/resources/assets/biomesoplenty/textures/items/filledhoneycomb.png b/resources/assets/biomesoplenty/textures/items/filledhoneycomb.png new file mode 100644 index 000000000..39d7c819f Binary files /dev/null and b/resources/assets/biomesoplenty/textures/items/filledhoneycomb.png differ