From c169a2029e1af6575688deea7c226cd8083638ec Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Tue, 21 Jan 2014 01:17:19 -0500 Subject: [PATCH] Made reeds look nicer --- .../common/biomes/BiomeGenShrubland.java | 1 + .../common/blocks/BlockBOPPlant.java | 4 +++- .../common/itemblocks/ItemBlockPlant.java | 13 ++++++++----- .../world/features/WorldGenWaterReeds.java | 4 ++-- .../biomesoplenty/textures/blocks/reed.png | Bin 592 -> 592 bytes .../textures/blocks/reedbottom.png | Bin 494 -> 622 bytes 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenShrubland.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenShrubland.java index 47a30e7a5..dfb462a77 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenShrubland.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenShrubland.java @@ -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; } diff --git a/src/main/java/biomesoplenty/common/blocks/BlockBOPPlant.java b/src/main/java/biomesoplenty/common/blocks/BlockBOPPlant.java index 181a52a9d..fdc596a12 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockBOPPlant.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockBOPPlant.java @@ -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")); diff --git a/src/main/java/biomesoplenty/common/itemblocks/ItemBlockPlant.java b/src/main/java/biomesoplenty/common/itemblocks/ItemBlockPlant.java index fcbaa0026..f77029d70 100644 --- a/src/main/java/biomesoplenty/common/itemblocks/ItemBlockPlant.java +++ b/src/main/java/biomesoplenty/common/itemblocks/ItemBlockPlant.java @@ -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; + } } } } diff --git a/src/main/java/biomesoplenty/common/world/features/WorldGenWaterReeds.java b/src/main/java/biomesoplenty/common/world/features/WorldGenWaterReeds.java index b56e8aab6..80ecf68c8 100644 --- a/src/main/java/biomesoplenty/common/world/features/WorldGenWaterReeds.java +++ b/src/main/java/biomesoplenty/common/world/features/WorldGenWaterReeds.java @@ -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) diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/reed.png b/src/main/resources/assets/biomesoplenty/textures/blocks/reed.png index b9abe2d3cb41373405914fae1d4d8d61d70482a5..f968cadb8c6fd5f747e22c199f2f9137c1341b45 100644 GIT binary patch delta 52 zcmcb>a)D)n4c8t92EILvQ}+~kZghLYDEHJ!#vrP6tJGO_{kebac(o;?8Gyjk)z4*} HQ$iB}@Y4~! delta 52 zcmcb>a)D)n4cA@<2EM(F?!PCj-RSm)QEsV~j6qcCR;jbPbXFR5(vvQE5{eK@gq4U{$Q#CYqum zq9BK`5>T!M(K3e|3&fxi5td6#B__rrWh#}w{j%M|&hF-Y>DS%UZ{G9>8`qsJ%&55f zoKoCf|9O&T{%87L)fo5Veb`OHxe-y^{III{_fDSq*TaNYfZ!gw>F?m~EX(=bV3*^6 z-!BKaHw((1BKYjd`QEg1R2C+(lshlo&LB)5vcu zcm)U~P%Ev|E|`-es^_B5EwLafSs(YBJ8OKI-B&25e5mIAu-u4r=n;zAB8K(2&;k#T zjXnbjkpR^*k*D5aY9^NFkdG}OxjHYl!%vV3K7=L80?d=IplgdF{(27S&|_={<}DE+ a{sEXU^|1{!eADyI`+1=TrpAf*+qs08|73is_Kr=pP z4d`(vMdPa?w5P{t*3GRwz}rZr?`0RsYa>pJzD$lDCpL5LQMU%+7+IS1{N|xkCAX2IzNHY? zmFx-f<PZw%DbeApkr7}zx=wSq{0`RG2i)dbypI&`y|1aqAkeoLlGCbSta?Kg?H zvgT&y3n`54tl7+)Su@&N2AZ!HmQx3TDaU9&YOPJ~