Moved folders to match Maven layout

Updated to FC-0.9
This commit is contained in:
tastybento 2018-08-09 06:03:57 +09:00
parent 27851d2982
commit a6acb4f1cf
5 changed files with 27 additions and 6 deletions

View File

@ -153,7 +153,7 @@
<dependency>
<groupId>world.bentobox</groupId>
<artifactId>bentobox</artifactId>
<version>FC-0.81</version>
<version>FC-0.9</version>
</dependency>
<dependency>

View File

@ -11,6 +11,7 @@ import java.util.Set;
import org.bukkit.Difficulty;
import org.bukkit.GameMode;
import org.bukkit.block.Biome;
import org.bukkit.entity.EntityType;
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")
@ConfigEntry(path = "world.default-game-mode")
private GameMode defaultGameMode = GameMode.SURVIVAL;
@ConfigComment("The default biome for the overworld")
@ConfigEntry(path = "world.default-biome")
private Biome defaultBiome = Biome.PLAINS;
// Nether
@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 default biome
*/
public Biome getDefaultBiome() {
return defaultBiome;
}
/**
* @param defaultBiome the defaultBiome to set
*/
public void setDefaultBiome(Biome defaultBiome) {
this.defaultBiome = defaultBiome;
}
}

View File

@ -24,11 +24,11 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
PerlinOctaveGenerator gen;
/**
* @param plugin - BSkyBlock plugin object
* @param addon - BSkyBlock object
*/
public ChunkGeneratorWorld(BSkyBlock plugin) {
public ChunkGeneratorWorld(BSkyBlock addon) {
super();
this.plugin = plugin;
this.plugin = addon;
}
@Override
@ -40,8 +40,12 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
if (plugin.getSettings().getSeaHeight() != 0) {
for (int x = 0; x < 16; x++) {
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++) {
result.setBlock(x, y, z, Material.WATER);
}
}
}
@ -50,8 +54,6 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
return result;
}
// This needs to be set to return true to override minecraft's default
// behavior
@Override
public boolean canSpawn(World world, int x, int z) {
return true;