diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2014-05-21 18:48:35 +0300 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2014-05-21 18:48:35 +0300 |
| commit | 27b6d250ba6005bfa9cdd9d291e0656f5e02fa65 (patch) | |
| tree | 89fd6b927e3cdd9391a2479cfa08dee2bda1c15e /src/main/java/darkknight/jewelrycraft/worldGen/Generation.java | |
| parent | 2b4aedb9fb90e02c8ec89130919fb9cfae82770c (diff) | |
Liquids!
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/worldGen/Generation.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/worldGen/Generation.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/worldGen/Generation.java b/src/main/java/darkknight/jewelrycraft/worldGen/Generation.java index f484c0b..9ff79ab 100644 --- a/src/main/java/darkknight/jewelrycraft/worldGen/Generation.java +++ b/src/main/java/darkknight/jewelrycraft/worldGen/Generation.java @@ -2,6 +2,7 @@ package darkknight.jewelrycraft.worldGen; import java.util.Random; +import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import cpw.mods.fml.common.IWorldGenerator; @@ -37,7 +38,8 @@ public class Generation implements IWorldGenerator int y = 5 + random.nextInt(4); int z = j + random.nextInt(16); world.setBlock(x, y, z, BlockList.shadowOre); - if(random.nextInt(3) == 0) world.setBlock(x + random.nextInt(2), y + random.nextInt(1), z + random.nextInt(2), BlockList.shadowOre); + int randX = random.nextInt(2), randY = random.nextInt(1), randZ = random.nextInt(2); + if(random.nextInt(3) == 0 && world.getBlock(x + randX, y + randY, z + randZ) == Blocks.stone) world.setBlock(x + randX, y + randY, z + randZ, BlockList.shadowOre); } } |
