3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00

Fix for generator stuff now being class

Dieser Commit ist enthalten in:
Dinnerbone 2011-06-06 21:12:03 +01:00
Ursprung fedcbdf256
Commit d40c690c8f
3 geänderte Dateien mit 37 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -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;

Datei anzeigen

@ -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 {
}

Datei anzeigen

@ -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();
}
}