diff --git a/common/biomesoplenty/blocks/BlockHive.java b/common/biomesoplenty/blocks/BlockHive.java index 003243287..e14216468 100644 --- a/common/biomesoplenty/blocks/BlockHive.java +++ b/common/biomesoplenty/blocks/BlockHive.java @@ -17,7 +17,7 @@ import biomesoplenty.entities.EntityWasp; public class BlockHive extends Block { - private static final String[] hiveTypes = new String[] {"honeycomb", "honeycombspawner", "hive", "hivespawner", "honeycombempty"}; + private static final String[] hiveTypes = new String[] {"honeycomb", "hive", "honeycombempty", "honeyblock"}; private Icon[] textures; public BlockHive(int par1) @@ -29,7 +29,7 @@ public class BlockHive extends Block @Override public void breakBlock(World world, int x, int y, int z, int par5, int par6) { - if (world.getBlockMetadata(x, y, z) == 4) + if (world.getBlockMetadata(x, y, z) == 2) { EntityWasp wasp = new EntityWasp(world); wasp.setLocationAndAngles((double)x + 0.6, (double)y + 0.1, (double)z + 0.3, 0.0F, 0.0F); @@ -61,19 +61,6 @@ public class BlockHive extends Block } } - @Override - public int damageDropped(int meta) - { - if (meta == 1) { - meta = 0; - } - if (meta == 3) { - meta = 2; - } - - return meta; - } - @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 9ab95e701..1da826fed 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", "honeycombspawner", "hive", "hivespawner", "honeycombempty"}; + private static final String[] types = new String[] {"honeycomb", "hive", "honeycombempty", "honeyblock"}; public ItemBlockHive(int par1) { diff --git a/common/biomesoplenty/worldgen/WorldGenHive.java b/common/biomesoplenty/worldgen/WorldGenHive.java index 0a667ec48..789993f66 100644 --- a/common/biomesoplenty/worldgen/WorldGenHive.java +++ b/common/biomesoplenty/worldgen/WorldGenHive.java @@ -19,10 +19,13 @@ public class WorldGenHive extends WorldGenerator int baseWidth = 4 + rand.nextInt(2); int baseHeight = 8 + rand.nextInt(2); - if (world.getBlockId(x, y + 3, z) != Block.netherrack.blockID || !world.isAirBlock(x, y + 2, z)) + for (int air = 0; air < 26; air++) + { + if (world.getBlockId(x, y + 3, z) != Block.netherrack.blockID || !world.isAirBlock(x, (y + 2) - air, z)) { - return false; + return false; } + } for (int cubeno = 0; cubeno < 4; cubeno++) { @@ -43,12 +46,12 @@ public class WorldGenHive extends WorldGenerator case 2: chance = 1.0F; - meta = 2; + meta = 1; break; case 3: chance = 0.5F; - meta = 2; + meta = 1; break; } @@ -119,8 +122,8 @@ public class WorldGenHive extends WorldGenerator { for (int j = -width; j < width; j++) { - if ((hLayer == 0 || hLayer == (height - 1)) && (world.rand.nextFloat() <= chance)) world.setBlock(origx + i, origy - hLayer, origz + j, Blocks.hive.get().blockID, meta, 2); - else if ((i == -width || i == (width - 1) || j == -width || j == (width - 1)) && (world.rand.nextFloat() <= chance)) world.setBlock(origx + i, origy - hLayer, origz + j, Blocks.hive.get().blockID, meta, 2); + if ((hLayer == 0 || hLayer == (height - 1)) && (world.rand.nextFloat() <= chance)) world.setBlock(origx + i, origy - hLayer, origz + j, Blocks.hive.get().blockID, 1, 2); + else if ((i == -width || i == (width - 1) || j == -width || j == (width - 1)) && (world.rand.nextFloat() <= chance)) world.setBlock(origx + i, origy - hLayer, origz + j, Blocks.hive.get().blockID, 1, 2); } } } @@ -128,7 +131,7 @@ public class WorldGenHive extends WorldGenerator public void spawnWasps(World world, Random rand, int x, int y, int z) { - for (int spawn = 0; spawn < 20; spawn++) + for (int spawn = 0; spawn < 50; spawn++) { int spawnx = (x - 12) + rand.nextInt(24); int spawny = y - rand.nextInt(24); @@ -136,14 +139,21 @@ public class WorldGenHive extends WorldGenerator if (world.getBlockId(spawnx, spawny, spawnz) == Blocks.hive.get().blockID) { - if (world.getBlockMetadata(spawnx, spawny, spawnz) == 0) + if (world.getBlockMetadata(spawnx, spawny, spawnz) == 1) { - world.setBlock(spawnx, spawny, spawnz, Blocks.hive.get().blockID, 1, 0); - } - - if (world.getBlockMetadata(spawnx, spawny, spawnz) == 2) - { - world.setBlock(spawnx, spawny, spawnz, Blocks.hive.get().blockID, 3, 0); + if (world.getBlockId(spawnx - 1, spawny, spawnz) == Blocks.hive.get().blockID && world.getBlockId(spawnx + 1, spawny, spawnz) == Blocks.hive.get().blockID && world.getBlockId(spawnx, spawny, spawnz - 1) == Blocks.hive.get().blockID && world.getBlockId(spawnx, spawny, spawnz + 1) == Blocks.hive.get().blockID && world.getBlockId(spawnx, spawny - 1, spawnz) == Blocks.hive.get().blockID && world.getBlockId(spawnx, spawny + 1, spawnz) == Blocks.hive.get().blockID) + { + if (world.getBlockMetadata(spawnx - 1, spawny, spawnz) == 1 && world.getBlockMetadata(spawnx + 1, spawny, spawnz) == 1 && world.getBlockMetadata(spawnx, spawny, spawnz - 1) == 1 && world.getBlockMetadata(spawnx, spawny, spawnz + 1) == 1 && world.getBlockMetadata(spawnx, spawny - 1, spawnz) == 1 && world.getBlockMetadata(spawnx, spawny + 1, spawnz) == 1) + { + world.setBlock(spawnx, spawny, spawnz, Block.mobSpawner.blockID); + TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner)world.getBlockTileEntity(spawnx, spawny, spawnz); + + if (tileentitymobspawner != null) + { + tileentitymobspawner.getSpawnerLogic().setMobID("BiomesOPlenty.Wasp"); + } + } + } } } } @@ -161,7 +171,7 @@ public class WorldGenHive extends WorldGenerator { if (world.getBlockMetadata(spawnx, spawny, spawnz) == 0) { - world.setBlock(spawnx, spawny, spawnz, Blocks.hive.get().blockID, 4, 0); + world.setBlock(spawnx, spawny, spawnz, Blocks.hive.get().blockID, 2, 0); } } } diff --git a/resources/assets/biomesoplenty/lang/en_US.lang b/resources/assets/biomesoplenty/lang/en_US.lang index 6f887ad3a..c8284b407 100644 --- a/resources/assets/biomesoplenty/lang/en_US.lang +++ b/resources/assets/biomesoplenty/lang/en_US.lang @@ -158,10 +158,9 @@ tile.bop.moss.name=Moss tile.bop.cloud.name=Cloud Block tile.bop.hive.honeycomb.name=Honeycomb Block -tile.bop.hive.honeycombspawner.name=Honeycomb Wasp Spawner tile.bop.hive.hive.name=Hive Block -tile.bop.hive.hivespawner.name=Hive Wasp Spawner tile.bop.hive.honeycombempty.name=Empty Honeycomb Block +tile.bop.hive.honeyblock.name=Solid Honey Block tile.bop.bones.bones_small.name=Small Bone Segment tile.bop.bones.bones_medium.name=Medium Bone Segment diff --git a/resources/assets/biomesoplenty/textures/blocks/honeyblock.png b/resources/assets/biomesoplenty/textures/blocks/honeyblock.png new file mode 100644 index 000000000..8f3adfc51 Binary files /dev/null and b/resources/assets/biomesoplenty/textures/blocks/honeyblock.png differ