Added filled honeycombs
This commit is contained in:
parent
9197d37c5e
commit
01211d8c8d
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 705 B |
Binary file not shown.
After Width: | Height: | Size: 510 B |
Loading…
Reference in New Issue