mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2024-11-24 03:25:20 +01:00
Adds variable sea heights to overworld/nether/end.
Implements ban limit settings (new WorldSettings interface) Also cleans up config file with better comments. https://github.com/BentoBoxWorld/AcidIsland/issues/13
This commit is contained in:
parent
e58b499f84
commit
8e18923b81
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,3 +3,7 @@
|
|||||||
bin/
|
bin/
|
||||||
*.class
|
*.class
|
||||||
/target/
|
/target/
|
||||||
|
/.classpath
|
||||||
|
/.DS_Store
|
||||||
|
/.project
|
||||||
|
/.gitignore
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -28,16 +28,22 @@ public class AcidIsland extends GameModeAddon {
|
|||||||
private static final String NETHER = "_nether";
|
private static final String NETHER = "_nether";
|
||||||
private static final String THE_END = "_the_end";
|
private static final String THE_END = "_the_end";
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLoad() {
|
public void onLoad() {
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
// Load settings
|
// Load settings
|
||||||
settings = new Config<>(this, AISettings.class).loadConfigObject();
|
settings = new Config<>(this, AISettings.class).loadConfigObject();
|
||||||
|
if (settings == null) {
|
||||||
|
// Woops
|
||||||
|
this.logError("Settings could not load! Addon disabled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
if (settings == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Register listeners
|
// Register listeners
|
||||||
PluginManager manager = getServer().getPluginManager();
|
PluginManager manager = getServer().getPluginManager();
|
||||||
// Acid Effects
|
// Acid Effects
|
||||||
@ -52,6 +58,9 @@ public class AcidIsland extends GameModeAddon {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable(){
|
public void onDisable(){
|
||||||
|
if (settings == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
acidTask.cancelTasks();
|
acidTask.cancelTasks();
|
||||||
// Save settings
|
// Save settings
|
||||||
if (settings != null) {
|
if (settings != null) {
|
||||||
|
@ -36,14 +36,15 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
|
|||||||
if (world.getEnvironment().equals(World.Environment.NETHER)) {
|
if (world.getEnvironment().equals(World.Environment.NETHER)) {
|
||||||
return generateNetherChunks(world, random, chunkX, chunkZ, biomeGrid);
|
return generateNetherChunks(world, random, chunkX, chunkZ, biomeGrid);
|
||||||
}
|
}
|
||||||
|
int seaHeight = world.getEnvironment().equals(World.Environment.NORMAL) ? addon.getSettings().getSeaHeight() : addon.getSettings().getEndSeaHeight();
|
||||||
ChunkData result = createChunkData(world);
|
ChunkData result = createChunkData(world);
|
||||||
if (addon.getSettings().getSeaHeight() != 0) {
|
if (seaHeight != 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)) {
|
if (world.getEnvironment().equals(Environment.NORMAL)) {
|
||||||
biomeGrid.setBiome(x, z, addon.getSettings().getDefaultBiome());
|
biomeGrid.setBiome(x, z, addon.getSettings().getDefaultBiome());
|
||||||
}
|
}
|
||||||
for (int y = 0; y < addon.getSettings().getSeaHeight(); y++) {
|
for (int y = 0; y < seaHeight; y++) {
|
||||||
result.setBlock(x, y, z, Material.WATER);
|
result.setBlock(x, y, z, Material.WATER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -79,7 +80,7 @@ public class ChunkGeneratorWorld extends ChunkGenerator {
|
|||||||
if (addon.getSettings().getSeaHeight() != 0) {
|
if (addon.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++) {
|
||||||
for (int y = 0; y < addon.getSettings().getSeaHeight(); y++) {
|
for (int y = 0; y < addon.getSettings().getNetherSeaHeight(); y++) {
|
||||||
result.setBlock(x, y, z, Material.WATER);
|
result.setBlock(x, y, z, Material.WATER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# AcidIsland Configuration
|
# AcidIsland Configuration [version]
|
||||||
# This config file is dynamic and saved when the server is shutdown.
|
# This config file is dynamic and saved when the server is shutdown.
|
||||||
# You cannot edit it while the server is running because changes will
|
# You cannot edit it while the server is running because changes will
|
||||||
# be lost! Use in-game settings GUI or edit when server is offline.
|
# be lost! Use in-game settings GUI or edit when server is offline.
|
||||||
@ -70,8 +70,6 @@ world:
|
|||||||
use-own-generator: false
|
use-own-generator: false
|
||||||
# Sea height (don't changes this mid-game unless you delete the world)
|
# Sea height (don't changes this mid-game unless you delete the world)
|
||||||
# Minimum is 0, which means you are playing Skyblock!
|
# Minimum is 0, which means you are playing Skyblock!
|
||||||
# If sea height is less than about 10, then players will drop right through it
|
|
||||||
# if it exists. Makes for an interesting variation on skyblock.
|
|
||||||
sea-height: 55
|
sea-height: 55
|
||||||
# Maximum number of islands in the world. Set to -1 or 0 for unlimited.
|
# Maximum number of islands in the world. Set to -1 or 0 for unlimited.
|
||||||
# If the number of islands is greater than this number, no new island will be created.
|
# If the number of islands is greater than this number, no new island will be created.
|
||||||
@ -81,6 +79,10 @@ world:
|
|||||||
default-game-mode: SURVIVAL
|
default-game-mode: SURVIVAL
|
||||||
# The default biome for the overworld
|
# The default biome for the overworld
|
||||||
default-biome: WARM_OCEAN
|
default-biome: WARM_OCEAN
|
||||||
|
# The maximum number of players a player can ban at any one time in this game mode.
|
||||||
|
# The permission acidisland.ban.maxlimit.X where X is a number can also be used per player
|
||||||
|
# -1 = unlimited
|
||||||
|
ban-limit: -1
|
||||||
nether:
|
nether:
|
||||||
# Generate Nether - if this is false, the nether world will not be made and access to
|
# Generate Nether - if this is false, the nether world will not be made and access to
|
||||||
# the nether will not occur. Other plugins may still enable portal usage.
|
# the nether will not occur. Other plugins may still enable portal usage.
|
||||||
@ -90,6 +92,9 @@ world:
|
|||||||
generate: true
|
generate: true
|
||||||
# Islands in Nether. Change to false for standard vanilla nether.
|
# Islands in Nether. Change to false for standard vanilla nether.
|
||||||
islands: true
|
islands: true
|
||||||
|
# Sea height in Nether. Only operates if nether islands is true.
|
||||||
|
# Changing mid-game will cause problems!
|
||||||
|
sea-height: 55
|
||||||
# Nether trees are made if a player grows a tree in the nether (gravel and glowstone)
|
# Nether trees are made if a player grows a tree in the nether (gravel and glowstone)
|
||||||
# Applies to both vanilla and islands Nether
|
# Applies to both vanilla and islands Nether
|
||||||
trees: true
|
trees: true
|
||||||
@ -103,8 +108,14 @@ world:
|
|||||||
# Only applies to vanilla nether
|
# Only applies to vanilla nether
|
||||||
spawn-radius: 25
|
spawn-radius: 25
|
||||||
end:
|
end:
|
||||||
|
# End Nether - if this is false, the end world will not be made and access to
|
||||||
|
# the end will not occur. Other plugins may still enable portal usage.
|
||||||
generate: true
|
generate: true
|
||||||
|
# Islands in The End. Change to false for standard vanilla end.
|
||||||
islands: true
|
islands: true
|
||||||
|
# Sea height in The End. Only operates if end islands is true.
|
||||||
|
# Changing mid-game will cause problems!
|
||||||
|
sea-height: 55
|
||||||
# /!\ This feature is experimental and might not work as expected or might not work at all.
|
# /!\ This feature is experimental and might not work as expected or might not work at all.
|
||||||
dragon-spawn: false
|
dragon-spawn: false
|
||||||
# Removing mobs - this kills all monsters in the vicinity. Benefit is that it helps
|
# Removing mobs - this kills all monsters in the vicinity. Benefit is that it helps
|
||||||
@ -112,10 +123,10 @@ world:
|
|||||||
# This setting is toggled in world flags and set by the settings GUI.
|
# This setting is toggled in world flags and set by the settings GUI.
|
||||||
# Mob white list - these mobs will NOT be removed when logging in or doing /island
|
# Mob white list - these mobs will NOT be removed when logging in or doing /island
|
||||||
remove-mobs-whitelist:
|
remove-mobs-whitelist:
|
||||||
- WITHER
|
|
||||||
- ZOMBIE_VILLAGER
|
|
||||||
- PIG_ZOMBIE
|
- PIG_ZOMBIE
|
||||||
- ENDERMAN
|
- ENDERMAN
|
||||||
|
- ZOMBIE_VILLAGER
|
||||||
|
- WITHER
|
||||||
# World flags. These are boolean settings for various flags for this world
|
# World flags. These are boolean settings for various flags for this world
|
||||||
flags:
|
flags:
|
||||||
CREEPER_DAMAGE: true
|
CREEPER_DAMAGE: true
|
||||||
@ -143,29 +154,29 @@ world:
|
|||||||
DOOR: 500
|
DOOR: 500
|
||||||
FURNACE: 500
|
FURNACE: 500
|
||||||
ANVIL: 500
|
ANVIL: 500
|
||||||
FIRE: 500
|
|
||||||
FISH_SCOOPING: 500
|
FISH_SCOOPING: 500
|
||||||
|
FIRE: 500
|
||||||
END_PORTAL: 500
|
END_PORTAL: 500
|
||||||
BREEDING: 500
|
BREEDING: 500
|
||||||
TNT: 500
|
|
||||||
HURT_VILLAGERS: 500
|
HURT_VILLAGERS: 500
|
||||||
|
TNT: 500
|
||||||
FROST_WALKER: 500
|
FROST_WALKER: 500
|
||||||
TURTLE_EGGS: 500
|
TURTLE_EGGS: 500
|
||||||
COLLECT_LAVA: 500
|
COLLECT_LAVA: 500
|
||||||
LEVER: 500
|
LEVER: 500
|
||||||
RIDING: 500
|
RIDING: 500
|
||||||
HURT_MONSTERS: 0
|
HURT_MONSTERS: 0
|
||||||
NAME_TAG: 500
|
|
||||||
ARMOR_STAND: 500
|
ARMOR_STAND: 500
|
||||||
|
NAME_TAG: 500
|
||||||
TRADING: 0
|
TRADING: 0
|
||||||
EGGS: 500
|
EGGS: 500
|
||||||
ITEM_DROP: 0
|
ITEM_DROP: 0
|
||||||
CHEST: 500
|
|
||||||
NOTE_BLOCK: 0
|
NOTE_BLOCK: 0
|
||||||
NETHER_PORTAL: 500
|
NETHER_PORTAL: 500
|
||||||
ITEM_PICKUP: 0
|
|
||||||
CROP_TRAMPLE: 500
|
CROP_TRAMPLE: 500
|
||||||
|
ITEM_PICKUP: 0
|
||||||
BREWING: 500
|
BREWING: 500
|
||||||
|
DROPPER: 500
|
||||||
COLLECT_WATER: 500
|
COLLECT_WATER: 500
|
||||||
BUTTON: 500
|
BUTTON: 500
|
||||||
FIRE_EXTINGUISH: 500
|
FIRE_EXTINGUISH: 500
|
||||||
@ -173,18 +184,22 @@ world:
|
|||||||
TRAPDOOR: 500
|
TRAPDOOR: 500
|
||||||
PRESSURE_PLATE: 0
|
PRESSURE_PLATE: 0
|
||||||
PLACE_BLOCKS: 500
|
PLACE_BLOCKS: 500
|
||||||
|
ITEM_FRAME: 500
|
||||||
CRAFTING: 0
|
CRAFTING: 0
|
||||||
ENCHANTING: 0
|
ENCHANTING: 0
|
||||||
SHEARING: 500
|
SHEARING: 500
|
||||||
SPAWN_EGGS: 500
|
|
||||||
BED: 500
|
BED: 500
|
||||||
|
SPAWN_EGGS: 500
|
||||||
MILKING: 0
|
MILKING: 0
|
||||||
|
DISPENSER: 500
|
||||||
GATE: 0
|
GATE: 0
|
||||||
EXPERIENCE_PICKUP: 500
|
EXPERIENCE_PICKUP: 500
|
||||||
|
HOPPER: 500
|
||||||
LEASH: 500
|
LEASH: 500
|
||||||
MOUNT_INVENTORY: 500
|
|
||||||
BREAK_BLOCKS: 500
|
BREAK_BLOCKS: 500
|
||||||
|
MOUNT_INVENTORY: 500
|
||||||
CHORUS_FRUIT: 500
|
CHORUS_FRUIT: 500
|
||||||
|
CONTAINER: 500
|
||||||
JUKEBOX: 500
|
JUKEBOX: 500
|
||||||
# These are the default settings for new islands
|
# These are the default settings for new islands
|
||||||
default-island-settings:
|
default-island-settings:
|
||||||
|
Loading…
Reference in New Issue
Block a user