Merge branch 'master' of https://github.com/ted80/BiomesOPlenty
This commit is contained in:
commit
62a7478fb4
11 changed files with 181 additions and 4 deletions
|
@ -40,6 +40,7 @@ public class BlockReferences {
|
|||
palmLeaves (Blocks.leavesColorized, 2),
|
||||
redwoodLeaves (Blocks.leavesColorized, 3),
|
||||
willowLeaves (Blocks.leavesColorized, 4),
|
||||
pineLeaves (Blocks.leavesColorized, 5),
|
||||
|
||||
yellowAutumnLeaves (Blocks.leaves1, 0),
|
||||
bambooLeaves (Blocks.leaves1, 1),
|
||||
|
@ -77,6 +78,7 @@ public class BlockReferences {
|
|||
palmSapling (Blocks.colorizedSaplings, 2),
|
||||
redwoodSapling (Blocks.colorizedSaplings, 3),
|
||||
willowSapling (Blocks.colorizedSaplings, 4),
|
||||
pineSapling (Blocks.colorizedSaplings, 5),
|
||||
mapleSapling (Blocks.saplings, 11),
|
||||
orangeAutumnSapling (Blocks.saplings, 8),
|
||||
pinkCherrySapling (Blocks.saplings, 10),
|
||||
|
|
|
@ -2,7 +2,7 @@ package biomesoplenty.biomes;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.worldgen.WorldGenTaiga7;
|
||||
import biomesoplenty.worldgen.WorldGenPineTree;
|
||||
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.gen.feature.WorldGenTaiga2;
|
||||
|
@ -27,6 +27,6 @@ public class BiomeGenMountain extends BiomeGenBase
|
|||
*/
|
||||
public WorldGenerator getRandomWorldGenForTrees(Random par1Random)
|
||||
{
|
||||
return (WorldGenerator)(par1Random.nextInt(8) == 0 ? new WorldGenTaiga2(false) : (par1Random.nextInt(4) == 0 ? new WorldGenTaiga7(false) : this.worldGeneratorTrees));
|
||||
return (WorldGenerator)(par1Random.nextInt(4) == 0 ? this.worldGeneratorTrees : new WorldGenPineTree());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearable
|
||||
{
|
||||
private static final String[] leaves = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"};
|
||||
private static final String[] leaves = new String[] {"acacia", "mangrove", "palm", "redwood", "willow", "pine"};
|
||||
private Icon[][] textures;
|
||||
int[] adjacentTreeBlocks;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import biomesoplenty.worldgen.WorldGenAcacia;
|
|||
import biomesoplenty.worldgen.WorldGenMangrove;
|
||||
import biomesoplenty.worldgen.WorldGenPalmTree1;
|
||||
import biomesoplenty.worldgen.WorldGenPalmTree3;
|
||||
import biomesoplenty.worldgen.WorldGenPineTree;
|
||||
import biomesoplenty.worldgen.WorldGenRedwoodTree2;
|
||||
import biomesoplenty.worldgen.WorldGenWillow;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -25,7 +26,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class BlockBOPColorizedSapling extends BlockSapling
|
||||
{
|
||||
private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow"};
|
||||
private static final String[] saplings = new String[] {"acacia", "mangrove", "palm", "redwood", "willow", "pine"};
|
||||
private Icon[] textures;
|
||||
private static final int TYPES = 15;
|
||||
|
||||
|
@ -138,6 +139,10 @@ public class BlockBOPColorizedSapling extends BlockSapling
|
|||
|
||||
case 4: // Willow Tree
|
||||
obj = new WorldGenWillow();
|
||||
break;
|
||||
|
||||
case 5: // Pine Tree
|
||||
obj = new WorldGenPineTree();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -452,6 +452,7 @@ public class BOPBlocks {
|
|||
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.leavesColorized.get(),1,3), "Redwood Leaves");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.leavesColorized.get(),1,4), "Willow Leaves");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.leavesColorized.get(),1,5), "Pine Leaves");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.leaves1.get(),1,5), "Fir Leaves");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.leavesColorized.get(),1,0), "Acacia Leaves");
|
||||
LanguageRegistry.addName(new ItemStack(Blocks.leaves1.get(),1,3), "Dark Leaves");
|
||||
|
|
169
src/minecraft/biomesoplenty/worldgen/WorldGenPineTree.java
Normal file
169
src/minecraft/biomesoplenty/worldgen/WorldGenPineTree.java
Normal file
|
@ -0,0 +1,169 @@
|
|||
package biomesoplenty.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.api.Blocks;
|
||||
import biomesoplenty.configuration.BOPBlocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class WorldGenPineTree extends WorldGenerator
|
||||
{
|
||||
public boolean generate(World var1, Random var2, int var3, int var4, int var5)
|
||||
{
|
||||
while (var1.isAirBlock(var3, var4, var5) && var4 > 2)
|
||||
{
|
||||
--var4;
|
||||
}
|
||||
|
||||
int var6 = var1.getBlockId(var3, var4, var5);
|
||||
|
||||
if (var6 != Block.grass.blockID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int var7 = -2; var7 <= 2; ++var7)
|
||||
{
|
||||
for (int var8 = -2; var8 <= 2; ++var8)
|
||||
{
|
||||
if (var1.isAirBlock(var3 + var7, var4 - 1, var5 + var8) && var1.isAirBlock(var3 + var7, var4 - 2, var5 + var8) && !var1.isAirBlock(var3 + var7, var4, var5 + var8))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int var99 = var2.nextInt(2);
|
||||
|
||||
if (var99 == 0)
|
||||
{
|
||||
var1.setBlock(var3, var4, var5, Block.dirt.blockID);
|
||||
var1.setBlock(var3, var4 + 1, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 2, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 3, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 4, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 5, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 6, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 7, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 8, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 9, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 10, var5, Block.wood.blockID, 0, 2);
|
||||
|
||||
var1.setBlock(var3 + 1, var4 + 6, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 6, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 6, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 6, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 6, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 6, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 6, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 6, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 6, var5 - 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 2, var4 + 6, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 2, var4 + 6, var5 - 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 6, var5 + 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 2, var4 + 6, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 2, var4 + 6, var5 + 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3 + 1, var4 + 8, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 8, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 8, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 8, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 8, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 8, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 8, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 8, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 8, var5 - 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 2, var4 + 8, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 2, var4 + 8, var5 - 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 8, var5 + 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 2, var4 + 8, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 2, var4 + 8, var5 + 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3 + 1, var4 + 10, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 10, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 10, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 10, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 10, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 10, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 10, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 10, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3 + 1, var4 + 11, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 11, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 11, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 11, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3, var4 + 12, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
}
|
||||
|
||||
if (var99 == 1)
|
||||
{
|
||||
var1.setBlock(var3, var4, var5, Block.dirt.blockID);
|
||||
var1.setBlock(var3, var4 + 1, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 2, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 3, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 4, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 5, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 6, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 7, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 8, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 9, var5, Block.wood.blockID, 0, 2);
|
||||
var1.setBlock(var3, var4 + 10, var5, Block.wood.blockID, 0, 2);
|
||||
|
||||
var1.setBlock(var3 + 1, var4 + 6, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 6, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 6, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 6, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 6, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 6, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 6, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 6, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3 + 1, var4 + 6, var5 - 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 2, var4 + 6, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 2, var4 + 6, var5 - 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 6, var5 + 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 2, var4 + 6, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 2, var4 + 6, var5 + 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3 + 1, var4 + 8, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 8, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 8, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 8, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 8, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 8, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 8, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 8, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3 - 1, var4 + 8, var5 - 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 2, var4 + 8, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 2, var4 + 8, var5 - 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 8, var5 + 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 2, var4 + 8, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 2, var4 + 8, var5 + 2, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3 + 1, var4 + 10, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 10, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 10, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 10, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 10, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 + 1, var4 + 10, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 10, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 10, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3 + 1, var4 + 11, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3 - 1, var4 + 11, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 11, var5 + 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
var1.setBlock(var3, var4 + 11, var5 - 1, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
|
||||
var1.setBlock(var3, var4 + 12, var5, Blocks.leavesColorized.get().blockID, 5, 2);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 372 B |
Binary file not shown.
After Width: | Height: | Size: 331 B |
Binary file not shown.
After Width: | Height: | Size: 478 B |
Binary file not shown.
After Width: | Height: | Size: 590 B |
BIN
src/minecraft/mods/BiomesOPlenty/textures/blocks/plank_pine.png
Normal file
BIN
src/minecraft/mods/BiomesOPlenty/textures/blocks/plank_pine.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 348 B |
Loading…
Reference in a new issue