Skip to content

SlimeLevelGenerator extends FlatLevelSource, setting sea level to -63 and disabling sea-level-dependent mob spawning #166

@Dampen59

Description

@Dampen59

In SlimeLevelGenerator.java, the class extends FlatLevelSource, which by default sets the sea level to -63. This causes unintended side effects — specifically, mobs that depend on sea-level conditions (like Squids, Turtles, etc.) will not spawn as expected.

public class SlimeLevelGenerator extends FlatLevelSource {

    public SlimeLevelGenerator(Holder<Biome> biome) {
        super(new FlatLevelGeneratorSettings(Optional.empty(), biome, List.of()), getSource(biome));
    }

    // ...
}

Issue

  • FlatLevelSource hardcodes the sea level to -63.

  • Many mob spawns are tied to being near or above sea level (y = 63 in vanilla).

  • This results in no spawning for mobs like Squids, Turtles, and other sea-level dependant creatures.

Suggested fix

  • Either allow a configurable sea level or set it explicitly to a vanilla-expected value (like 63).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions