Archiviert
13
0

fixed environments

Dieser Commit ist enthalten in:
Tahg 2011-06-03 18:35:05 -04:00
Ursprung ebc478388c
Commit 5f684ef163
2 geänderte Dateien mit 11 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -47,7 +47,7 @@ public class World implements IBlockAccess {
public int spawnMonsters;
public Random random = new Random();
public boolean s = false;
public final WorldProvider worldProvider;
public WorldProvider worldProvider; // Craftbukkit - remove final
protected List u = new ArrayList();
public IChunkProvider chunkProvider; // CraftBukkit - protected -> public
protected final IDataManager w;

Datei anzeigen

@ -26,7 +26,7 @@ import org.bukkit.World;
public class CraftWorld implements World {
private final WorldServer world;
private final Environment environment;
private Environment environment;
private final CraftServer server;
private final ChunkProviderServer provider;
private HashMap<Integer,CraftChunk> unloadedChunks = new HashMap<Integer, CraftChunk>();
@ -38,11 +38,7 @@ public class CraftWorld implements World {
this.server = world.getServer();
this.provider = world.chunkProviderServer;
if (world.worldProvider instanceof WorldProviderHell) {
environment = Environment.NETHER;
} else {
environment = Environment.NORMAL;
}
environment = Environment.getEnvironment(world.worldProvider.dimension);
server.addWorld(this);
}
@ -444,6 +440,13 @@ public class CraftWorld implements World {
return environment;
}
public void setEnvironment(Environment env) {
if (environment != env) {
environment = env;
world.worldProvider = WorldProvider.a(environment.getId());
}
}
public Block getBlockAt(Location location) {
return getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
}