Skip to content

Commit

Permalink
Implements portal generation options (#407)
Browse files Browse the repository at this point in the history
BentoBox#1718
  • Loading branch information
BONNe authored Mar 16, 2021
1 parent 58ecd1c commit 718ec29
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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. -->
Expand Down
43 changes: 43 additions & 0 deletions src/main/java/world/bentobox/bskyblock/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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;

Expand Down Expand Up @@ -1734,4 +1745,36 @@ public Biome getDefaultEndBiome() {
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;
}
}
7 changes: 7 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,20 @@ 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.
generate: true
# 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
Expand Down

0 comments on commit 718ec29

Please sign in to comment.