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),
|
lavender (Blocks.flowers2, 3),
|
||||||
goldenrod (Blocks.flowers2, 4),
|
goldenrod (Blocks.flowers2, 4),
|
||||||
bluebells (Blocks.flowers2, 5),
|
bluebells (Blocks.flowers2, 5),
|
||||||
|
minersdelight (Blocks.flowers2, 6),
|
||||||
;
|
;
|
||||||
|
|
||||||
public Optional<? extends Block> block;
|
public Optional<? extends Block> block;
|
||||||
|
|
|
@ -229,6 +229,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
public WorldGenerator lavenderGen;
|
public WorldGenerator lavenderGen;
|
||||||
public WorldGenerator goldenrodGen;
|
public WorldGenerator goldenrodGen;
|
||||||
public WorldGenerator bluebellGen;
|
public WorldGenerator bluebellGen;
|
||||||
|
public WorldGenerator minersDelightGen;
|
||||||
|
|
||||||
public WorldGenerator boneSpineGen;
|
public WorldGenerator boneSpineGen;
|
||||||
public WorldGenerator boneSpine2Gen;
|
public WorldGenerator boneSpine2Gen;
|
||||||
|
@ -322,6 +323,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
public int lavenderPerChunk;
|
public int lavenderPerChunk;
|
||||||
public int goldenrodsPerChunk;
|
public int goldenrodsPerChunk;
|
||||||
public int bluebellsPerChunk;
|
public int bluebellsPerChunk;
|
||||||
|
public int minersDelightPerChunk;
|
||||||
|
|
||||||
public int boneSpinesPerChunk;
|
public int boneSpinesPerChunk;
|
||||||
public int boneSpines2PerChunk;
|
public int boneSpines2PerChunk;
|
||||||
|
@ -480,6 +482,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
lavenderGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 3);
|
lavenderGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 3);
|
||||||
goldenrodGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 4);
|
goldenrodGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 4);
|
||||||
bluebellGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 5);
|
bluebellGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 5);
|
||||||
|
minersDelightGen = new WorldGenBOPFlowers(Blocks.flowers2.get().blockID, 6);
|
||||||
lilyflowerGen = new WorldGenLilyflower();
|
lilyflowerGen = new WorldGenLilyflower();
|
||||||
deathbloomGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 2);
|
deathbloomGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 2);
|
||||||
hydrangeaGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 4);
|
hydrangeaGen = new WorldGenBOPFlowers(Blocks.flowers.get().blockID, 4);
|
||||||
|
@ -613,6 +616,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
lavenderPerChunk = 0;
|
lavenderPerChunk = 0;
|
||||||
goldenrodsPerChunk = 0;
|
goldenrodsPerChunk = 0;
|
||||||
bluebellsPerChunk = 0;
|
bluebellsPerChunk = 0;
|
||||||
|
minersDelightPerChunk = 3;
|
||||||
generateLakes = true;
|
generateLakes = true;
|
||||||
generateAsh = false;
|
generateAsh = false;
|
||||||
generateMycelium = false;
|
generateMycelium = false;
|
||||||
|
@ -1182,6 +1186,14 @@ public class BiomeDecoratorBOP extends BiomeDecorator
|
||||||
bluebellGen.generate(currentWorld, randomGenerator, var3, var4, var5);
|
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)
|
for (var2 = 0; var2 < hydrangeasPerChunk; ++var2)
|
||||||
{
|
{
|
||||||
var3 = chunk_X + randomGenerator.nextInt(16) + 8;
|
var3 = chunk_X + randomGenerator.nextInt(16) + 8;
|
||||||
|
|
|
@ -22,7 +22,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class BlockBOPFlower2 extends BlockFlower
|
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;
|
private Icon[] textures;
|
||||||
|
|
||||||
protected BlockBOPFlower2(int blockID, Material material)
|
protected BlockBOPFlower2(int blockID, Material material)
|
||||||
|
@ -156,13 +156,15 @@ public class BlockBOPFlower2 extends BlockFlower
|
||||||
@Override
|
@Override
|
||||||
protected boolean canThisPlantGrowOnThisBlockID(int id)
|
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)
|
protected boolean canThisPlantGrowOnThisBlockID(int id, int metadata)
|
||||||
{
|
{
|
||||||
if (metadata == 2) // Burning Blossom
|
if (metadata == 2) // Burning Blossom
|
||||||
return id == Block.netherrack.blockID;
|
return id == Block.netherrack.blockID;
|
||||||
|
else if (metadata == 6) // Burning Blossom
|
||||||
|
return id == Block.stone.blockID;
|
||||||
else
|
else
|
||||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID || id == Blocks.longGrass.get().blockID;
|
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID || id == Blocks.longGrass.get().blockID;
|
||||||
}
|
}
|
||||||
|
@ -180,6 +182,9 @@ public class BlockBOPFlower2 extends BlockFlower
|
||||||
case 2: // Burning Blossom
|
case 2: // Burning Blossom
|
||||||
return id == Block.netherrack.blockID;
|
return id == Block.netherrack.blockID;
|
||||||
|
|
||||||
|
case 6: // Miner's Delight
|
||||||
|
return id == Block.stone.blockID;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return id == Block.grass.blockID || id == Block.dirt.blockID || id == Block.tilledField.blockID || id == Blocks.longGrass.get().blockID;
|
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 (world.getBlockId(x, y, z) != blockID)
|
||||||
{
|
{
|
||||||
if (meta == 2)
|
if (meta == 2 || meta == 6)
|
||||||
return this.canThisPlantGrowOnThisBlockID(world.getBlockId(x, y - 1, z));
|
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));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (meta == 2)
|
if (meta == 2 || meta == 6)
|
||||||
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
|
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));
|
||||||
|
|
|
@ -229,6 +229,7 @@ public class ThaumcraftIntegration {
|
||||||
ThaumcraftApi.registerObjectTag(getBID("lavender"), getBMeta("lavender"), (new AspectList()).add(Aspect.PLANT, 4));
|
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("goldenrod"), getBMeta("goldenrod"), (new AspectList()).add(Aspect.PLANT, 4));
|
||||||
ThaumcraftApi.registerObjectTag(getBID("bluebells"), getBMeta("bluebells"), (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
|
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)
|
@SideOnly(Side.CLIENT)
|
||||||
private Icon[] textures;
|
private Icon[] textures;
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,7 @@
|
||||||
<entry key="tile.bop.flowers2.lavender.name">Lavender</entry>
|
<entry key="tile.bop.flowers2.lavender.name">Lavender</entry>
|
||||||
<entry key="tile.bop.flowers2.goldenrod.name">Goldenrod</entry>
|
<entry key="tile.bop.flowers2.goldenrod.name">Goldenrod</entry>
|
||||||
<entry key="tile.bop.flowers2.bluebells.name">Bluebells</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.algae.name">Algae</entry>
|
||||||
<entry key="tile.bop.foliage.shortgrass.name">Short Grass</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