diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-11-20 00:01:14 -0800 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-11-20 00:01:33 -0800 |
commit | 345ea36c7bb3383c6e4825355d0043a646194eaa (patch) | |
tree | df116b57d92315c0a13c2fdc87d792b031c7239a /src/main/java/net/minecraft/server/WorldGenerator.java | |
parent | 589f66bd1b766dc1fdd737ee885304196a2ed86a (diff) | |
download | craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.gz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.lz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.xz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.zip |
Update for 1.0.0
Diffstat (limited to 'src/main/java/net/minecraft/server/WorldGenerator.java')
-rw-r--r-- | src/main/java/net/minecraft/server/WorldGenerator.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/WorldGenerator.java b/src/main/java/net/minecraft/server/WorldGenerator.java new file mode 100644 index 00000000..7ed5f7e8 --- /dev/null +++ b/src/main/java/net/minecraft/server/WorldGenerator.java @@ -0,0 +1,31 @@ +package net.minecraft.server; + +import java.util.Random; + +import org.bukkit.BlockChangeDelegate; // CraftBukkit + +public abstract class WorldGenerator { + + private final boolean a; + + public WorldGenerator() { + this.a = false; + } + + public WorldGenerator(boolean flag) { + this.a = flag; + } + + public abstract boolean a(World world, Random random, int i, int j, int k); + + public void a(double d0, double d1, double d2) {} + + // CraftBukkit -- change signature + protected void a(BlockChangeDelegate world, int i, int j, int k, int l, int i1) { + if (this.a) { + ((World) world).setTypeIdAndData(i, j, k, l, i1); // CraftBukkit -- force-cast to world to get it working + } else { + world.setRawTypeIdAndData(i, j, k, l, i1); + } + } +} |