Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds config to enable heigh setting of end-frames. #64

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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