Add min gen height to setup,

This commit is contained in:
dordsor21 2022-01-26 12:27:44 +00:00 committed by Jordan
parent 80c39ec79a
commit f7dd0c1d38
2 changed files with 7 additions and 1 deletions

View File

@ -46,6 +46,7 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld {
public int ROAD_HEIGHT = 62; public int ROAD_HEIGHT = 62;
public int PLOT_HEIGHT = 62; public int PLOT_HEIGHT = 62;
public int WALL_HEIGHT = 62; public int WALL_HEIGHT = 62;
public int MIN_GEN_HEIGHT = 0;
public BlockBucket MAIN_BLOCK = new BlockBucket(BlockTypes.STONE); public BlockBucket MAIN_BLOCK = new BlockBucket(BlockTypes.STONE);
public BlockBucket TOP_BLOCK = new BlockBucket(BlockTypes.GRASS_BLOCK); public BlockBucket TOP_BLOCK = new BlockBucket(BlockTypes.GRASS_BLOCK);
public BlockBucket WALL_BLOCK = new BlockBucket(BlockTypes.STONE_SLAB); public BlockBucket WALL_BLOCK = new BlockBucket(BlockTypes.STONE_SLAB);
@ -114,6 +115,9 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld {
new ConfigurationNode("wall.height", this.WALL_HEIGHT, TranslatableCaption.of("setup.wall_height"), new ConfigurationNode("wall.height", this.WALL_HEIGHT, TranslatableCaption.of("setup.wall_height"),
ConfigurationUtil.INTEGER ConfigurationUtil.INTEGER
), ),
new ConfigurationNode("world.min_gen_height", this.MIN_GEN_HEIGHT, TranslatableCaption.of("setup.min_gen_height"),
ConfigurationUtil.INTEGER
),
new ConfigurationNode("plot.bedrock", this.PLOT_BEDROCK, TranslatableCaption.of("setup.bedrock_boolean"), new ConfigurationNode("plot.bedrock", this.PLOT_BEDROCK, TranslatableCaption.of("setup.bedrock_boolean"),
ConfigurationUtil.BOOLEAN ConfigurationUtil.BOOLEAN
)}; )};
@ -127,6 +131,7 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld {
public void loadConfiguration(ConfigurationSection config) { public void loadConfiguration(ConfigurationSection config) {
super.loadConfiguration(config); super.loadConfiguration(config);
this.PLOT_BEDROCK = config.getBoolean("plot.bedrock"); this.PLOT_BEDROCK = config.getBoolean("plot.bedrock");
this.MIN_GEN_HEIGHT = Math.max(getMinGenHeight(), config.getInt("world.min_gen_height"));
this.PLOT_HEIGHT = Math.min(getMaxGenHeight(), config.getInt("plot.height")); this.PLOT_HEIGHT = Math.min(getMaxGenHeight(), config.getInt("plot.height"));
this.MAIN_BLOCK = new BlockBucket(config.getString("plot.filling")); this.MAIN_BLOCK = new BlockBucket(config.getString("plot.filling"));
this.TOP_BLOCK = new BlockBucket(config.getString("plot.floor")); this.TOP_BLOCK = new BlockBucket(config.getString("plot.floor"));

View File

@ -161,8 +161,9 @@
"setup.road_width": "<gold>Road width</gold>", "setup.road_width": "<gold>Road width</gold>",
"setup.road_height": "<gold>Road height</gold>", "setup.road_height": "<gold>Road height</gold>",
"setup.road_block": "<gold>Road block</gold>", "setup.road_block": "<gold>Road block</gold>",
"setup.wall_filling_block": "<gold>Wall filling block</gold><gray> (Block(s) been put under the plot border down to Y1)</gray>", "setup.wall_filling_block": "<gold>Wall filling block</gold><gray> (Block(s) been put under the plot border down to min gen height + 1)</gray>",
"setup.wall_height": "<gold>Wall height</gold>", "setup.wall_height": "<gold>Wall height</gold>",
"setup.min_gen_height": "<gold>Minimum height from which to generate (for 1.18+ can be negative).</gold>",
"setup.bedrock_boolean": "<gold>Whether a bedrock layer under the plot should be generated or not</gold>", "setup.bedrock_boolean": "<gold>Whether a bedrock layer under the plot should be generated or not</gold>",
"setup.singleplotarea_void_world": "<gold>Void world</gold>", "setup.singleplotarea_void_world": "<gold>Void world</gold>",
"plotareatype.plot_area_type_normal": "<gray>Standard plot generation</gray>", "plotareatype.plot_area_type_normal": "<gray>Standard plot generation</gray>",