diff --git a/common/biomesoplenty/api/BlockReferences.java b/common/biomesoplenty/api/BlockReferences.java index 6b224463c..87b32eb84 100644 --- a/common/biomesoplenty/api/BlockReferences.java +++ b/common/biomesoplenty/api/BlockReferences.java @@ -69,6 +69,8 @@ public class BlockReferences { bamboo (Blocks.bamboo, 0), + cloverPatchItem (Blocks.foliage, 13), + koruItem (Blocks.foliage, 12), dryGrassItem (Blocks.foliage, 11), wheatGrassItem (Blocks.foliage, 10), shrubItem (Blocks.foliage, 9), diff --git a/common/biomesoplenty/biomes/BiomeDecoratorBOP.java b/common/biomesoplenty/biomes/BiomeDecoratorBOP.java index ed6290e01..b70990125 100644 --- a/common/biomesoplenty/biomes/BiomeDecoratorBOP.java +++ b/common/biomesoplenty/biomes/BiomeDecoratorBOP.java @@ -64,6 +64,7 @@ import biomesoplenty.worldgen.WorldGenCanyon; import biomesoplenty.worldgen.WorldGenCanyonGrass; import biomesoplenty.worldgen.WorldGenCattail; import biomesoplenty.worldgen.WorldGenCloud; +import biomesoplenty.worldgen.WorldGenCloverPatch; import biomesoplenty.worldgen.WorldGenCobwebs; import biomesoplenty.worldgen.WorldGenCoral; import biomesoplenty.worldgen.WorldGenCrystal1; @@ -241,6 +242,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator public WorldGenerator icyIrisGen; public WorldGenerator redwoodShrubGen; public WorldGenerator koruGen; + public WorldGenerator cloverPatchGen; public WorldGenerator waspHiveGen; public WorldGenerator rootGen; public WorldGenerator stalagmiteGen; @@ -344,6 +346,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator public int waterReedsPerChunk; public int redwoodShrubsPerChunk; public int koruPerChunk; + public int cloverPatchesPerChunk; public int waspHivesPerChunk; public int rootsPerChunk; public int stalagmitesPerChunk; @@ -559,6 +562,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator waterReedGen = new WorldGenWaterReeds(); redwoodShrubGen = new WorldGenRedwoodShrub(0,0); koruGen = new WorldGenTallGrass(Blocks.foliage.get().blockID, 12); + cloverPatchGen = new WorldGenCloverPatch(Blocks.foliage.get().blockID, 13); rootGen = new WorldGenBOPTallGrass(Blocks.plants.get().blockID, 15); stalagmiteGen = new WorldGenBOPTallGrass(Blocks.stoneFormations.get().blockID, 0); stalactiteGen = new WorldGenBOPTallGrass(Blocks.stoneFormations.get().blockID, 1); @@ -656,6 +660,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator waterReedsPerChunk = 0; redwoodShrubsPerChunk = 0; koruPerChunk = 0; + cloverPatchesPerChunk = 0; waspHivesPerChunk = 0; rootsPerChunk = 9; stalagmitesPerChunk = 3; @@ -1343,6 +1348,14 @@ public class BiomeDecoratorBOP extends BiomeDecorator koruGen.generate(currentWorld, randomGenerator, var3, var4, var5); } + for (var2 = 0; var2 < cloverPatchesPerChunk; ++var2) + { + var3 = chunk_X + randomGenerator.nextInt(16) + 8; + var4 = randomGenerator.nextInt(256); + var5 = chunk_Z + randomGenerator.nextInt(16) + 8; + cloverPatchGen.generate(currentWorld, randomGenerator, var3, var4, var5); + } + for (var2 = 0; var2 < rootsPerChunk; ++var2) { var3 = chunk_X + randomGenerator.nextInt(16) + 8; diff --git a/common/biomesoplenty/biomes/BiomeGenBambooForest.java b/common/biomesoplenty/biomes/BiomeGenBambooForest.java index 11c3f97ef..71238bd09 100644 --- a/common/biomesoplenty/biomes/BiomeGenBambooForest.java +++ b/common/biomesoplenty/biomes/BiomeGenBambooForest.java @@ -28,6 +28,7 @@ public class BiomeGenBambooForest extends BiomeGenBase implements IWCFog customBiomeDecorator.reedsBOPPerChunk = 6; customBiomeDecorator.wheatGrassPerChunk = 3; customBiomeDecorator.shrubsPerChunk = 6; + customBiomeDecorator.cloverPatchesPerChunk = 10; customBiomeDecorator.generatePumpkins = false; } diff --git a/common/biomesoplenty/biomes/BiomeGenBirchForest.java b/common/biomesoplenty/biomes/BiomeGenBirchForest.java index a113a4d2b..fce4ab453 100644 --- a/common/biomesoplenty/biomes/BiomeGenBirchForest.java +++ b/common/biomesoplenty/biomes/BiomeGenBirchForest.java @@ -26,6 +26,7 @@ public class BiomeGenBirchForest extends BiomeGenBase customBiomeDecorator.lilyOfTheValleysPerChunk = 15; customBiomeDecorator.wheatGrassPerChunk = 1; customBiomeDecorator.shrubsPerChunk = 1; + customBiomeDecorator.cloverPatchesPerChunk = 20; } /** diff --git a/common/biomesoplenty/biomes/BiomeGenCherryBlossomGrove.java b/common/biomesoplenty/biomes/BiomeGenCherryBlossomGrove.java index e0d3f82e7..c69d7d9f4 100644 --- a/common/biomesoplenty/biomes/BiomeGenCherryBlossomGrove.java +++ b/common/biomesoplenty/biomes/BiomeGenCherryBlossomGrove.java @@ -27,6 +27,7 @@ public class BiomeGenCherryBlossomGrove extends BiomeGenBase customBiomeDecorator.lilyflowersPerChunk = 9; customBiomeDecorator.wheatGrassPerChunk = 1; customBiomeDecorator.shrubsPerChunk = 2; + customBiomeDecorator.cloverPatchesPerChunk = 15; customBiomeDecorator.generatePumpkins = false; } diff --git a/common/biomesoplenty/biomes/BiomeGenConiferousForest.java b/common/biomesoplenty/biomes/BiomeGenConiferousForest.java index 9db1e4ce5..7be12f4a5 100644 --- a/common/biomesoplenty/biomes/BiomeGenConiferousForest.java +++ b/common/biomesoplenty/biomes/BiomeGenConiferousForest.java @@ -43,6 +43,7 @@ public class BiomeGenConiferousForest extends BiomeGenBase customBiomeDecorator.sandPerChunk2 = -999; customBiomeDecorator.gravelPerChunk = 1; customBiomeDecorator.gravelPerChunk2 = 1; + customBiomeDecorator.cloverPatchesPerChunk = 10; } /** diff --git a/common/biomesoplenty/biomes/BiomeGenFungiForest.java b/common/biomesoplenty/biomes/BiomeGenFungiForest.java index 47fdf54f3..6ae9de635 100644 --- a/common/biomesoplenty/biomes/BiomeGenFungiForest.java +++ b/common/biomesoplenty/biomes/BiomeGenFungiForest.java @@ -44,6 +44,7 @@ public class BiomeGenFungiForest extends BiomeGenBase implements IWCFog customBiomeDecorator.reedsBOPPerChunk = 1; customBiomeDecorator.wheatGrassPerChunk = 3; customBiomeDecorator.shrubsPerChunk = 1; + customBiomeDecorator.cloverPatchesPerChunk = 20; customBiomeDecorator.generateMycelium = true; customBiomeDecorator.generatePumpkins = true; waterColorMultiplier = 65326; diff --git a/common/biomesoplenty/biomes/BiomeGenGrove.java b/common/biomesoplenty/biomes/BiomeGenGrove.java index 486332087..1dd7203b4 100644 --- a/common/biomesoplenty/biomes/BiomeGenGrove.java +++ b/common/biomesoplenty/biomes/BiomeGenGrove.java @@ -31,6 +31,7 @@ public class BiomeGenGrove extends BiomeGenBase customBiomeDecorator.lilyflowersPerChunk = 3; customBiomeDecorator.berryBushesPerChunk = 2; customBiomeDecorator.shrubsPerChunk = 3; + customBiomeDecorator.cloverPatchesPerChunk = 20; customBiomeDecorator.generatePumpkins = false; } diff --git a/common/biomesoplenty/biomes/BiomeGenLushSwamp.java b/common/biomesoplenty/biomes/BiomeGenLushSwamp.java index 9d238ba13..40721c80d 100644 --- a/common/biomesoplenty/biomes/BiomeGenLushSwamp.java +++ b/common/biomesoplenty/biomes/BiomeGenLushSwamp.java @@ -36,6 +36,7 @@ public class BiomeGenLushSwamp extends BiomeGenBase customBiomeDecorator.shrubsPerChunk = 5; customBiomeDecorator.koruPerChunk = 1; customBiomeDecorator.waterReedsPerChunk = 6; + customBiomeDecorator.cloverPatchesPerChunk = 10; spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 1, 1, 1)); } diff --git a/common/biomesoplenty/biomes/BiomeGenMeadow.java b/common/biomesoplenty/biomes/BiomeGenMeadow.java index 08072d836..e5421e116 100644 --- a/common/biomesoplenty/biomes/BiomeGenMeadow.java +++ b/common/biomesoplenty/biomes/BiomeGenMeadow.java @@ -33,6 +33,7 @@ public class BiomeGenMeadow extends BiomeGenBase customBiomeDecorator.hydrangeasPerChunk = 3; customBiomeDecorator.sunflowersPerChunk = 1; customBiomeDecorator.shrubsPerChunk = 5; + customBiomeDecorator.cloverPatchesPerChunk = 15; customBiomeDecorator.generatePumpkins = false; spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6)); } diff --git a/common/biomesoplenty/biomes/BiomeGenMeadowForest.java b/common/biomesoplenty/biomes/BiomeGenMeadowForest.java index ae0d4cf80..64ef82caf 100644 --- a/common/biomesoplenty/biomes/BiomeGenMeadowForest.java +++ b/common/biomesoplenty/biomes/BiomeGenMeadowForest.java @@ -27,6 +27,7 @@ public class BiomeGenMeadowForest extends BiomeGenBase customBiomeDecorator.sandPerChunk = -999; customBiomeDecorator.sandPerChunk2 = -999; customBiomeDecorator.hydrangeasPerChunk = 3; + customBiomeDecorator.cloverPatchesPerChunk = 10; customBiomeDecorator.generatePumpkins = true; } diff --git a/common/biomesoplenty/biomes/BiomeGenMysticGrove.java b/common/biomesoplenty/biomes/BiomeGenMysticGrove.java index 921cfe989..dbc7f3697 100644 --- a/common/biomesoplenty/biomes/BiomeGenMysticGrove.java +++ b/common/biomesoplenty/biomes/BiomeGenMysticGrove.java @@ -50,6 +50,7 @@ public class BiomeGenMysticGrove extends BiomeGenBase implements IWCFog customBiomeDecorator.blueMilksPerChunk = 1; customBiomeDecorator.lilyflowersPerChunk = 3; customBiomeDecorator.poisonWaterPerChunk = 1; + customBiomeDecorator.cloverPatchesPerChunk = 10; waterColorMultiplier = 16715898; spawnableMonsterList.clear(); spawnableCreatureList.clear(); diff --git a/common/biomesoplenty/biomes/BiomeGenMysticGroveThin.java b/common/biomesoplenty/biomes/BiomeGenMysticGroveThin.java index 71b4572bc..d25b295f6 100644 --- a/common/biomesoplenty/biomes/BiomeGenMysticGroveThin.java +++ b/common/biomesoplenty/biomes/BiomeGenMysticGroveThin.java @@ -50,6 +50,7 @@ public class BiomeGenMysticGroveThin extends BiomeGenBase implements IWCFog customBiomeDecorator.blueMilksPerChunk = 1; customBiomeDecorator.lilyflowersPerChunk = 3; customBiomeDecorator.poisonWaterPerChunk = 1; + customBiomeDecorator.cloverPatchesPerChunk = 20; waterColorMultiplier = 16715898; spawnableMonsterList.clear(); spawnableCreatureList.clear(); diff --git a/common/biomesoplenty/biomes/BiomeGenOrchard.java b/common/biomesoplenty/biomes/BiomeGenOrchard.java index 7d5b0d1fb..074e4c51f 100644 --- a/common/biomesoplenty/biomes/BiomeGenOrchard.java +++ b/common/biomesoplenty/biomes/BiomeGenOrchard.java @@ -33,6 +33,7 @@ public class BiomeGenOrchard extends BiomeGenBase customBiomeDecorator.carrotsPerChunk = 1; customBiomeDecorator.shrubsPerChunk = 10; customBiomeDecorator.waterReedsPerChunk = 4; + customBiomeDecorator.cloverPatchesPerChunk = 15; spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6)); } diff --git a/common/biomesoplenty/biomes/BiomeGenRainforest.java b/common/biomesoplenty/biomes/BiomeGenRainforest.java index 0fafa4f0f..eb8f6df1f 100644 --- a/common/biomesoplenty/biomes/BiomeGenRainforest.java +++ b/common/biomesoplenty/biomes/BiomeGenRainforest.java @@ -33,6 +33,7 @@ public class BiomeGenRainforest extends BiomeGenBase customBiomeDecorator.wheatGrassPerChunk = 10; customBiomeDecorator.shrubsPerChunk = 5; customBiomeDecorator.generatePumpkins = false; + customBiomeDecorator.cloverPatchesPerChunk = 20; spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1)); spawnableMonsterList.add(new SpawnListEntry(EntityJungleSpider.class, 12, 6, 6)); } diff --git a/common/biomesoplenty/biomes/BiomeGenWetland.java b/common/biomesoplenty/biomes/BiomeGenWetland.java index 8e5a8e560..b507bd36a 100644 --- a/common/biomesoplenty/biomes/BiomeGenWetland.java +++ b/common/biomesoplenty/biomes/BiomeGenWetland.java @@ -48,6 +48,7 @@ public class BiomeGenWetland extends BiomeGenBase implements IWCFog customBiomeDecorator.shrubsPerChunk = 10; customBiomeDecorator.waterReedsPerChunk = 8; customBiomeDecorator.koruPerChunk = 1; + customBiomeDecorator.cloverPatchesPerChunk = 15; spawnableCreatureList.clear(); spawnableWaterCreatureList.clear(); spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3)); diff --git a/common/biomesoplenty/biomes/BiomeGenWoodland.java b/common/biomesoplenty/biomes/BiomeGenWoodland.java index ef8ef7903..5c7ee4392 100644 --- a/common/biomesoplenty/biomes/BiomeGenWoodland.java +++ b/common/biomesoplenty/biomes/BiomeGenWoodland.java @@ -24,6 +24,7 @@ public class BiomeGenWoodland extends BiomeGenBase customBiomeDecorator.toadstoolsPerChunk = 3; customBiomeDecorator.shrubsPerChunk = 20; customBiomeDecorator.waterReedsPerChunk = 2; + customBiomeDecorator.cloverPatchesPerChunk = 10; } @Override diff --git a/common/biomesoplenty/biomes/promisedland/BiomeGenPromisedLandShrub.java b/common/biomesoplenty/biomes/promisedland/BiomeGenPromisedLandShrub.java index 52f7ae471..f906ae8aa 100644 --- a/common/biomesoplenty/biomes/promisedland/BiomeGenPromisedLandShrub.java +++ b/common/biomesoplenty/biomes/promisedland/BiomeGenPromisedLandShrub.java @@ -27,9 +27,9 @@ public class BiomeGenPromisedLandShrub extends BiomeGenBase implements IWCFog customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator; topBlock = (byte)Blocks.holyGrass.get().blockID; fillerBlock = (byte)Blocks.holyDirt.get().blockID; - customBiomeDecorator.treesPerChunk = 50; + customBiomeDecorator.treesPerChunk = 40; customBiomeDecorator.grassPerChunk = -999; - customBiomeDecorator.holyTallGrassPerChunk = 10; + customBiomeDecorator.holyTallGrassPerChunk = 50; customBiomeDecorator.promisedWillowPerChunk = 80; customBiomeDecorator.rainbowflowersPerChunk = 5; customBiomeDecorator.generateLakes = false; diff --git a/common/biomesoplenty/blocks/BlockBOPFoliage.java b/common/biomesoplenty/blocks/BlockBOPFoliage.java index 91a01f6c6..cd18ea901 100644 --- a/common/biomesoplenty/blocks/BlockBOPFoliage.java +++ b/common/biomesoplenty/blocks/BlockBOPFoliage.java @@ -38,7 +38,7 @@ import cpw.mods.fml.relauncher.SideOnly; public class BlockBOPFoliage extends BlockFlower implements IShearable { - private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru"}; + private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch"}; private Icon[] textures; public Icon shrubBranch; @@ -281,6 +281,9 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable case 2: // Medium Grass return AxisAlignedBB.getBoundingBox(x + 0.1D, y, z + 0.1D, x + 0.9D, y + 0.6D, z + 0.9D); + + case 13: //Clover Patch + 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); @@ -320,6 +323,12 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable maxX = maxZ = 0.9F; maxY = 0.6F; break; + + case 13: + minX = minY = minZ = 0F; + maxX = maxZ = 1.0F; + maxY = 0.015625F; + break; default: minX = minZ = 0.1F; diff --git a/common/biomesoplenty/blocks/renderers/FoliageRenderer.java b/common/biomesoplenty/blocks/renderers/FoliageRenderer.java index 77d1336ca..ad2c372e0 100644 --- a/common/biomesoplenty/blocks/renderers/FoliageRenderer.java +++ b/common/biomesoplenty/blocks/renderers/FoliageRenderer.java @@ -27,10 +27,22 @@ public class FoliageRenderer implements ISimpleBlockRenderingHandler if (modelId == RenderUtils.foliageModel) { - if (meta == 0) - return renderBlockAlgae(renderer, block, x, y, z); + if (block == Blocks.foliage.get()) + { + if (meta == 0) + return renderBlockAlgae(renderer, block, x, y, z); + else if (meta == 13) + return renderBlockClover(renderer, block, x, y, z); + else + return renderCrossedSquares(block, x, y, z, renderer); + } else - return renderCrossedSquares(block, x, y, z, renderer); + { + if (meta == 0) + return renderBlockAlgae(renderer, block, x, y, z); + else + return renderCrossedSquares(block, x, y, z, renderer); + } } return true; } @@ -98,6 +110,58 @@ 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 renderBlockClover(RenderBlocks renderer, Block block, int x, int y, int z) + { + Tessellator tessellator = Tessellator.instance; + Icon icon = renderer.getBlockIconFromSideAndMetadata(block, 1, 13); + + if (renderer.hasOverrideBlockTexture()) + { + icon = renderer.overrideBlockTexture; + } + + float cf = 1.0F; + int cl = block.colorMultiplier(renderer.blockAccess, 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.1F; + 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); + tessellator.setBrightness(block.getMixedBrightnessForBlock(renderer.blockAccess, 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/common/biomesoplenty/configuration/BOPCrafting.java b/common/biomesoplenty/configuration/BOPCrafting.java index 390cc7293..8b0da2844 100644 --- a/common/biomesoplenty/configuration/BOPCrafting.java +++ b/common/biomesoplenty/configuration/BOPCrafting.java @@ -259,7 +259,7 @@ public class BOPCrafting { GameRegistry.addRecipe(new ItemStack(Items.dartBlower.get(), 1), new Object[] {"R R", "R R", "R R", Character.valueOf('R'), new ItemStack(Blocks.plants.get(), 1, 8)}); GameRegistry.addRecipe(new ItemStack(Items.dart.get(), 4, 0), new Object[] {"T", "R", "F", Character.valueOf('T'), new ItemStack(Blocks.plants.get(), 1, 5), Character.valueOf('R'), new ItemStack(Blocks.plants.get(), 1, 8), Character.valueOf('F'), Item.feather}); - GameRegistry.addRecipe(new ItemStack(Items.dart.get(), 1, 1), new Object[] {"P", "D", Character.valueOf('P'), new ItemStack(Items.miscItems.get(), 1, 3), Character.valueOf('D'), new ItemStack(Items.dart.get(), 1, 0)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.dart.get(), 1, 1), new Object[] {new ItemStack(Items.miscItems.get(), 1, 13), new ItemStack(Items.dart.get(), 1, 0)}); } @@ -287,7 +287,7 @@ public class BOPCrafting //Plants GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 2, 1), new Object[] {new ItemStack(Blocks.mushrooms.get(),1,0)}); - GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 1, 3), new Object[] {new ItemStack(Blocks.foliage.get(),1,7)}); + GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 1, 13), new Object[] {new ItemStack(Blocks.foliage.get(),1,7), new ItemStack(Items.miscItems.get(),1, 11)}); GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 1, 4), new Object[] {Item.bowlEmpty, new ItemStack(Items.food.get(), 1, 0), Item.appleRed, Item.melon}); GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 1, 5), new Object[] {Item.bowlEmpty, new ItemStack(Items.food.get(), 1, 2), Item.carrot, Item.potato}); GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 1, 6), new Object[] {Item.bowlEmpty, new ItemStack(Blocks.mushrooms.get(), 1, 0), new ItemStack(Blocks.mushrooms.get(), 1, 1), new ItemStack(Blocks.mushrooms.get(), 1, 2)}); diff --git a/common/biomesoplenty/itemblocks/ItemBlockFoliage.java b/common/biomesoplenty/itemblocks/ItemBlockFoliage.java index 663bf39ed..97cb21a3b 100644 --- a/common/biomesoplenty/itemblocks/ItemBlockFoliage.java +++ b/common/biomesoplenty/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"}; + private static final String[] foliageTypes = new String[] {"algae", "shortgrass", "mediumgrass", "highgrassbottom", "bush", "sprout", "highgrasstop", "poisonivy", "berrybush", "shrub", "wheatgrass", "dampgrass", "koru", "cloverpatch"}; @SideOnly(Side.CLIENT) private Icon[] textures; private static final int GRASSTOP = 6; diff --git a/common/biomesoplenty/items/ItemBOP.java b/common/biomesoplenty/items/ItemBOP.java index b53bd77ee..5095cc644 100644 --- a/common/biomesoplenty/items/ItemBOP.java +++ b/common/biomesoplenty/items/ItemBOP.java @@ -8,12 +8,13 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.Items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ItemBOP extends Item { - private static String[] items = {"mudbrick", "ash", "emptyhoneycomb", "poison", "crystalshard", "bluedye", "browndye", "greendye", "whitedye", "blackdye", "ghastlysoul"}; + private static String[] items = {"mudbrick", "ash", "emptyhoneycomb", "thing", "crystalshard", "bluedye", "browndye", "greendye", "whitedye", "blackdye", "ghastlysoul", "jarempty", "jarhoney", "jarpoison"}; @SideOnly(Side.CLIENT) private Icon[] textures; @@ -55,6 +56,25 @@ public class ItemBOP extends Item return textures[meta]; } + + @Override + public int getItemStackLimit(ItemStack par1ItemStack) + { + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 11) + { + return 1; + } + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 12) + { + return 1; + } + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 13) + { + return 1; + } + + return 64; + } @SuppressWarnings({ "rawtypes", "unchecked" }) @Override diff --git a/common/biomesoplenty/items/ItemBOPFood.java b/common/biomesoplenty/items/ItemBOPFood.java index 0a436b7ff..b6b25e7f7 100644 --- a/common/biomesoplenty/items/ItemBOPFood.java +++ b/common/biomesoplenty/items/ItemBOPFood.java @@ -5,6 +5,7 @@ import java.util.List; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumAction; import net.minecraft.item.Item; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; @@ -110,6 +111,62 @@ public class ItemBOPFood extends ItemFood return itemstack; } + /** + * returns the action that specifies what animation to play when the items is being used + */ + public EnumAction getItemUseAction(ItemStack par1ItemStack) + { + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 10) + { + return EnumAction.drink; + } + + return EnumAction.eat; + } + + @Override + public int getItemStackLimit(ItemStack par1ItemStack) + { + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 4) + { + return 1; + } + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 5) + { + return 1; + } + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 6) + { + return 1; + } + + return 64; + } + + /** + * How long it takes to use or consume an item + */ + @Override + public int getMaxItemUseDuration(ItemStack par1ItemStack) + { + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 0) + { + return 8; + } + + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 3) + { + return 12; + } + + if (par1ItemStack.itemID == this.itemID && par1ItemStack.getItemDamage() == 9) + { + return 16; + } + + return 32; + } + @Override protected void onFoodEaten(ItemStack itemstack, World world, EntityPlayer player) { diff --git a/common/biomesoplenty/worldgen/WorldGenCloud.java b/common/biomesoplenty/worldgen/WorldGenCloud.java index 824e83462..2d89897f9 100644 --- a/common/biomesoplenty/worldgen/WorldGenCloud.java +++ b/common/biomesoplenty/worldgen/WorldGenCloud.java @@ -12,7 +12,7 @@ public class WorldGenCloud extends WorldGenerator @Override public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) { - int var998 = par2Random.nextInt(7); + int var998 = par2Random.nextInt(10); if (var998 != 0) { diff --git a/common/biomesoplenty/worldgen/WorldGenCloverPatch.java b/common/biomesoplenty/worldgen/WorldGenCloverPatch.java new file mode 100644 index 000000000..50e41e7aa --- /dev/null +++ b/common/biomesoplenty/worldgen/WorldGenCloverPatch.java @@ -0,0 +1,40 @@ +package biomesoplenty.worldgen; + +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenerator; + +public class WorldGenCloverPatch extends WorldGenerator +{ + /** The ID of the plant block used in this plant generator. */ + private int plantBlockId; + private int plantBlockMeta; + + public WorldGenCloverPatch(int par1, int meta) + { + plantBlockId = par1; + plantBlockMeta = meta; + } + + @Override + public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) + { + for (int l = 0; l < 128; ++l) + { + int i1 = par3 + par2Random.nextInt(6) - par2Random.nextInt(6); + int j1 = par4; + int k1 = par5 + par2Random.nextInt(6) - par2Random.nextInt(6); + + if (par1World.isAirBlock(i1, j1, k1) && (!par1World.provider.hasNoSky || j1 < 127) && (par1World.getFullBlockLightValue(i1, j1, k1) >= 8 || par1World.canBlockSeeTheSky(i1, j1, k1)) + && Block.blocksList[plantBlockId].canPlaceBlockOnSide(par1World, i1, j1, k1, 1, new ItemStack(plantBlockId, 1, plantBlockMeta))) + { + par1World.setBlock(i1, j1, k1, plantBlockId, plantBlockMeta, 2); + } + } + + return true; + } +} diff --git a/resources/assets/biomesoplenty/lang/en_US.lang b/resources/assets/biomesoplenty/lang/en_US.lang index bb8a762a1..271ff4f21 100644 --- a/resources/assets/biomesoplenty/lang/en_US.lang +++ b/resources/assets/biomesoplenty/lang/en_US.lang @@ -76,6 +76,7 @@ tile.bop.foliage.shrub.name=Shrub tile.bop.foliage.wheatgrass.name=Wheat Grass tile.bop.foliage.dampgrass.name=Damp Grass tile.bop.foliage.koru.name=Koru +tile.bop.foliage.cloverpatch.name=Clover Patch tile.bop.petals.bigflowerred.name=Giant Red Flower tile.bop.petals.bigfloweryellow.name=Giant Yellow Flower @@ -307,7 +308,6 @@ item.bop.mudball.name=Mud Ball item.bop.miscItems.mudbrick.name=Mud Brick item.bop.miscItems.ash.name=Pile of Ashes -item.bop.miscItems.poison.name=Poison item.bop.miscItems.emptyhoneycomb.name=Empty Honeycomb item.bop.miscItems.crystalshard.name=Celestial Crystal Shard item.bop.miscItems.bluedye.name=Blue Dye @@ -316,6 +316,9 @@ item.bop.miscItems.greendye.name=Green Dye item.bop.miscItems.whitedye.name=White Dye item.bop.miscItems.blackdye.name=Black Dye item.bop.miscItems.ghastlysoul.name=Ghastly Soul +item.bop.miscItems.jarempty.name=Empty Jar +item.bop.miscItems.jarhoney.name=Honey Jar +item.bop.miscItems.jarpoison.name=Poison Extract Jar item.bop.gems.amethyst.name=Amethyst item.bop.gems.ruby.name=Ruby diff --git a/resources/assets/biomesoplenty/textures/blocks/cloverleaf.png b/resources/assets/biomesoplenty/textures/blocks/cloverleaf.png deleted file mode 100644 index 12777ae9c..000000000 Binary files a/resources/assets/biomesoplenty/textures/blocks/cloverleaf.png and /dev/null differ diff --git a/resources/assets/biomesoplenty/textures/blocks/cloverpatch.png b/resources/assets/biomesoplenty/textures/blocks/cloverpatch.png new file mode 100644 index 000000000..a8a5034f1 Binary files /dev/null and b/resources/assets/biomesoplenty/textures/blocks/cloverpatch.png differ diff --git a/resources/assets/biomesoplenty/textures/items/jarempty.png b/resources/assets/biomesoplenty/textures/items/jarempty.png new file mode 100644 index 000000000..42e1a9c14 Binary files /dev/null and b/resources/assets/biomesoplenty/textures/items/jarempty.png differ diff --git a/resources/assets/biomesoplenty/textures/items/jarhoney.png b/resources/assets/biomesoplenty/textures/items/jarhoney.png new file mode 100644 index 000000000..4e595caf9 Binary files /dev/null and b/resources/assets/biomesoplenty/textures/items/jarhoney.png differ diff --git a/resources/assets/biomesoplenty/textures/items/jarpoison.png b/resources/assets/biomesoplenty/textures/items/jarpoison.png new file mode 100644 index 000000000..0256ff6e0 Binary files /dev/null and b/resources/assets/biomesoplenty/textures/items/jarpoison.png differ