summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-06-06 21:12:03 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-06-06 21:12:03 +0100
commitd40c690c8f5fe2fa351f9d6dde3c4a9851366222 (patch)
tree7dbd48d76d5e84143eb6228da49b5aec81053c81
parentfedcbdf256e29df3300639e4a9fa97fd04cd4108 (diff)
downloadcraftbukkit-d40c690c8f5fe2fa351f9d6dde3c4a9851366222.tar
craftbukkit-d40c690c8f5fe2fa351f9d6dde3c4a9851366222.tar.gz
craftbukkit-d40c690c8f5fe2fa351f9d6dde3c4a9851366222.tar.lz
craftbukkit-d40c690c8f5fe2fa351f9d6dde3c4a9851366222.tar.xz
craftbukkit-d40c690c8f5fe2fa351f9d6dde3c4a9851366222.zip
Fix for generator stuff now being class
-rw-r--r--src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java37
3 files changed, 37 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
index 3103c5e9..bb27d75c 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
@@ -10,7 +10,7 @@ import net.minecraft.server.WorldServer;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.ChunkGenerator;
-public class CustomChunkGenerator implements InternalChunkGenerator {
+public class CustomChunkGenerator extends InternalChunkGenerator {
private final ChunkGenerator generator;
private final WorldServer world;
private final long seed;
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java
index d98c5e66..e5ee52b5 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java
@@ -4,6 +4,6 @@ package org.bukkit.craftbukkit.generator;
import net.minecraft.server.IChunkProvider;
import org.bukkit.generator.ChunkGenerator;
-public interface InternalChunkGenerator extends ChunkGenerator, IChunkProvider {
+public abstract class InternalChunkGenerator extends ChunkGenerator implements IChunkProvider {
}
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java
index 2e83fa5c..6ab09541 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java
@@ -3,14 +3,19 @@ package org.bukkit.craftbukkit.generator;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
+import net.minecraft.server.Chunk;
import net.minecraft.server.ChunkProviderGenerate;
+import net.minecraft.server.IChunkProvider;
+import net.minecraft.server.IProgressUpdate;
import net.minecraft.server.World;
import org.bukkit.craftbukkit.CraftWorld;
import org.bukkit.generator.BlockPopulator;
-public class NormalChunkGenerator extends ChunkProviderGenerate implements InternalChunkGenerator {
+public class NormalChunkGenerator extends InternalChunkGenerator {
+ private final ChunkProviderGenerate provider;
+
public NormalChunkGenerator(World world, long seed) {
- super(world, seed);
+ provider = new ChunkProviderGenerate(world, seed);
}
public byte[] generate(org.bukkit.World world, Random random, int x, int z) {
@@ -24,4 +29,32 @@ public class NormalChunkGenerator extends ChunkProviderGenerate implements Inter
public List<BlockPopulator> getDefaultPopulators(org.bukkit.World world) {
return new ArrayList<BlockPopulator>();
}
+
+ public boolean isChunkLoaded(int i, int i1) {
+ return provider.isChunkLoaded(i, i1);
+ }
+
+ public Chunk getOrCreateChunk(int i, int i1) {
+ return provider.getOrCreateChunk(i, i1);
+ }
+
+ public Chunk getChunkAt(int i, int i1) {
+ return provider.getChunkAt(i, i1);
+ }
+
+ public void getChunkAt(IChunkProvider icp, int i, int i1) {
+ provider.getChunkAt(icp, i, i1);
+ }
+
+ public boolean saveChunks(boolean bln, IProgressUpdate ipu) {
+ return provider.saveChunks(bln, ipu);
+ }
+
+ public boolean unloadChunks() {
+ return provider.unloadChunks();
+ }
+
+ public boolean b() {
+ return provider.b();
+ }
}