Made reeds look nicer

This commit is contained in:
Matt Caughey 2014-01-21 01:17:19 -05:00
parent d578f9919a
commit c169a2029e
6 changed files with 14 additions and 8 deletions

View File

@ -37,6 +37,7 @@ public class BiomeGenShrubland extends BOPBiome
this.bopWorldFeatures.bushesPerChunk = 7;
this.bopWorldFeatures.shrubsPerChunk = 5;
this.bopWorldFeatures.waterReedsPerChunk = 3;
this.bopWorldFeatures.generatePumpkins = false;
}

View File

@ -134,6 +134,8 @@ public class BlockBOPPlant extends BOPBlockWorldDecor implements IShearable
Block block = world.func_147439_a(x, y - 1, z);
//TODO: getBlock()
Block root = world.func_147439_a(x, y + 1, z);
//TODO: getBlock()
Block reedwater = world.func_147439_a(x, y - 2, z);
switch (metadata)
{
@ -177,7 +179,7 @@ public class BlockBOPPlant extends BOPBlockWorldDecor implements IShearable
return block == Blocks.soul_sand;
case 14: // Reed
return block == Blocks.water;
return block == Blocks.water && reedwater != Blocks.water;
case 15: // Root
return root != Blocks.air && (root == Blocks.grass || root == Blocks.dirt || root == Blocks.farmland || root == BOPBlockHelper.get("longGrass") || root == BOPBlockHelper.get("grass") || root == BOPBlockHelper.get("holyDirt"));

View File

@ -105,12 +105,15 @@ public class ItemBlockPlant extends ItemBlock
//TODO: getBlock() getMaterial() water isAirBlock()
if (world.func_147439_a(i, j, k).func_149688_o() == Material.field_151586_h && world.getBlockMetadata(i, j, k) == 0 && world.func_147437_c(i, j + 1, k))
{
//TODO: setBlock() linkedBlock
world.func_147465_d(i, j + 1, k, field_150939_a, 14, 2);
if (!player.capabilities.isCreativeMode)
if (world.func_147439_a(i, j - 1, k).func_149688_o() != Material.field_151586_h)
{
--itemStack.stackSize;
//TODO: setBlock() linkedBlock
world.func_147465_d(i, j + 1, k, field_150939_a, 14, 2);
if (!player.capabilities.isCreativeMode)
{
--itemStack.stackSize;
}
}
}
}

View File

@ -17,7 +17,7 @@ public class WorldGenWaterReeds extends WorldGeneratorBOP
@Override
public boolean generate(World world, Random random, int x, int y, int z)
{
for (int var6 = 0; var6 < 64; ++var6)
for (int var6 = 0; var6 < 128; ++var6)
{
int i1 = x + random.nextInt(8) - random.nextInt(8);
int j1 = y + random.nextInt(2) - random.nextInt(2);
@ -26,7 +26,7 @@ public class WorldGenWaterReeds extends WorldGeneratorBOP
//TODO: isAirBlock() canReplace()
if (world.func_147437_c(i1, j1, k1) && BOPBlockHelper.get("plants").func_149705_a(world, i1, j1, k1, 0, new ItemStack(BOPBlockHelper.get("plants"), 1, 14)))
{
for (int i = 2; i > -2; --i)
for (int i = 4; i > -4; --i)
{
//TODO: getBlock()
if (world.func_147439_a(i1 - i, j1 - 1, k1 - i) != Blocks.water)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 622 B