Skip to content

Commit

Permalink
Merge pull request #64 from BentoBoxWorld/higher_end_portals
Browse files Browse the repository at this point in the history
Adds config to enable heigh setting of end-frames.
  • Loading branch information
tastybento authored Dec 22, 2023
2 parents c0d258d + d4bec7f commit 0e768a9
Show file tree
Hide file tree
Showing 3 changed files with 515 additions and 479 deletions.
19 changes: 19 additions & 0 deletions src/main/java/world/bentobox/skygrid/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.skygrid-height")
private int islandHeight = 128;

@ConfigComment("End Frame height")
@ConfigComment("This is the height where end frames will generate.")
@ConfigEntry(path = "world.end-frame-height", since = "1.20.0")
private int endFrameHeight = 3;

@ConfigComment("Space around new players in blocks (will be rounded up to nearest 16 blocks)")
@ConfigEntry(path = "world.space-around-players")
private int islandDistance = 1000;
Expand Down Expand Up @@ -1623,4 +1628,18 @@ public boolean isCheckForBlocks()
public void setMaxHomes(int maxHomes) {
this.maxHomes = maxHomes;
}

/**
* @return the endFrameHeight
*/
public int getEndFrameHeight() {
return endFrameHeight;
}

/**
* @param endFrameHeight the endFrameHeight to set
*/
public void setEndFrameHeight(int endFrameHeight) {
this.endFrameHeight = endFrameHeight;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private void makeEndPortal() {
if (xx == zz || (xx==1 && zz==5) || (xx==5 && zz==1) || (xx>1 && xx<5 && zz>1 && zz<5)) {
continue;
}
setFrame(xx, zz, chunk.getBlock(xx, 0, zz));
setFrame(xx, zz, chunk.getBlock(xx, addon.getSettings().getEndFrameHeight(), zz));
}
}
}
Expand Down
Loading

0 comments on commit 0e768a9

Please sign in to comment.