Implements portal generation options (#407)

BentoBox#1718
This commit is contained in:
BONNe 2021-03-16 21:33:55 +02:00 committed by GitHub
parent 58ecd1ce1f
commit 718ec2979e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 1 deletions

View File

@ -59,7 +59,7 @@
<powermock.version>2.0.2</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.16.1-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.14.0</bentobox.version>
<bentobox.version>1.16.0</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->

View File

@ -188,6 +188,12 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.nether.spawn-radius")
private int netherSpawnRadius = 32;
@ConfigComment("This option indicates if nether portals should be linked via dimensions.")
@ConfigComment("Option will simulate vanilla portal mechanics that links portals together")
@ConfigComment("or creates a new portal, if there is not a portal in that dimension.")
@ConfigEntry(path = "world.nether.create-and-link-portals", since = "1.16")
private boolean makeNetherPortals = false;
// End
@ConfigComment("End Nether - if this is false, the end world will not be made and access to")
@ConfigComment("the end will not occur. Other plugins may still enable portal usage.")
@ -198,6 +204,11 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.end.islands", needsReset = true)
private boolean endIslands = true;
@ConfigComment("This option indicates if obsidian platform in the end should be generated")
@ConfigComment("when player enters the end world.")
@ConfigEntry(path = "world.end.create-obsidian-platform", since = "1.16")
private boolean makeEndPortals = false;
@ConfigEntry(path = "world.end.dragon-spawn", experimental = true)
private boolean dragonSpawn = false;
@ -1734,4 +1745,36 @@ public class Settings implements WorldSettings {
public void setDefaultEndBiome(Biome defaultEndBiome) {
this.defaultEndBiome = defaultEndBiome;
}
/**
* @return the makeNetherPortals
*/
@Override
public boolean isMakeNetherPortals() {
return makeNetherPortals;
}
/**
* @return the makeEndPortals
*/
@Override
public boolean isMakeEndPortals() {
return makeEndPortals;
}
/**
* Sets make nether portals.
* @param makeNetherPortals the make nether portals
*/
public void setMakeNetherPortals(boolean makeNetherPortals) {
this.makeNetherPortals = makeNetherPortals;
}
/**
* Sets make end portals.
* @param makeEndPortals the make end portals
*/
public void setMakeEndPortals(boolean makeEndPortals) {
this.makeEndPortals = makeEndPortals;
}
}

View File

@ -116,6 +116,10 @@ world:
# Minimum is 0 (not recommended), maximum is 100. Default is 25.
# Only applies to vanilla nether
spawn-radius: 25
# This option indicates if nether portals should be linked via dimensions.
# Option will simulate vanilla portal mechanics that links portals together or creates a new portal, if there is not a portal in other dimension.
# Added since 1.16
create-and-link-portals: false
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.
@ -123,6 +127,9 @@ world:
# Islands in The End. Change to false for standard vanilla end.
# /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds.
islands: true
# This option indicates if obsidian platform in the end should be generated when player enters the end world.
# Added since 1.16
create-obsidian-platform: false
# /!\ This feature is experimental and might not work as expected or might not work at all.
dragon-spawn: false
# Mob white list - these mobs will NOT be removed when logging in or doing /island