Skip to content

Commit d4bec7f

Browse files
committed
Adds config to enable heigh setting of end-frames. #63
1 parent c0d258d commit d4bec7f

File tree

3 files changed

+515
-479
lines changed

3 files changed

+515
-479
lines changed

src/main/java/world/bentobox/skygrid/Settings.java

+19
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ public class Settings implements WorldSettings {
147147
@ConfigEntry(path = "world.skygrid-height")
148148
private int islandHeight = 128;
149149

150+
@ConfigComment("End Frame height")
151+
@ConfigComment("This is the height where end frames will generate.")
152+
@ConfigEntry(path = "world.end-frame-height", since = "1.20.0")
153+
private int endFrameHeight = 3;
154+
150155
@ConfigComment("Space around new players in blocks (will be rounded up to nearest 16 blocks)")
151156
@ConfigEntry(path = "world.space-around-players")
152157
private int islandDistance = 1000;
@@ -1623,4 +1628,18 @@ public boolean isCheckForBlocks()
16231628
public void setMaxHomes(int maxHomes) {
16241629
this.maxHomes = maxHomes;
16251630
}
1631+
1632+
/**
1633+
* @return the endFrameHeight
1634+
*/
1635+
public int getEndFrameHeight() {
1636+
return endFrameHeight;
1637+
}
1638+
1639+
/**
1640+
* @param endFrameHeight the endFrameHeight to set
1641+
*/
1642+
public void setEndFrameHeight(int endFrameHeight) {
1643+
this.endFrameHeight = endFrameHeight;
1644+
}
16261645
}

src/main/java/world/bentobox/skygrid/generators/SkyGridPop.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private void makeEndPortal() {
119119
if (xx == zz || (xx==1 && zz==5) || (xx==5 && zz==1) || (xx>1 && xx<5 && zz>1 && zz<5)) {
120120
continue;
121121
}
122-
setFrame(xx, zz, chunk.getBlock(xx, 0, zz));
122+
setFrame(xx, zz, chunk.getBlock(xx, addon.getSettings().getEndFrameHeight(), zz));
123123
}
124124
}
125125
}

0 commit comments

Comments
 (0)