Created
December 2, 2010 22:32
-
-
Save MostAwesomeDude/726223 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/beta/plugins/generators.py b/beta/plugins/generators.py | |
index 2412c8e..b0fd832 100644 | |
--- a/beta/plugins/generators.py | |
+++ b/beta/plugins/generators.py | |
@@ -22,8 +22,10 @@ class BoringGenerator(object): | |
Fill the bottom half of the chunk with stone. | |
""" | |
+ stone = blocks["stone"].slot | |
+ | |
for x, y, z in product(xrange(16), xrange(64), xrange(16)): | |
- chunk.set_block((x, y, z), blocks["stone"].slot) | |
+ chunk.set_block((x, y, z), stone) | |
name = "boring" | |
@@ -44,6 +46,8 @@ class SimplexGenerator(object): | |
reseed(seed) | |
+ stone = blocks["stone"].slot | |
+ | |
# And into one end he plugged the whole of reality as extrapolated | |
# from a piece of fairy cake, and into the other end he plugged his | |
# wife: so that when he turned it on she saw in one instant the whole | |
@@ -61,7 +65,7 @@ class SimplexGenerator(object): | |
height *= scale * 30 | |
height += 70 | |
for y in xrange(int(height)): | |
- chunk.set_block((x, y, z), blocks["stone"].slot) | |
+ chunk.set_block((x, y, z), stone) | |
name = "simplex" | |
@@ -77,9 +81,12 @@ class WaterTableGenerator(object): | |
Generate a flat water table halfway up the map. | |
""" | |
+ air = blocks["air"].slot | |
+ spring = blocks["spring"].slot | |
+ | |
for x, y, z in product(xrange(16), xrange(64), xrange(16)): | |
- if chunk.get_block((x, y, z)) == blocks["air"].slot: | |
- chunk.set_block((x, y, z), blocks["spring"].slot) | |
+ if chunk.get_block((x, y, z)) == air: | |
+ chunk.set_block((x, y, z), spring) | |
name = "watertable" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment