Added Miner's Delight (underground flower)
This commit is contained in:
parent
6b92c118a6
commit
3d081408b1
7 changed files with 25 additions and 5 deletions
|
@ -191,6 +191,7 @@ public class BlockReferences {
|
|||
lavender (Blocks.flowers2, 3),
|
||||
goldenrod (Blocks.flowers2, 4),
|
||||
bluebells (Blocks.flowers2, 5),
|
||||
minersdelight (Blocks.flowers2, 6),
|
||||
;
|
||||
|
||||
public Optional<? extends Block> block;
|
||||
|
|
|
@ -229,6 +229,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
public WorldGenerator lavenderGen;
|
||||
public WorldGenerator goldenrodGen;
|
||||
public WorldGenerator bluebellGen;
|
||||
public WorldGenerator minersDelightGen;
|
||||
|
||||
public WorldGenerator boneSpineGen;
|
||||
public WorldGenerator boneSpine2Gen;
|
||||
|
@ -322,6 +323,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
public int lavenderPerChunk;
|
||||
public int goldenrodsPerChunk;
|
||||
public int bluebellsPerChunk;
|
||||
public int minersDelightPerChunk;
|
||||
|
||||
public int boneSpinesPerChunk;
|
||||
public int boneSpines2PerChunk;
|
||||
|
@ -480,6 +482,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
lavenderGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 3);
|
||||
goldenrodGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 4);
|
||||
bluebellGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 5);
|
||||
minersDelightGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 6);
|
||||
lilyflowerGen = new WorldGenLilyflower();
|
||||
deathbloomGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 2);
|
||||
hydrangeaGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 4);
|
||||
|
@ -613,6 +616,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
lavenderPerChunk = 0;
|
||||
goldenrodsPerChunk = 0;
|
||||
bluebellsPerChunk = 0;
|
||||
minersDelightPerChunk = 3;
|
||||
generateLakes = true;
|
||||
generateAsh = false;
|
||||
generateMycelium = false;
|
||||
|
@ -1181,6 +1185,14 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
|||
var5 = chunk_Z + randomGenerator.nextInt(16) + 8;
|
||||
bluebellGen.generate(currentWorld, randomGenerator, var3, var4, var5);
|
||||
}
|
||||
|
||||
for (var2 = 0; var2 < minersDelightPerChunk; ++var2)
|
||||
{
|
||||
var3 = chunk_X + randomGenerator.nextInt(16) + 8;
|
||||
var4 = randomGenerator.nextInt(64);
|
||||
var5 = chunk_Z + randomGenerator.nextInt(16) + 8;
|
||||
minersDelightGen.generate(currentWorld, randomGenerator, var3, var4, var5);
|
||||
}
|
||||
|
||||
for (var2 = 0; var2 < hydrangeasPerChunk; ++var2)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class BlockBOPFlower2 extends BlockFlower
|
||||
{
|
||||
private static final String[] plants2 = new String[] {"hibiscus", "lilyofthevalley", "burningblossom", "lavender", "goldenrod", "bluebells"};
|
||||
private static final String[] plants2 = new String[] {"hibiscus", "lilyofthevalley", "burningblossom", "lavender", "goldenrod", "bluebells", "minersdelight"};
|
||||
private Icon[] textures;
|
||||
|
||||
protected BlockBOPFlower2(int blockID, Material material)
|
||||
|
@ -156,13 +156,15 @@ public class BlockBOPFlower2 extends BlockFlower
|
|||
@Override
|
||||
protected boolean canThisPlantGrowOnThisBlockID(int id)
|
||||
{
|
||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID || id == Block.netherrack.blockID || id == Blocks.longGrass.get().blockID;
|
||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID || id == Block.netherrack.blockID || id == Blocks.longGrass.get().blockID || id == Block.stone.blockID;
|
||||
}
|
||||
|
||||
protected boolean canThisPlantGrowOnThisBlockID(int id, int metadata)
|
||||
{
|
||||
if (metadata == 2) // Burning Blossom
|
||||
return id == Block.netherrack.blockID;
|
||||
else if (metadata == 6) // Burning Blossom
|
||||
return id == Block.stone.blockID;
|
||||
else
|
||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID || id == Blocks.longGrass.get().blockID;
|
||||
}
|
||||
|
@ -179,6 +181,9 @@ public class BlockBOPFlower2 extends BlockFlower
|
|||
{
|
||||
case 2: // Burning Blossom
|
||||
return id == Block.netherrack.blockID;
|
||||
|
||||
case 6: // Miner's Delight
|
||||
return id == Block.stone.blockID;
|
||||
|
||||
default:
|
||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID || id == Blocks.longGrass.get().blockID;
|
||||
|
@ -215,14 +220,14 @@ public class BlockBOPFlower2 extends BlockFlower
|
|||
|
||||
if (world.getBlockId(x, y, z) != blockID)
|
||||
{
|
||||
if (meta == 2)
|
||||
if (meta == 2 || meta == 6)
|
||||
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));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (meta == 2)
|
||||
if (meta == 2 || meta == 6)
|
||||
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));
|
||||
|
|
|
@ -229,6 +229,7 @@ public class ThaumcraftIntegration {
|
|||
ThaumcraftApi.registerObjectTag(getBID("lavender"), getBMeta("lavender"), (new AspectList()).add(Aspect.PLANT, 4));
|
||||
ThaumcraftApi.registerObjectTag(getBID("goldenrod"), getBMeta("goldenrod"), (new AspectList()).add(Aspect.PLANT, 4));
|
||||
ThaumcraftApi.registerObjectTag(getBID("bluebells"), getBMeta("bluebells"), (new AspectList()).add(Aspect.PLANT, 4));
|
||||
ThaumcraftApi.registerObjectTag(getBID("minersdelight"), getBMeta("minersdelight"), (new AspectList()).add(Aspect.PLANT, 2).add(Aspect.EARTH, 1));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class ItemBlockFlower2 extends ItemBlock
|
||||
{
|
||||
private static final String[] plants = new String[] {"hibiscus", "lilyofthevalley", "burningblossom", "lavender", "goldenrod", "bluebells"};
|
||||
private static final String[] plants = new String[] {"hibiscus", "lilyofthevalley", "burningblossom", "lavender", "goldenrod", "bluebells", "minersdelight"};
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon[] textures;
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
<entry key="tile.bop.flowers2.lavender.name">Lavender</entry>
|
||||
<entry key="tile.bop.flowers2.goldenrod.name">Goldenrod</entry>
|
||||
<entry key="tile.bop.flowers2.bluebells.name">Bluebells</entry>
|
||||
<entry key="tile.bop.flowers2.minersdelight.name">Miner's Delight</entry>
|
||||
|
||||
<entry key="tile.bop.foliage.algae.name">Algae</entry>
|
||||
<entry key="tile.bop.foliage.shortgrass.name">Short Grass</entry>
|
||||
|
|
BIN
resources/assets/biomesoplenty/textures/blocks/minersdelight.png
Normal file
BIN
resources/assets/biomesoplenty/textures/blocks/minersdelight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 574 B |
Loading…
Reference in a new issue