mojira.dev
MC-132787

Lily pads generate much less frequently / do not generate in certain areas

The bug

In 1.13 and 1.14, lily pads appear much less frequently in swamp biomes at locations where there is no land compared to 1.12. In 1.14 Pre-Release 2 this has gotten even worse: now no lily pads generate in swamp areas that are a mix of water and grass, while lily pads did generate in these areas in 1.13.2 and prior versions.

I've deleted the old screenshots and attached new ones showing the same swamp location in 1.12.2, 1.13.2, and 1.14 Pre-release 2. The seed is
-7016193228615810917. To get to the location shown in the screenshots use the following command: /tp @s 1235 100 -950 0 90

At this rate in 1.15 lily pads will only be obtainable through fishing. #SaveTheLilyPads

Change in generation in 1.14 development

Comparison by @unknown, seed taken from duplicate MC-153717

There is a noticeable difference in lilypad generation between snapshot 19w13b and 19w14a as you can see below. From 19w14a, lilypads seems to be only generated in large ponds only.

Seed: 1956111413
Coordinates: -590 91 935

[media]

[media]

Linked issues

Attachments

Comments 8

In 1.14 Pre-Release 2, there are only a handful of lily pads in an entire swamp.  That isn't right!

I forgot about this bug report. Looks like it's gotten even worse in the current 1.14 pre release versions where lily pads don't generate at all in some sub-biomes of the swamp biome. I've updated the ticket accordingly. Thanks.

Can confirm for 1.14.2 Pre-Release 2. I actually found more lilly pads in the nearby river than the actual swamp biome.

The following code is based on mcp_snapshot-20190525 for Minecraft 1.13.2

There seem to be 2 classes which determine if a lilly pad is placed:

In net.minecraft.world.gen.surfacebuilders.SwampSurfaceBuilder.java line 32 determines the probability of a lilly pad generating near the land:

if (d0 < 0.12D)
{
     chunkIn.setBlockState(blockpos$mutableblockpos.move(0, 1, 0), Blocks.LILY_PAD.getDefaultState(), false);
}

Setting "0.12D" to something larger like "0.5D" significantly increased lilly pad generation near the islands found in the swamp.

 

In net.minecraft.world.biome.SwampBiome.java line 65 determines the general probability of a lilly pad generating in the biome:

this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, createCompositeFeature(Feature.WATERLILY, IFeatureConfig.NO_FEATURE_CONFIG, TWICE_SURFACE, new FrequencyConfig(4)));

Specifically, changing the "FrequencyConfig" to a value higher than 4 made lilly pads generate much more often.

 

This code is significantly different than the code for Minecraft 1.12.2, and it appears that simply tweaking these 2 values could make lilly pads spawn similarly to previous versions. A more end-user friendly customizable world generator (similar to the old 1.8-1.12 custom world option) could allow server operators to have better control over the probability of different terrain elements spawning without having to mod the server directly. When proper 1.14 MCP mappings become available, I'll investigate what changed between 1.13 and 1.14 which reduced lilly pad numbers even more.

Change made in 19w14a significantly decreased the number of lily pads (see comparison screenshots).

I have been playing with the 1.14.2 code base and it seems that the Waterlily feature in net.minecraft.world.biome.SwampBiome.java was removed between 1.13 and 1.14. It is difficult to tell since the 1.14 mappings are incomplete and the code is hard to read, but if I add similar code to 1.13 back to SwampBiome.java and change the FrequencyConfig to a high value, lilly pads seem to spawn more similar to 1.12.

The following screenshots were taken on seed: -1153602421675362941

Use the following command to achieve the same camera view: 

/execute in minecraft:overworld run tp @s 98609.04 76.53 800.70 213.15 31.65

 

[media]

     

[media]

The left screenshot is default 1.14.2 world generation.

The right screenshot adds the following code to net.minecraft.world.biome.SwampBiome.java using the latest MCP mappings for 1.14.2:

this.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, func_222280_a(Feature.field_202281_aa, IFeatureConfig.field_202429_e, Placement.field_215018_d, new FrequencyConfig(255)));

I personally like seeing lilly pads spawn in the middle of the swamp waters, but this aesthetic change may have been intended when 1.13 slightly changed biome generation. I think the lilly pads really drive home that swamp feeling. Biome generation code was moved around a lot in 1.14, so hopefully they're gearing up for the custom JSON world configuration that was promised after the removal of customized worlds in 1.13.  😃

This seems to have been fixed at some point during the most recent bunch of snapshots for 1.15. Lily pads now generate even more frequently than they used to back in 1.12.2.

VeilStar

(Unassigned)

Confirmed

World generation

lily_pad, world-generation

Minecraft 1.13-pre6, Minecraft 1.13, Minecraft 18w32a, Minecraft 1.13.1, Minecraft 1.13.2, ..., Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 1, Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 2, 1.14.4

19w42a

Retrieved