Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
Correctly nullcheck biome types in //setbiome
Biome changing is no longer supported in SpoutAPI, will reimplement when I have time
Dieser Commit ist enthalten in:
Ursprung
5cab7900f6
Commit
7b0570f714
@ -129,6 +129,11 @@ public class BiomeCommands {
|
|||||||
EditSession editSession) throws WorldEditException {
|
EditSession editSession) throws WorldEditException {
|
||||||
|
|
||||||
final BiomeType target = we.getServer().getBiomes().get(args.getString(0));
|
final BiomeType target = we.getServer().getBiomes().get(args.getString(0));
|
||||||
|
if (target == null) {
|
||||||
|
player.printError("Biome '" + args.getString(0) + "' does not exist!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (args.hasFlag('p')) {
|
if (args.hasFlag('p')) {
|
||||||
Vector2D pos = player.getPosition().toVector2D();
|
Vector2D pos = player.getPosition().toVector2D();
|
||||||
player.getWorld().setBiome(pos, target);
|
player.getWorld().setBiome(pos, target);
|
||||||
|
@ -213,7 +213,8 @@ public class SpoutWorld extends LocalWorld {
|
|||||||
if (biome instanceof SpoutBiomeType &&
|
if (biome instanceof SpoutBiomeType &&
|
||||||
world.getGenerator() instanceof BiomeGenerator) {
|
world.getGenerator() instanceof BiomeGenerator) {
|
||||||
BiomeGenerator gen = (BiomeGenerator) world.getGenerator();
|
BiomeGenerator gen = (BiomeGenerator) world.getGenerator();
|
||||||
gen.setBiome(new Vector3(pt.getBlockX(), 0, pt.getBlockZ()), ((SpoutBiomeType) biome).getSpoutBiome());
|
throw new UnsupportedOperationException("Biome changing is not yet supported in Spout");
|
||||||
|
//gen.setBiome(new Vector3(pt.getBlockX(), 0, pt.getBlockZ()), ((SpoutBiomeType) biome).getSpoutBiome());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren