Merge branch 'master' of https://github.com/BiomesOPlenty/BiomesOPlenty
This commit is contained in:
commit
56f8fe1ebf
10 changed files with 33 additions and 3 deletions
|
@ -173,6 +173,7 @@ public class BlockReferences {
|
||||||
tinyCactus (Blocks.plants, 12),
|
tinyCactus (Blocks.plants, 12),
|
||||||
witherwart (Blocks.plants, 13),
|
witherwart (Blocks.plants, 13),
|
||||||
reed (Blocks.plants, 14),
|
reed (Blocks.plants, 14),
|
||||||
|
root (Blocks.plants, 15),
|
||||||
|
|
||||||
treeMoss (Blocks.treeMoss, 0),
|
treeMoss (Blocks.treeMoss, 0),
|
||||||
moss (Blocks.moss, 0),
|
moss (Blocks.moss, 0),
|
||||||
|
|
|
@ -52,6 +52,7 @@ import biomesoplenty.worldgen.WorldGenBOPBush;
|
||||||
import biomesoplenty.worldgen.WorldGenBOPDarkFlowers;
|
import biomesoplenty.worldgen.WorldGenBOPDarkFlowers;
|
||||||
import biomesoplenty.worldgen.WorldGenBOPFlowers;
|
import biomesoplenty.worldgen.WorldGenBOPFlowers;
|
||||||
import biomesoplenty.worldgen.WorldGenBOPPumpkin;
|
import biomesoplenty.worldgen.WorldGenBOPPumpkin;
|
||||||
|
import biomesoplenty.worldgen.WorldGenBOPTallGrass;
|
||||||
import biomesoplenty.worldgen.WorldGenBadlands;
|
import biomesoplenty.worldgen.WorldGenBadlands;
|
||||||
import biomesoplenty.worldgen.WorldGenBadlands2;
|
import biomesoplenty.worldgen.WorldGenBadlands2;
|
||||||
import biomesoplenty.worldgen.WorldGenBadlands3;
|
import biomesoplenty.worldgen.WorldGenBadlands3;
|
||||||
|
@ -241,6 +242,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
public WorldGenerator redwoodShrubGen;
|
public WorldGenerator redwoodShrubGen;
|
||||||
public WorldGenerator koruGen;
|
public WorldGenerator koruGen;
|
||||||
public WorldGenerator waspHiveGen;
|
public WorldGenerator waspHiveGen;
|
||||||
|
public WorldGenerator rootGen;
|
||||||
|
|
||||||
public WorldGenerator boneSpineGen;
|
public WorldGenerator boneSpineGen;
|
||||||
public WorldGenerator boneSpine2Gen;
|
public WorldGenerator boneSpine2Gen;
|
||||||
|
@ -341,6 +343,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
public int redwoodShrubsPerChunk;
|
public int redwoodShrubsPerChunk;
|
||||||
public int koruPerChunk;
|
public int koruPerChunk;
|
||||||
public int waspHivesPerChunk;
|
public int waspHivesPerChunk;
|
||||||
|
public int rootsPerChunk;
|
||||||
|
|
||||||
public int boneSpinesPerChunk;
|
public int boneSpinesPerChunk;
|
||||||
public int boneSpines2PerChunk;
|
public int boneSpines2PerChunk;
|
||||||
|
@ -551,6 +554,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
waterReedGen = new WorldGenWaterReeds();
|
waterReedGen = new WorldGenWaterReeds();
|
||||||
redwoodShrubGen = new WorldGenRedwoodShrub(0,0);
|
redwoodShrubGen = new WorldGenRedwoodShrub(0,0);
|
||||||
koruGen = new WorldGenTallGrass(Blocks.foliage.get().blockID, 12);
|
koruGen = new WorldGenTallGrass(Blocks.foliage.get().blockID, 12);
|
||||||
|
rootGen = new WorldGenBOPTallGrass(Blocks.plants.get().blockID, 15);
|
||||||
pitGen = new WorldGenPit(Blocks.ash.get().blockID);
|
pitGen = new WorldGenPit(Blocks.ash.get().blockID);
|
||||||
waterlilyPerChunk = 0;
|
waterlilyPerChunk = 0;
|
||||||
lilyflowersPerChunk = 0;
|
lilyflowersPerChunk = 0;
|
||||||
|
@ -646,6 +650,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
redwoodShrubsPerChunk = 0;
|
redwoodShrubsPerChunk = 0;
|
||||||
koruPerChunk = 0;
|
koruPerChunk = 0;
|
||||||
waspHivesPerChunk = 0;
|
waspHivesPerChunk = 0;
|
||||||
|
rootsPerChunk = 7;
|
||||||
generateLakes = true;
|
generateLakes = true;
|
||||||
generateAsh = false;
|
generateAsh = false;
|
||||||
generateMycelium = false;
|
generateMycelium = false;
|
||||||
|
@ -1328,6 +1333,14 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
koruGen.generate(currentWorld, randomGenerator, var3, var4, var5);
|
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)
|
for (var2 = 0; var2 < waspHivesPerChunk; ++var2)
|
||||||
{
|
{
|
||||||
int var420 = randomGenerator.nextInt(4);
|
int var420 = randomGenerator.nextInt(4);
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class BiomeGenOriginValley extends BiomeGenBase
|
||||||
customBiomeDecorator.sandPerChunk = 0;
|
customBiomeDecorator.sandPerChunk = 0;
|
||||||
customBiomeDecorator.sandPerChunk2 = 0;
|
customBiomeDecorator.sandPerChunk2 = 0;
|
||||||
customBiomeDecorator.clayPerChunk = 0;
|
customBiomeDecorator.clayPerChunk = 0;
|
||||||
|
customBiomeDecorator.rootsPerChunk = -999;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -30,7 +30,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class BlockBOPPlant extends BlockFlower implements IShearable
|
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;
|
private Icon[] textures;
|
||||||
public Icon reedbottom;
|
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)
|
public boolean canPlaceBlockOnSide(World world, int x, int y, int z, int side, ItemStack itemStack)
|
||||||
{
|
{
|
||||||
int id = world.getBlockId(x, y - 1, z);
|
int id = world.getBlockId(x, y - 1, z);
|
||||||
|
int idRoot = world.getBlockId(x, y + 1, z);
|
||||||
int meta = itemStack.getItemDamage();
|
int meta = itemStack.getItemDamage();
|
||||||
|
|
||||||
if (itemStack.itemID == blockID) {
|
if (itemStack.itemID == blockID) {
|
||||||
|
@ -192,6 +193,9 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
|
||||||
case 14: // Reed
|
case 14: // Reed
|
||||||
return id == Block.waterStill.blockID;
|
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:
|
default:
|
||||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID;
|
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));
|
return this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y - 1, z));
|
||||||
else if (meta == 8)
|
else if (meta == 8)
|
||||||
return block == null || block.isBlockReplaceable(world, x, y, z);
|
return block == null || block.isBlockReplaceable(world, x, y, z);
|
||||||
|
else if (meta == 15)
|
||||||
|
return this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y + 1, z));
|
||||||
else
|
else
|
||||||
return (world.getFullBlockLightValue(x, y, z) >= 8 || world.canBlockSeeTheSky(x, y, z)) && this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y - 1, z));
|
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)
|
if (meta == 5 || meta == 13)
|
||||||
return this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y - 1, z), world.getBlockMetadata(x, y, z));
|
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
|
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));
|
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));
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,8 @@ public class PlantsRenderer implements ISimpleBlockRenderingHandler
|
||||||
{
|
{
|
||||||
return renderCrossedSquares(block, x, y, z, renderer, false);
|
return renderCrossedSquares(block, x, y, z, renderer, false);
|
||||||
}
|
}
|
||||||
|
if (meta == 15)
|
||||||
|
return renderer.renderCrossedSquares(block, x, y, z);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -190,6 +190,7 @@ public class ThaumcraftIntegration {
|
||||||
ThaumcraftApi.registerObjectTag(getBID("highGrassItem"), getBMeta("highGrassItem"), (new AspectList()).add(Aspect.PLANT, 2));
|
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("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("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
|
//Plants
|
||||||
ThaumcraftApi.registerObjectTag(getBID("toadstool"), getBMeta("toadstool"), (new AspectList()).add(Aspect.PLANT, 4));
|
ThaumcraftApi.registerObjectTag(getBID("toadstool"), getBMeta("toadstool"), (new AspectList()).add(Aspect.PLANT, 4));
|
||||||
|
|
|
@ -16,7 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class ItemBlockPlant extends ItemBlock
|
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)
|
@SideOnly(Side.CLIENT)
|
||||||
private Icon[] textures;
|
private Icon[] textures;
|
||||||
|
|
||||||
|
@ -37,13 +37,14 @@ public class ItemBlockPlant extends ItemBlock
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IconRegister iconRegister)
|
public void registerIcons(IconRegister iconRegister)
|
||||||
{
|
{
|
||||||
textures = new Icon[5];
|
textures = new Icon[6];
|
||||||
|
|
||||||
textures[0] = iconRegister.registerIcon("biomesoplenty:item_barley");
|
textures[0] = iconRegister.registerIcon("biomesoplenty:item_barley");
|
||||||
textures[1] = iconRegister.registerIcon("biomesoplenty:item_cattail");
|
textures[1] = iconRegister.registerIcon("biomesoplenty:item_cattail");
|
||||||
textures[2] = iconRegister.registerIcon("biomesoplenty:item_rivercane");
|
textures[2] = iconRegister.registerIcon("biomesoplenty:item_rivercane");
|
||||||
textures[3] = iconRegister.registerIcon("biomesoplenty:item_witherwart");
|
textures[3] = iconRegister.registerIcon("biomesoplenty:item_witherwart");
|
||||||
textures[4] = iconRegister.registerIcon("biomesoplenty:item_reed");
|
textures[4] = iconRegister.registerIcon("biomesoplenty:item_reed");
|
||||||
|
textures[5] = iconRegister.registerIcon("biomesoplenty:item_root");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -70,6 +71,8 @@ public class ItemBlockPlant extends ItemBlock
|
||||||
return textures[3];
|
return textures[3];
|
||||||
else if (meta == 14)
|
else if (meta == 14)
|
||||||
return textures[4];
|
return textures[4];
|
||||||
|
else if (meta == 15)
|
||||||
|
return textures[5];
|
||||||
else
|
else
|
||||||
return Block.blocksList[itemID].getIcon(0, meta);
|
return Block.blocksList[itemID].getIcon(0, meta);
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ tile.bop.plants.rivercane.name=River Cane
|
||||||
tile.bop.plants.cactus.name=Tiny Cactus
|
tile.bop.plants.cactus.name=Tiny Cactus
|
||||||
tile.bop.plants.witherwart.name=Wither Wart
|
tile.bop.plants.witherwart.name=Wither Wart
|
||||||
tile.bop.plants.reed.name=Reed
|
tile.bop.plants.reed.name=Reed
|
||||||
|
tile.bop.plants.root.name=Root
|
||||||
|
|
||||||
tile.bop.flowers.clover.name=Clover
|
tile.bop.flowers.clover.name=Clover
|
||||||
tile.bop.flowers.swampflower.name=Swampflower
|
tile.bop.flowers.swampflower.name=Swampflower
|
||||||
|
|
BIN
resources/assets/biomesoplenty/textures/blocks/item_root.png
Normal file
BIN
resources/assets/biomesoplenty/textures/blocks/item_root.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 645 B |
BIN
resources/assets/biomesoplenty/textures/blocks/root.png
Normal file
BIN
resources/assets/biomesoplenty/textures/blocks/root.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 501 B |
Loading…
Reference in a new issue