-
Notifications
You must be signed in to change notification settings - Fork 9
Level heights should have a lower bound of 1 #64
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If a negative level height is provided, the server crashes:
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 16
at net.minecraft.class_2791.method_38259(class_2791.java:162)
at xyz.nucleoid.plasmid.game.world.generator.TemplateChunkGenerator.lambda$populateNoise$0(TemplateChunkGenerator.java:74)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at net.minecraft.class_3900.method_17634(class_3900.java:62)
If a level height of zero is provided, an unplayable map with a single layer covered by a barrier ceiling and no lava is generated:
The codec for the level height of the map should be restricted to a minimum of 1 to prevent these issues from occurring:
| Codec.INT.fieldOf("level_height").forGetter(SpleefGeneratedMapConfig::levelHeight), |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working