diff --git a/src/main/java/biomesoplenty/client/render/blocks/FoliageRenderer.java b/src/main/java/biomesoplenty/client/render/blocks/FoliageRenderer.java index 304284a87..65ea8009d 100644 --- a/src/main/java/biomesoplenty/client/render/blocks/FoliageRenderer.java +++ b/src/main/java/biomesoplenty/client/render/blocks/FoliageRenderer.java @@ -32,6 +32,10 @@ public class FoliageRenderer implements ISimpleBlockRenderingHandler return renderBlockAlgae(renderer, block, x, y, z); else if (meta == 13) return renderBlockClover(renderer, block, x, y, z); + else if (meta == 14) + return renderBlockLeafPile(renderer, block, x, y, z); + else if (meta == 15) + return renderBlockDeadLeafPile(renderer, block, x, y, z); else return renderCrossedSquares(block, x, y, z, renderer); } @@ -175,6 +179,128 @@ public class FoliageRenderer implements ISimpleBlockRenderingHandler tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1); return true; } + + public boolean renderBlockLeafPile(RenderBlocks renderer, Block block, int x, int y, int z) + { + Tessellator tessellator = Tessellator.instance; + //TODO: blockAccess + IBlockAccess world = renderer.blockAccess; + //TODO: getBlockIconFromSide() + IIcon icon = renderer.getBlockIconFromSideAndMetadata(block, 1, 14); + + //Need to make public: overrideBlockTexture + + //TODO: hasOverrideBlockTexture() + if (renderer.hasOverrideBlockTexture()) + { + //TODO: overrideBlockTexture + icon = renderer.overrideBlockTexture; + } + + float cf = 1.0F; + //TODO: colorMUltiplier() + int cl = block.colorMultiplier(world, x, y, z); + float c1 = (cl >> 16 & 255) / 255.0F; + float c2 = (cl >> 8 & 255) / 255.0F; + float c3 = (cl & 255) / 255.0F; + + if (EntityRenderer.anaglyphEnable) + { + float f4 = (c1 * 30.0F + c2 * 59.0F + c3 * 11.0F) / 100.0F; + float f5 = (c1 * 30.0F + c2 * 70.0F) / 100.0F; + float f6 = (c1 * 30.0F + c3 * 70.0F) / 100.0F; + c1 = f4; + c2 = f5; + c3 = f6; + } + + tessellator.setColorOpaque_F(cf * c1, cf * c2, cf * c3); + + float f = 0.05F; + double d0 = (double)icon.getMinU(); + double d1 = (double)icon.getMinV(); + double d2 = (double)icon.getMaxU(); + double d3 = (double)icon.getMaxV(); + long l = (long)(x * 3129871) ^ (long)z * 116129781L ^ (long)y; + l = l * l * 42317861L + l * 11L; + int i1 = (int)(l >> 16 & 3L); + //TODO: getMixedBrightnessForBlock() + tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + float f1 = (float)x + 0.5F; + float f2 = (float)z + 0.5F; + float f3 = (float)(i1 & 1) * 0.5F * (float)(1 - i1 / 2 % 2 * 2); + float f4 = (float)(i1 + 1 & 1) * 0.5F * (float)(1 - (i1 + 1) / 2 % 2 * 2); + tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1); + tessellator.addVertexWithUV((double)(f1 + f3 + f4), (double)((float)y + f), (double)(f2 - f3 + f4), d2, d1); + tessellator.addVertexWithUV((double)(f1 - f3 + f4), (double)((float)y + f), (double)(f2 - f3 - f4), d2, d3); + tessellator.addVertexWithUV((double)(f1 - f3 - f4), (double)((float)y + f), (double)(f2 + f3 - f4), d0, d3); + tessellator.addVertexWithUV((double)(f1 - f3 - f4), (double)((float)y + f), (double)(f2 + f3 - f4), d0, d3); + tessellator.addVertexWithUV((double)(f1 - f3 + f4), (double)((float)y + f), (double)(f2 - f3 - f4), d2, d3); + tessellator.addVertexWithUV((double)(f1 + f3 + f4), (double)((float)y + f), (double)(f2 - f3 + f4), d2, d1); + tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1); + return true; + } + + public boolean renderBlockDeadLeafPile(RenderBlocks renderer, Block block, int x, int y, int z) + { + Tessellator tessellator = Tessellator.instance; + //TODO: blockAccess + IBlockAccess world = renderer.blockAccess; + //TODO: getBlockIconFromSide() + IIcon icon = renderer.getBlockIconFromSideAndMetadata(block, 1, 15); + + //Need to make public: overrideBlockTexture + + //TODO: hasOverrideBlockTexture() + if (renderer.hasOverrideBlockTexture()) + { + //TODO: overrideBlockTexture + icon = renderer.overrideBlockTexture; + } + + float cf = 1.0F; + //TODO: colorMUltiplier() + int cl = block.colorMultiplier(world, x, y, z); + float c1 = (cl >> 16 & 255) / 255.0F; + float c2 = (cl >> 8 & 255) / 255.0F; + float c3 = (cl & 255) / 255.0F; + + if (EntityRenderer.anaglyphEnable) + { + float f4 = (c1 * 30.0F + c2 * 59.0F + c3 * 11.0F) / 100.0F; + float f5 = (c1 * 30.0F + c2 * 70.0F) / 100.0F; + float f6 = (c1 * 30.0F + c3 * 70.0F) / 100.0F; + c1 = f4; + c2 = f5; + c3 = f6; + } + + tessellator.setColorOpaque_F(cf * c1, cf * c2, cf * c3); + + float f = 0.05F; + double d0 = (double)icon.getMinU(); + double d1 = (double)icon.getMinV(); + double d2 = (double)icon.getMaxU(); + double d3 = (double)icon.getMaxV(); + long l = (long)(x * 3129871) ^ (long)z * 116129781L ^ (long)y; + l = l * l * 42317861L + l * 11L; + int i1 = (int)(l >> 16 & 3L); + //TODO: getMixedBrightnessForBlock() + tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + float f1 = (float)x + 0.5F; + float f2 = (float)z + 0.5F; + float f3 = (float)(i1 & 1) * 0.5F * (float)(1 - i1 / 2 % 2 * 2); + float f4 = (float)(i1 + 1 & 1) * 0.5F * (float)(1 - (i1 + 1) / 2 % 2 * 2); + tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1); + tessellator.addVertexWithUV((double)(f1 + f3 + f4), (double)((float)y + f), (double)(f2 - f3 + f4), d2, d1); + tessellator.addVertexWithUV((double)(f1 - f3 + f4), (double)((float)y + f), (double)(f2 - f3 - f4), d2, d3); + tessellator.addVertexWithUV((double)(f1 - f3 - f4), (double)((float)y + f), (double)(f2 + f3 - f4), d0, d3); + tessellator.addVertexWithUV((double)(f1 - f3 - f4), (double)((float)y + f), (double)(f2 + f3 - f4), d0, d3); + tessellator.addVertexWithUV((double)(f1 - f3 + f4), (double)((float)y + f), (double)(f2 - f3 - f4), d2, d3); + tessellator.addVertexWithUV((double)(f1 + f3 + f4), (double)((float)y + f), (double)(f2 - f3 + f4), d2, d1); + tessellator.addVertexWithUV((double)(f1 + f3 - f4), (double)((float)y + f), (double)(f2 + f3 + f4), d0, d1); + return true; + } private boolean renderCrossedSquares(Block par1Block, int par2, int par3, int par4, RenderBlocks renderer) { diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenBambooForest.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenBambooForest.java index 4784a568f..0696eec97 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenBambooForest.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenBambooForest.java @@ -34,6 +34,7 @@ public class BiomeGenBambooForest extends BOPBiome this.bopWorldFeatures.riverCanePerChunk = 6; this.bopWorldFeatures.shrubsPerChunk = 6; this.bopWorldFeatures.bushesPerChunk = 5; + this.bopWorldFeatures.leafPilesPerChunk = 15; this.bopWorldFeatures.generatePumpkins = false; } diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenBayou.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenBayou.java index 9f07dd092..c96c7fd62 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenBayou.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenBayou.java @@ -20,7 +20,7 @@ import biomesoplenty.common.world.features.trees.WorldGenBayou3; public class BiomeGenBayou extends BOPBiome { - private static final Height biomeHeight = new Height(0.0F, 0.1F); + private static final Height biomeHeight = new Height(-0.1F, 0.1F); public BiomeGenBayou(int id) { diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenBog.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenBog.java index d19a6eaf7..087882fba 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenBog.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenBog.java @@ -49,6 +49,8 @@ public class BiomeGenBog extends BOPBiome this.bopWorldFeatures.waterReedsPerChunk = 8; this.bopWorldFeatures.koruPerChunk = 1; this.bopWorldFeatures.shrubsPerChunk = 10; + this.bopWorldFeatures.leafPilesPerChunk = 15; + this.bopWorldFeatures.deadLeafPilesPerChunk = 8; this.bopWorldFeatures.generatePumpkins = false; } diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenBorealForest.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenBorealForest.java index 43892c0cf..3bfd33c4c 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenBorealForest.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenBorealForest.java @@ -39,6 +39,7 @@ public class BiomeGenBorealForest extends BOPBiome this.bopWorldFeatures.bopFlowersPerChunk = 5; this.bopWorldFeatures.shrubsPerChunk = 10; this.bopWorldFeatures.waterReedsPerChunk = 4; + this.bopWorldFeatures.deadLeafPilesPerChunk = 10; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenChaparral.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenChaparral.java index 1c0fac3d3..21579a202 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenChaparral.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenChaparral.java @@ -46,6 +46,7 @@ public class BiomeGenChaparral extends BOPBiome this.bopWorldFeatures.wildCarrotsPerChunk = 1; this.bopWorldFeatures.shrubsPerChunk = 10; this.bopWorldFeatures.waterReedsPerChunk = 2; + this.bopWorldFeatures.leafPilesPerChunk = 10; this.bopWorldFeatures.generatePumpkins = false; } diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenCherryBlossomGrove.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenCherryBlossomGrove.java index 7d70cda51..d938fc44c 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenCherryBlossomGrove.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenCherryBlossomGrove.java @@ -36,6 +36,7 @@ public class BiomeGenCherryBlossomGrove extends BOPBiome this.bopWorldFeatures.bopFlowersPerChunk = 10; this.bopWorldFeatures.shrubsPerChunk = 2; this.bopWorldFeatures.cloverPatchesPerChunk = 15; + this.bopWorldFeatures.leafPilesPerChunk = 15; this.bopWorldFeatures.generatePumpkins = false; } diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenDeadForest.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenDeadForest.java index 7f706191c..a0d25a4ea 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenDeadForest.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenDeadForest.java @@ -36,6 +36,7 @@ public class BiomeGenDeadForest extends BOPBiome this.bopWorldFeatures.shrubsPerChunk = 2; this.bopWorldFeatures.thornsPerChunk = 2; this.bopWorldFeatures.waterReedsPerChunk = 2; + this.bopWorldFeatures.deadLeafPilesPerChunk = 20; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenDeciduousForest.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenDeciduousForest.java index fa266429f..fb5cdb747 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenDeciduousForest.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenDeciduousForest.java @@ -38,6 +38,8 @@ public class BiomeGenDeciduousForest extends BOPBiome this.bopWorldFeatures.poisonIvyPerChunk = 1; this.bopWorldFeatures.shrubsPerChunk = 10; this.bopWorldFeatures.waterReedsPerChunk = 2; + this.bopWorldFeatures.leafPilesPerChunk = 10; + this.bopWorldFeatures.deadLeafPilesPerChunk = 10; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenFen.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenFen.java index 816fc5bda..7b3bc76eb 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenFen.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenFen.java @@ -52,6 +52,7 @@ public class BiomeGenFen extends BOPBiome this.bopWorldFeatures.waterReedsPerChunk = 10; this.bopWorldFeatures.koruPerChunk = 1; this.bopWorldFeatures.shrubsPerChunk = 7; + this.bopWorldFeatures.deadLeafPilesPerChunk = 10; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenHeathland.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenHeathland.java index b82345d24..6d34842d3 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenHeathland.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenHeathland.java @@ -41,6 +41,7 @@ public class BiomeGenHeathland extends BOPBiome this.bopWorldFeatures.bopFlowersPerChunk = 20; this.bopWorldFeatures.berryBushesPerChunk = 1; this.bopWorldFeatures.shrubsPerChunk = 5; + this.bopWorldFeatures.leafPilesPerChunk = 10; this.bopWorldFeatures.generatePumpkins = false; } diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenMapleWoods.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenMapleWoods.java index 97e1dd61c..35125c3ed 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenMapleWoods.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenMapleWoods.java @@ -34,6 +34,7 @@ public class BiomeGenMapleWoods extends BOPBiome this.bopWorldFeatures.bopFlowersPerChunk = 2; this.bopWorldFeatures.poisonIvyPerChunk = 1; this.bopWorldFeatures.shrubsPerChunk = 2; + this.bopWorldFeatures.deadLeafPilesPerChunk = 8; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenMountain.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenMountain.java index 27123035d..e9961b874 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenMountain.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenMountain.java @@ -31,6 +31,8 @@ public class BiomeGenMountain extends BOPBiome this.bopWorldFeatures.berryBushesPerChunk = 3; this.bopWorldFeatures.shrubsPerChunk = 10; this.bopWorldFeatures.waterReedsPerChunk = 4; + this.bopWorldFeatures.leafPilesPerChunk = 10; + this.bopWorldFeatures.deadLeafPilesPerChunk = 10; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenPrairie.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenPrairie.java index 8fc3c8253..222281fb5 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenPrairie.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenPrairie.java @@ -38,6 +38,7 @@ public class BiomeGenPrairie extends BOPBiome this.bopWorldFeatures.berryBushesPerChunk = 2; this.bopWorldFeatures.shrubsPerChunk = 3; this.bopWorldFeatures.waterReedsPerChunk = 4; + this.bopWorldFeatures.leafPilesPerChunk = 15; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenRainforest.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenRainforest.java index d343682cc..ef71e1f38 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenRainforest.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenRainforest.java @@ -41,6 +41,7 @@ public class BiomeGenRainforest extends BOPBiome this.bopWorldFeatures.bopFlowersPerChunk = 25; this.bopWorldFeatures.shrubsPerChunk = 5; this.bopWorldFeatures.cloverPatchesPerChunk = 20; + this.bopWorldFeatures.leafPilesPerChunk = 10; this.bopWorldFeatures.generatePumpkins = false; /*TODO: FEATURE customBiomeDecorator.pinkFlowersPerChunk = 2; diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenRedwoodForest.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenRedwoodForest.java index 3bdc94607..5aeb81d73 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenRedwoodForest.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenRedwoodForest.java @@ -38,6 +38,7 @@ public class BiomeGenRedwoodForest extends BOPBiome this.bopWorldFeatures.berryBushesPerChunk = 1; this.bopWorldFeatures.shrubsPerChunk = 10; this.bopWorldFeatures.waterReedsPerChunk = 2; + this.bopWorldFeatures.leafPilesPerChunk = 15; this.bopWorldFeatures.generatePumpkins = false; } diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenSeasonalForest.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenSeasonalForest.java index 514b493c1..c25557a2f 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenSeasonalForest.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenSeasonalForest.java @@ -37,6 +37,8 @@ public class BiomeGenSeasonalForest extends BOPBiome this.bopWorldFeatures.toadstoolsPerChunk = 4; this.bopWorldFeatures.shrubsPerChunk = 15; this.bopWorldFeatures.waterReedsPerChunk = 4; + this.bopWorldFeatures.leafPilesPerChunk = 8; + this.bopWorldFeatures.deadLeafPilesPerChunk = 15; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenShield.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenShield.java index edf3be0b2..e08728910 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenShield.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenShield.java @@ -36,6 +36,7 @@ public class BiomeGenShield extends BOPBiome this.bopWorldFeatures.shrubsPerChunk = 4; this.bopWorldFeatures.waterReedsPerChunk = 4; + this.bopWorldFeatures.leafPilesPerChunk = 10; this.bopWorldFeatures.generateStoneInGrass2 = true; } diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenSilkglades.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenSilkglades.java index f96c8a95b..67091b6cc 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenSilkglades.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenSilkglades.java @@ -51,6 +51,7 @@ public class BiomeGenSilkglades extends BOPBiome this.bopWorldFeatures.koruPerChunk = 1; this.bopWorldFeatures.generatePumpkins = true; this.bopWorldFeatures.cobwebNestsPerChunk = 2; + this.bopWorldFeatures.deadLeafPilesPerChunk = 15; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenSludgepit.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenSludgepit.java index f53360533..0cdfe8587 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenSludgepit.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenSludgepit.java @@ -49,6 +49,8 @@ public class BiomeGenSludgepit extends BOPBiome //TODO: FEATURE customBiomeDecorator.poisonWaterPerChunk = 5; this.bopWorldFeatures.waterReedsPerChunk = 6; this.bopWorldFeatures.koruPerChunk = 1; + this.bopWorldFeatures.leafPilesPerChunk = 5; + this.bopWorldFeatures.deadLeafPilesPerChunk = 5; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenTemperateRainforest.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenTemperateRainforest.java index fc2008ad0..b1291c631 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenTemperateRainforest.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenTemperateRainforest.java @@ -44,6 +44,7 @@ public class BiomeGenTemperateRainforest extends BOPBiome this.bopWorldFeatures.wildCarrotsPerChunk = 1; this.bopWorldFeatures.shrubsPerChunk = 10; this.bopWorldFeatures.waterReedsPerChunk = 2; + this.bopWorldFeatures.leafPilesPerChunk = 15; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenThicket.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenThicket.java index 882d7011f..2e69af539 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenThicket.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenThicket.java @@ -31,6 +31,8 @@ public class BiomeGenThicket extends BOPBiome this.bopWorldFeatures.bopFlowersPerChunk = 5; this.bopWorldFeatures.thornsPerChunk = 55; this.bopWorldFeatures.shrubsPerChunk = 5; + this.bopWorldFeatures.leafPilesPerChunk = 10; + this.bopWorldFeatures.deadLeafPilesPerChunk = 5; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenTimber.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenTimber.java index 15cb78621..e46f83a1a 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenTimber.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenTimber.java @@ -36,6 +36,8 @@ public class BiomeGenTimber extends BOPBiome this.bopWorldFeatures.toadstoolsPerChunk = 2; this.bopWorldFeatures.waterReedsPerChunk = 4; this.bopWorldFeatures.shrubsPerChunk = 10; + this.bopWorldFeatures.leafPilesPerChunk = 5; + this.bopWorldFeatures.deadLeafPilesPerChunk = 12; } diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenTropicalRainforest.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenTropicalRainforest.java index 5a8d7710c..bc242f23f 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenTropicalRainforest.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenTropicalRainforest.java @@ -49,6 +49,7 @@ public class BiomeGenTropicalRainforest extends BOPBiome this.bopWorldFeatures.generateQuicksand = true; this.bopWorldFeatures.poisonIvyPerChunk = 4; this.bopWorldFeatures.shrubsPerChunk = 15; + this.bopWorldFeatures.leafPilesPerChunk = 10; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenTropics.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenTropics.java index 69e602ac3..899dbf87d 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenTropics.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenTropics.java @@ -44,6 +44,7 @@ public class BiomeGenTropics extends BOPBiome this.bopWorldFeatures.bopFlowersPerChunk = 30; this.bopWorldFeatures.shrubsPerChunk = 4; + this.bopWorldFeatures.leafPilesPerChunk = 10; this.bopWorldFeatures.generatePumpkins = false; } diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenWetland.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenWetland.java index 03ada70dc..3c68c9a79 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenWetland.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenWetland.java @@ -61,6 +61,7 @@ public class BiomeGenWetland extends BOPBiome this.bopWorldFeatures.waterReedsPerChunk = 8; this.bopWorldFeatures.koruPerChunk = 1; this.bopWorldFeatures.cloverPatchesPerChunk = 15; + this.bopWorldFeatures.leafPilesPerChunk = 10; } @Override diff --git a/src/main/java/biomesoplenty/common/biomes/BiomeGenWoodland.java b/src/main/java/biomesoplenty/common/biomes/BiomeGenWoodland.java index 4686a3c0b..163711a34 100644 --- a/src/main/java/biomesoplenty/common/biomes/BiomeGenWoodland.java +++ b/src/main/java/biomesoplenty/common/biomes/BiomeGenWoodland.java @@ -36,6 +36,8 @@ public class BiomeGenWoodland extends BOPBiome this.bopWorldFeatures.shrubsPerChunk = 20; this.bopWorldFeatures.waterReedsPerChunk = 2; this.bopWorldFeatures.cloverPatchesPerChunk = 10; + this.bopWorldFeatures.leafPilesPerChunk = 10; + this.bopWorldFeatures.deadLeafPilesPerChunk = 10; this.bopWorldFeatures.logsPerChunk = 10; } diff --git a/src/main/java/biomesoplenty/common/blocks/BlockBOPCoral.java b/src/main/java/biomesoplenty/common/blocks/BlockBOPCoral.java index 6ead05203..3c3cc7946 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockBOPCoral.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockBOPCoral.java @@ -13,6 +13,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; import biomesoplenty.BiomesOPlenty; import biomesoplenty.common.blocks.templates.BOPBlockWorldDecor; import cpw.mods.fml.relauncher.Side; diff --git a/src/main/java/biomesoplenty/common/blocks/BlockBOPFoliage.java b/src/main/java/biomesoplenty/common/blocks/BlockBOPFoliage.java index 44153aa6f..81b33eaaf 100644 --- a/src/main/java/biomesoplenty/common/blocks/BlockBOPFoliage.java +++ b/src/main/java/biomesoplenty/common/blocks/BlockBOPFoliage.java @@ -6,6 +6,7 @@ import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockTallGrass; +import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; @@ -38,7 +39,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPFoliage extends BlockTallGrass implements IShearable { - private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch"}; + private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch", "leafpile", "deadleafpile"}; private IIcon[] textures; public IIcon shrubBranch; @@ -158,6 +159,7 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable { //TODO: getBlock() Block block = world.getBlock(x, y - 1, z); + boolean solid = block.isOpaqueCube(); if (block == Blocks.air) return false; @@ -312,16 +314,18 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable } @Override - //TODO: colorMultiplier() public int colorMultiplier(IBlockAccess world, int x, int y, int z) { - if (world.getBlockMetadata(x, y, z) == 9) + if (world.getBlockMetadata(x, y, z) == 9 || world.getBlockMetadata(x, y, z) == 14) { - //TODO: getBiomeFoliageColor() return world.getBiomeGenForCoords(x, z).getBiomeFoliageColor(x, y, z); } - - //TODO: getBiomeGrassColor() + + if (world.getBlockMetadata(x, y, z) == 15) + { + return 16777215; + } + return world.getBiomeGenForCoords(x, z).getBiomeGrassColor(x, y, z); } @@ -362,6 +366,12 @@ public class BlockBOPFoliage extends BlockTallGrass implements IShearable case 13: //Clover Patch return AxisAlignedBB.getBoundingBox(x, y, z, x + 1.0D, y + 0.015625D, z + 1.0D); + + case 14: //Leaf Pile + return AxisAlignedBB.getBoundingBox(x, y, z, x + 1.0D, y + 0.015625D, z + 1.0D); + + case 15: //Dead Leaf Pile + return AxisAlignedBB.getBoundingBox(x, y, z, x + 1.0D, y + 0.015625D, z + 1.0D); default: return AxisAlignedBB.getBoundingBox(x + 0.1D, y, z + 0.1D, x + 0.9D, y + 0.8D, z + 0.9D); diff --git a/src/main/java/biomesoplenty/common/itemblocks/ItemBlockFoliage.java b/src/main/java/biomesoplenty/common/itemblocks/ItemBlockFoliage.java index e6dab10f1..e9e6066ec 100644 --- a/src/main/java/biomesoplenty/common/itemblocks/ItemBlockFoliage.java +++ b/src/main/java/biomesoplenty/common/itemblocks/ItemBlockFoliage.java @@ -17,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class ItemBlockFoliage extends ItemColored { - private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch"}; + private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch", "leafpile", "deadleafpile"}; @SideOnly(Side.CLIENT) private IIcon[] textures; private static final int GRASSTOP = 6; @@ -43,13 +43,14 @@ public class ItemBlockFoliage extends ItemColored textures[3] = iconRegister.registerIcon("biomesoplenty:item_highgrass"); textures[8] = iconRegister.registerIcon("biomesoplenty:item_berrybush"); textures[9] = iconRegister.registerIcon("biomesoplenty:item_shrub"); + textures[15] = iconRegister.registerIcon("biomesoplenty:deadleafpile"); } @Override @SideOnly(Side.CLIENT) public int getColorFromItemStack(ItemStack itemStack, int par2) { - if (itemStack.getItemDamage() == 3 || itemStack.getItemDamage() == 8 || itemStack.getItemDamage() == 9) + if (itemStack.getItemDamage() == 3 || itemStack.getItemDamage() == 8 || itemStack.getItemDamage() == 9 || itemStack.getItemDamage() == 15) return 16777215; else //TODO: getRenderColor() diff --git a/src/main/java/biomesoplenty/common/world/decoration/BOPWorldFeatures.java b/src/main/java/biomesoplenty/common/world/decoration/BOPWorldFeatures.java index 06d473776..64db36cf4 100644 --- a/src/main/java/biomesoplenty/common/world/decoration/BOPWorldFeatures.java +++ b/src/main/java/biomesoplenty/common/world/decoration/BOPWorldFeatures.java @@ -24,6 +24,8 @@ public class BOPWorldFeatures public int shrubsPerChunk = 0; public int bushesPerChunk = 0; public int cloverPatchesPerChunk = 0; + public int leafPilesPerChunk = 0; + public int deadLeafPilesPerChunk = 0; public int lavenderPerChunk = 0; public int thornsPerChunk = 0; public int stalagmitesPerChunk = 3; diff --git a/src/main/java/biomesoplenty/common/world/generation/WorldGenFieldAssociation.java b/src/main/java/biomesoplenty/common/world/generation/WorldGenFieldAssociation.java index 7f6aebe47..9ce288efe 100644 --- a/src/main/java/biomesoplenty/common/world/generation/WorldGenFieldAssociation.java +++ b/src/main/java/biomesoplenty/common/world/generation/WorldGenFieldAssociation.java @@ -58,6 +58,8 @@ public class WorldGenFieldAssociation associateField("shrubsPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 9)); associateField("bushesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 4)); associateField("cloverPatchesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 13, 128)); + associateField("leafPilesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 14, 256)); + associateField("deadLeafPilesPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("foliage"), 15, 256)); associateField("lavenderPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("flowers2"), 3)); associateField("thornsPerChunk", new WorldGenBOPFlora(BOPBlockHelper.get("plants"), 5)); associateField("stalagmitesPerChunk", new WorldGenBOPTallGrass(BOPBlockHelper.get("stoneFormations"), 0)); diff --git a/src/main/resources/assets/biomesoplenty/lang/en_US.lang b/src/main/resources/assets/biomesoplenty/lang/en_US.lang index da419f6b8..f702441f7 100644 --- a/src/main/resources/assets/biomesoplenty/lang/en_US.lang +++ b/src/main/resources/assets/biomesoplenty/lang/en_US.lang @@ -77,6 +77,8 @@ tile.foliage.wheatgrass.name=Wheat Grass tile.foliage.dampgrass.name=Damp Grass tile.foliage.koru.name=Koru tile.foliage.cloverpatch.name=Clover Patch +tile.foliage.leafpile.name=Leaf Pile +tile.foliage.deadleafpile.name=Dead Leaf Pile tile.petals.bigflowerred.name=Giant Red Flower tile.petals.bigfloweryellow.name=Giant Yellow Flower diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/deadleafpile.png b/src/main/resources/assets/biomesoplenty/textures/blocks/deadleafpile.png new file mode 100644 index 000000000..fa89b2cbe Binary files /dev/null and b/src/main/resources/assets/biomesoplenty/textures/blocks/deadleafpile.png differ diff --git a/src/main/resources/assets/biomesoplenty/textures/blocks/leafpile.png b/src/main/resources/assets/biomesoplenty/textures/blocks/leafpile.png new file mode 100644 index 000000000..aaffbabc5 Binary files /dev/null and b/src/main/resources/assets/biomesoplenty/textures/blocks/leafpile.png differ