Skip to content

Commit

Permalink
Expose BentoBox 1.16 portal generation mechanics.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Mar 15, 2021
1 parent de029f9 commit 9e34cb7
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
43 changes: 43 additions & 0 deletions src/main/java/world/bentobox/skygrid/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.nether.blocks")
private Map<Material, Integer> netherBlocks = new EnumMap<>(Material.class);

@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("Generate SkyGrid End - if this is false, the end world will not be made")
@ConfigEntry(path = "world.end.generate")
Expand All @@ -101,6 +107,11 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.end.blocks")
private Map<Material, Integer> endBlocks = new EnumMap<>(Material.class);

@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;

/* SkyGrid */
@ConfigComment("Biomes - this will affect some block types and tree types.")
@ConfigEntry(path = "world.create-biomes")
Expand Down Expand Up @@ -1493,4 +1504,36 @@ public String getDefaultPlayerAction() {
public void setDefaultPlayerAction(String defaultPlayerAction) {
this.defaultPlayerAction = defaultPlayerAction;
}

/**
* @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;
}
}
10 changes: 8 additions & 2 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,11 @@ world:
GILDED_BLACKSTONE: 10
SOUL_SOIL: 80
NETHER_GOLD_ORE: 12


# 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:
# Generate SkyGrid End - if this is false, the end world will not be made
generate: true
Expand All @@ -706,7 +710,9 @@ world:
GRAVEL: 10
SPAWNER: 1
PURPUR_BLOCK: 50

# 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
# Biomes - this will affect some block types and tree types.
create-biomes: true
# The probability of a frame being created in a chunk. Frames are always at y=0.
Expand Down

0 comments on commit 9e34cb7

Please sign in to comment.