31a908b754
Refactored some of the events to be a better hiarachy.
36 lines
2 KiB
Diff
36 lines
2 KiB
Diff
--- ../src_base/common/net/minecraft/src/WorldGenForest.java
|
|
+++ ../src_work/common/net/minecraft/src/WorldGenForest.java
|
|
@@ -43,7 +43,9 @@
|
|
{
|
|
var12 = par1World.getBlockId(var10, var8, var11);
|
|
|
|
- if (var12 != 0 && var12 != Block.leaves.blockID)
|
|
+ Block block = Block.blocksList[var12];
|
|
+
|
|
+ if (var12 != 0 && (block != null && !block.isLeaves(par1World, var10, var8, var11)))
|
|
{
|
|
var7 = false;
|
|
}
|
|
@@ -82,7 +84,10 @@
|
|
{
|
|
int var15 = var14 - par5;
|
|
|
|
- if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) && !Block.opaqueCubeLookup[par1World.getBlockId(var12, var16, var14)])
|
|
+ Block block = Block.blocksList[par1World.getBlockId(var12, var16, var14)];
|
|
+
|
|
+ if ((Math.abs(var13) != var11 || Math.abs(var15) != var11 || par2Random.nextInt(2) != 0 && var10 != 0) &&
|
|
+ (block == null || block.canBeReplacedByLeaves(par1World, var12, var16, var14)))
|
|
{
|
|
this.setBlockAndMetadata(par1World, var12, var16, var14, Block.leaves.blockID, 2);
|
|
}
|
|
@@ -94,7 +99,9 @@
|
|
{
|
|
var10 = par1World.getBlockId(par3, par4 + var16, par5);
|
|
|
|
- if (var10 == 0 || var10 == Block.leaves.blockID)
|
|
+ Block block = Block.blocksList[var10];
|
|
+
|
|
+ if (var10 == 0 || block == null || block.isLeaves(par1World, par3, par4 + var16, par5))
|
|
{
|
|
this.setBlockAndMetadata(par1World, par3, par4 + var16, par5, Block.wood.blockID, 2);
|
|
}
|