This commit is contained in:
Adubbz 2013-11-07 06:08:56 +11:00
commit 56f8fe1ebf
10 changed files with 33 additions and 3 deletions

View File

@ -173,6 +173,7 @@ public class BlockReferences {
tinyCactus (Blocks.plants, 12),
witherwart (Blocks.plants, 13),
reed (Blocks.plants, 14),
root (Blocks.plants, 15),
treeMoss (Blocks.treeMoss, 0),
moss (Blocks.moss, 0),

View File

@ -52,6 +52,7 @@ import biomesoplenty.worldgen.WorldGenBOPBush;
import biomesoplenty.worldgen.WorldGenBOPDarkFlowers;
import biomesoplenty.worldgen.WorldGenBOPFlowers;
import biomesoplenty.worldgen.WorldGenBOPPumpkin;
import biomesoplenty.worldgen.WorldGenBOPTallGrass;
import biomesoplenty.worldgen.WorldGenBadlands;
import biomesoplenty.worldgen.WorldGenBadlands2;
import biomesoplenty.worldgen.WorldGenBadlands3;
@ -241,6 +242,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
public WorldGenerator redwoodShrubGen;
public WorldGenerator koruGen;
public WorldGenerator waspHiveGen;
public WorldGenerator rootGen;
public WorldGenerator boneSpineGen;
public WorldGenerator boneSpine2Gen;
@ -341,6 +343,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
public int redwoodShrubsPerChunk;
public int koruPerChunk;
public int waspHivesPerChunk;
public int rootsPerChunk;
public int boneSpinesPerChunk;
public int boneSpines2PerChunk;
@ -551,6 +554,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
waterReedGen = new WorldGenWaterReeds();
redwoodShrubGen = new WorldGenRedwoodShrub(0,0);
koruGen = new WorldGenTallGrass(Blocks.foliage.get().blockID, 12);
rootGen = new WorldGenBOPTallGrass(Blocks.plants.get().blockID, 15);
pitGen = new WorldGenPit(Blocks.ash.get().blockID);
waterlilyPerChunk = 0;
lilyflowersPerChunk = 0;
@ -646,6 +650,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
redwoodShrubsPerChunk = 0;
koruPerChunk = 0;
waspHivesPerChunk = 0;
rootsPerChunk = 7;
generateLakes = true;
generateAsh = false;
generateMycelium = false;
@ -1328,6 +1333,14 @@ public class BiomeDecoratorBOP extends BiomeDecorator
koruGen.generate(currentWorld, randomGenerator, var3, var4, var5);
}
for (var2 = 0; var2 < rootsPerChunk; ++var2)
{
var3 = chunk_X + randomGenerator.nextInt(16) + 8;
var4 = randomGenerator.nextInt(256);
var5 = chunk_Z + randomGenerator.nextInt(16) + 8;
rootGen.generate(currentWorld, randomGenerator, var3, var4, var5);
}
for (var2 = 0; var2 < waspHivesPerChunk; ++var2)
{
int var420 = randomGenerator.nextInt(4);

View File

@ -25,6 +25,7 @@ public class BiomeGenOriginValley extends BiomeGenBase
customBiomeDecorator.sandPerChunk = 0;
customBiomeDecorator.sandPerChunk2 = 0;
customBiomeDecorator.clayPerChunk = 0;
customBiomeDecorator.rootsPerChunk = -999;
}
/**

View File

@ -30,7 +30,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPPlant extends BlockFlower implements IShearable
{
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "rivercane", "cattailtop", "cattailbottom", "wildcarrot", "cactus", "witherwart", "reed"};
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "rivercane", "cattailtop", "cattailbottom", "wildcarrot", "cactus", "witherwart", "reed", "root"};
private Icon[] textures;
public Icon reedbottom;
@ -150,6 +150,7 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
public boolean canPlaceBlockOnSide(World world, int x, int y, int z, int side, ItemStack itemStack)
{
int id = world.getBlockId(x, y - 1, z);
int idRoot = world.getBlockId(x, y + 1, z);
int meta = itemStack.getItemDamage();
if (itemStack.itemID == blockID) {
@ -192,6 +193,9 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
case 14: // Reed
return id == Block.waterStill.blockID;
case 15: // Reed
return idRoot == Block.grass.blockID || idRoot == Block.dirt.blockID || idRoot == Block.tilledField.blockID || idRoot == Blocks.longGrass.get().blockID;
default:
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID;
}
@ -212,6 +216,8 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
return this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y - 1, z));
else if (meta == 8)
return block == null || block.isBlockReplaceable(world, x, y, z);
else if (meta == 15)
return this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y + 1, z));
else
return (world.getFullBlockLightValue(x, y, z) >= 8 || world.canBlockSeeTheSky(x, y, z)) && this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y - 1, z));
}
@ -219,6 +225,8 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
{
if (meta == 5 || meta == 13)
return this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y - 1, z), world.getBlockMetadata(x, y, z));
else if (meta == 15)
return this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y + 1, z), world.getBlockMetadata(x, y, z));
else
return (world.getFullBlockLightValue(x, y, z) >= 8 || world.canBlockSeeTheSky(x, y, z)) && this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y - 1, z), world.getBlockMetadata(x, y, z));
}

View File

@ -47,6 +47,8 @@ public class PlantsRenderer implements ISimpleBlockRenderingHandler
{
return renderCrossedSquares(block, x, y, z, renderer, false);
}
if (meta == 15)
return renderer.renderCrossedSquares(block, x, y, z);
}
return true;
}

View File

@ -190,6 +190,7 @@ public class ThaumcraftIntegration {
ThaumcraftApi.registerObjectTag(getBID("highGrassItem"), getBMeta("highGrassItem"), (new AspectList()).add(Aspect.PLANT, 2));
ThaumcraftApi.registerObjectTag(getBID("bushItem"), getBMeta("bushItem"), (new AspectList()).add(Aspect.PLANT, 2));
ThaumcraftApi.registerObjectTag(getBID("algae"), getBMeta("algae"), (new AspectList()).add(Aspect.PLANT, 1).add(Aspect.WATER, 1));
ThaumcraftApi.registerObjectTag(getBID("root"), getBMeta("root"), (new AspectList()).add(Aspect.EARTH, 1).add(Aspect.PLANT, 1));
//Plants
ThaumcraftApi.registerObjectTag(getBID("toadstool"), getBMeta("toadstool"), (new AspectList()).add(Aspect.PLANT, 4));

View File

@ -16,7 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemBlockPlant extends ItemBlock
{
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "rivercane", "cattailtop", "cattailbottom", "wildcarrot", "cactus", "witherwart", "reed"};
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "rivercane", "cattailtop", "cattailbottom", "wildcarrot", "cactus", "witherwart", "reed", "root"};
@SideOnly(Side.CLIENT)
private Icon[] textures;
@ -37,13 +37,14 @@ public class ItemBlockPlant extends ItemBlock
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[5];
textures = new Icon[6];
textures[0] = iconRegister.registerIcon("biomesoplenty:item_barley");
textures[1] = iconRegister.registerIcon("biomesoplenty:item_cattail");
textures[2] = iconRegister.registerIcon("biomesoplenty:item_rivercane");
textures[3] = iconRegister.registerIcon("biomesoplenty:item_witherwart");
textures[4] = iconRegister.registerIcon("biomesoplenty:item_reed");
textures[5] = iconRegister.registerIcon("biomesoplenty:item_root");
}
@Override
@ -70,6 +71,8 @@ public class ItemBlockPlant extends ItemBlock
return textures[3];
else if (meta == 14)
return textures[4];
else if (meta == 15)
return textures[5];
else
return Block.blocksList[itemID].getIcon(0, meta);
}

View File

@ -32,6 +32,7 @@ tile.bop.plants.rivercane.name=River Cane
tile.bop.plants.cactus.name=Tiny Cactus
tile.bop.plants.witherwart.name=Wither Wart
tile.bop.plants.reed.name=Reed
tile.bop.plants.root.name=Root
tile.bop.flowers.clover.name=Clover
tile.bop.flowers.swampflower.name=Swampflower

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B