Fixed the Nether Bushes and Nether Grass Generation from causing crashes

This commit is contained in:
Adubbz 2013-05-26 17:17:11 +10:00
parent 3a415cce9c
commit b639694ad5
2 changed files with 15 additions and 15 deletions

View file

@ -41,11 +41,11 @@ public class WorldGenNetherBush extends WorldGenerator
var1.setBlock(var3, var4, var5, Block.netherrack.blockID); var1.setBlock(var3, var4, var5, Block.netherrack.blockID);
this.setBlockAndMetadata(var1, var3, var4 + 1, var5, Blocks.logs4.get().blockID, 1); this.setBlockAndMetadata(var1, var3, var4 + 1, var5, Blocks.logs4.get().blockID, 1);
this.setBlockAndMetadata(var1, var3, var4 + 2, var5, Blocks.logs4.get().blockID, 1); this.setBlockAndMetadata(var1, var3, var4 + 2, var5, Blocks.logs4.get().blockID, 1);
this.setBlockAndMetadata(var1, var3 + 1, var4 + 2, var5, Blocks.leavesColorized.get().blockID, 6); this.setBlockAndMetadata(var1, var3 + 1, var4 + 2, var5, Blocks.leaves2.get().blockID, 4);
this.setBlockAndMetadata(var1, var3 - 1, var4 + 2, var5, Blocks.leavesColorized.get().blockID, 6); this.setBlockAndMetadata(var1, var3 - 1, var4 + 2, var5, Blocks.leaves2.get().blockID, 4);
this.setBlockAndMetadata(var1, var3, var4 + 2, var5 + 1, Blocks.leavesColorized.get().blockID, 6); this.setBlockAndMetadata(var1, var3, var4 + 2, var5 + 1, Blocks.leaves2.get().blockID, 4);
this.setBlockAndMetadata(var1, var3, var4 + 2, var5 - 1, Blocks.leavesColorized.get().blockID, 6); this.setBlockAndMetadata(var1, var3, var4 + 2, var5 - 1, Blocks.leaves2.get().blockID, 4);
this.setBlockAndMetadata(var1, var3, var4 + 3, var5, Blocks.leavesColorized.get().blockID, 6); this.setBlockAndMetadata(var1, var3, var4 + 3, var5, Blocks.leaves2.get().blockID, 4);
return true; return true;
} }
} }

View file

@ -65,23 +65,23 @@ public class WorldGenNetherGrass extends WorldGenerator
} }
if (par1World.isAirBlock(var8 + 1, var9 + 1, var10)) if (par1World.isAirBlock(var8 + 1, var9 + 1, var10))
{ {
par1World.setBlock(var8 + 1, var9 + 1, var10, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8 + 1, var9 + 1, var10, Blocks.leaves2.get().blockID, 4, 2);
} }
if (par1World.isAirBlock(var8 - 1, var9 + 1, var10)) if (par1World.isAirBlock(var8 - 1, var9 + 1, var10))
{ {
par1World.setBlock(var8 - 1, var9 + 1, var10, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8 - 1, var9 + 1, var10, Blocks.leaves2.get().blockID, 4, 2);
} }
if (par1World.isAirBlock(var8, var9 + 1, var10 + 1)) if (par1World.isAirBlock(var8, var9 + 1, var10 + 1))
{ {
par1World.setBlock(var8, var9 + 1, var10 + 1, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8, var9 + 1, var10 + 1, Blocks.leaves2.get().blockID, 4, 2);
} }
if (par1World.isAirBlock(var8, var9 + 1, var10 - 1)) if (par1World.isAirBlock(var8, var9 + 1, var10 - 1))
{ {
par1World.setBlock(var8, var9 + 1, var10 - 1, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8, var9 + 1, var10 - 1, Blocks.leaves2.get().blockID, 4, 2);
} }
if (par1World.isAirBlock(var8, var9 + 2, var10)) if (par1World.isAirBlock(var8, var9 + 2, var10))
{ {
par1World.setBlock(var8, var9 + 2, var10, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8, var9 + 2, var10, Blocks.leaves2.get().blockID, 4, 2);
} }
} }
@ -94,23 +94,23 @@ public class WorldGenNetherGrass extends WorldGenerator
} }
if (par1World.isAirBlock(var8 + 1, var9 + 1, var10)) if (par1World.isAirBlock(var8 + 1, var9 + 1, var10))
{ {
par1World.setBlock(var8 + 1, var9 + 1, var10, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8 + 1, var9 + 1, var10, Blocks.leaves2.get().blockID, 4, 2);
} }
if (par1World.isAirBlock(var8 - 1, var9 + 1, var10)) if (par1World.isAirBlock(var8 - 1, var9 + 1, var10))
{ {
par1World.setBlock(var8 - 1, var9 + 1, var10, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8 - 1, var9 + 1, var10, Blocks.leaves2.get().blockID, 4, 2);
} }
if (par1World.isAirBlock(var8, var9 + 1, var10 + 1)) if (par1World.isAirBlock(var8, var9 + 1, var10 + 1))
{ {
par1World.setBlock(var8, var9 + 1, var10 + 1, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8, var9 + 1, var10 + 1, Blocks.leaves2.get().blockID, 4, 2);
} }
if (par1World.isAirBlock(var8, var9 + 1, var10 - 1)) if (par1World.isAirBlock(var8, var9 + 1, var10 - 1))
{ {
par1World.setBlock(var8, var9 + 1, var10 - 1, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8, var9 + 1, var10 - 1, Blocks.leaves2.get().blockID, 4, 2);
} }
if (par1World.isAirBlock(var8, var9 + 2, var10)) if (par1World.isAirBlock(var8, var9 + 2, var10))
{ {
par1World.setBlock(var8, var9 + 2, var10, Blocks.leavesColorized.get().blockID, 6, 2); par1World.setBlock(var8, var9 + 2, var10, Blocks.leaves2.get().blockID, 4, 2);
} }
} }
} }