diff options
author | iouter <62897714+iouter@users.noreply.github.com> | 2022-01-07 12:36:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-07 12:36:06 +0800 |
commit | 0834d4b8b45a881f36ed5b295ac0fb38df49fa9a (patch) | |
tree | 6fb4a45cf17dd22748148417bc7bb0efb850cea3 /src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java | |
parent | ea1439a4195c8f77c45625ea2593a232bf19984e (diff) | |
parent | 9b2e050151ad93170e84321d067d1e9d4ded4ba5 (diff) | |
download | GT5-Unofficial-0834d4b8b45a881f36ed5b295ac0fb38df49fa9a.tar.gz GT5-Unofficial-0834d4b8b45a881f36ed5b295ac0fb38df49fa9a.tar.bz2 GT5-Unofficial-0834d4b8b45a881f36ed5b295ac0fb38df49fa9a.zip |
Merge branch 'GTNewHorizons:master' into master
Diffstat (limited to 'src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java')
-rw-r--r-- | src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java b/src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java new file mode 100644 index 0000000000..0314f71eec --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/gen/WorldGenDeadLilly.java @@ -0,0 +1,28 @@ +package gtPlusPlus.everglades.gen; + +import java.util.Random; + +import net.minecraft.init.Blocks; +import net.minecraft.world.World; +import net.minecraft.world.gen.feature.WorldGenWaterlily; + +public class WorldGenDeadLilly extends WorldGenWaterlily { + + @Override + public boolean generate(World world, Random rand, int x, int y, int z) + { + for (int l = 0; l < 10; ++l) + { + int i1 = x + rand.nextInt(8) - rand.nextInt(8); + int j1 = y + rand.nextInt(4) - rand.nextInt(4); + int k1 = z + rand.nextInt(8) - rand.nextInt(8); + + if (world.isAirBlock(i1, j1, k1) && Blocks.waterlily.canPlaceBlockAt(world, i1, j1, k1)) + { + world.setBlock(i1, j1, k1, Blocks.waterlily, 0, 2); + } + } + + return true; + } +}
\ No newline at end of file |