parent
27851d2982
commit
a6acb4f1cf
2
pom.xml
2
pom.xml
|
@ -153,7 +153,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>world.bentobox</groupId>
|
<groupId>world.bentobox</groupId>
|
||||||
<artifactId>bentobox</artifactId>
|
<artifactId>bentobox</artifactId>
|
||||||
<version>FC-0.81</version>
|
<version>FC-0.9</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -11,6 +11,7 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.bukkit.Difficulty;
|
import org.bukkit.Difficulty;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
|
import org.bukkit.block.Biome;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
|
|
||||||
import world.bentobox.bentobox.api.addons.Addon;
|
import world.bentobox.bentobox.api.addons.Addon;
|
||||||
|
@ -129,6 +130,10 @@ public class Settings implements DataObject, WorldSettings {
|
||||||
@ConfigComment("a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR")
|
@ConfigComment("a new island for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR")
|
||||||
@ConfigEntry(path = "world.default-game-mode")
|
@ConfigEntry(path = "world.default-game-mode")
|
||||||
private GameMode defaultGameMode = GameMode.SURVIVAL;
|
private GameMode defaultGameMode = GameMode.SURVIVAL;
|
||||||
|
|
||||||
|
@ConfigComment("The default biome for the overworld")
|
||||||
|
@ConfigEntry(path = "world.default-biome")
|
||||||
|
private Biome defaultBiome = Biome.PLAINS;
|
||||||
|
|
||||||
// Nether
|
// Nether
|
||||||
@ConfigComment("Generate Nether - if this is false, the nether world will not be made and access to")
|
@ConfigComment("Generate Nether - if this is false, the nether world will not be made and access to")
|
||||||
|
@ -1167,5 +1172,19 @@ public class Settings implements DataObject, WorldSettings {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return default biome
|
||||||
|
*/
|
||||||
|
public Biome getDefaultBiome() {
|
||||||
|
return defaultBiome;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param defaultBiome the defaultBiome to set
|
||||||
|
*/
|
||||||
|
public void setDefaultBiome(Biome defaultBiome) {
|
||||||
|
this.defaultBiome = defaultBiome;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -24,11 +24,11 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
|
||||||
PerlinOctaveGenerator gen;
|
PerlinOctaveGenerator gen;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param plugin - BSkyBlock plugin object
|
* @param addon - BSkyBlock object
|
||||||
*/
|
*/
|
||||||
public ChunkGeneratorWorld(BSkyBlock plugin) {
|
public ChunkGeneratorWorld(BSkyBlock addon) {
|
||||||
super();
|
super();
|
||||||
this.plugin = plugin;
|
this.plugin = addon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -40,8 +40,12 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
|
||||||
if (plugin.getSettings().getSeaHeight() != 0) {
|
if (plugin.getSettings().getSeaHeight() != 0) {
|
||||||
for (int x = 0; x < 16; x++) {
|
for (int x = 0; x < 16; x++) {
|
||||||
for (int z = 0; z < 16; z++) {
|
for (int z = 0; z < 16; z++) {
|
||||||
|
if (world.getEnvironment().equals(Environment.NORMAL)) {
|
||||||
|
biomeGrid.setBiome(x, z, plugin.getSettings().getDefaultBiome());
|
||||||
|
}
|
||||||
for (int y = 0; y < plugin.getSettings().getSeaHeight(); y++) {
|
for (int y = 0; y < plugin.getSettings().getSeaHeight(); y++) {
|
||||||
result.setBlock(x, y, z, Material.WATER);
|
result.setBlock(x, y, z, Material.WATER);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,8 +54,6 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This needs to be set to return true to override minecraft's default
|
|
||||||
// behavior
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canSpawn(World world, int x, int z) {
|
public boolean canSpawn(World world, int x, int z) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue