mojira.dev
MC-133354

Kelp and sea grass grows up into flowing water and makes it a source block

The bug

Kelp and sea grass (when bone meal is used) can grow into flowing water blocks, not just sources, and as a byproduct of that, the flowing water becomes a source block.

How to reproduce

  1. Create a water column of source blocks, with flowing water at the top

  2. Place kelp at the bottom and watch it grow (bumping up random tick speed if needed)

  3. Observe the flowing water at the top is now a source block. (destroying the top kelp and using a bucket or debug screen can confirm this)

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments

migrated
[media][media][media][media][media]
gnembon

introduced primarily in pre-3

gnembon

introduced primarily in pre-3

migrated

Isn't this "works as intended?" 

migrated

Isn't this "works as intended?" 

CreeperMagnet_

Affects 1.13.1-pre2.

migrated

Confirmed in Release 1.13.1

migrated

Confirmed in Release 1.13.1

migrated

Please leave this alone, it's useful for making water elevators with bubble columns and doesn't affect the game otherwise.

migrated

Please leave this alone, it's useful for making water elevators with bubble columns and doesn't affect the game otherwise.

migrated

@James Spatig It messes up farms that use bonemeal, and isn't intended behaviour either

migrated

@James Spatig It messes up farms that use bonemeal, and isn't intended behaviour either

migrated

yah if you are trying to make a kelp farm and you didn't make it deep enough it can seriously mess up the farm by causing items to not move towards the hoppers due to the flowing water blocks becoming source blocks.

migrated

yah if you are trying to make a kelp farm and you didn't make it deep enough it can seriously mess up the farm by causing items to not move towards the hoppers due to the flowing water blocks becoming source blocks.

migrated

I understand why they did this, otherwise a single missing source block in the ocean could ruin the growth. However this is still an oversight.

In my opinion, it should only be able to grow into flowing water (and turn it into a sourceblock) if the block above is also water (source or flowing). This would make it the best of both worlds, the kelp mechanic to create functional bubble columns can stay and farms will not be ruined.

From a logical perspective, this also makes the most sense in my opinion as it would still allow kelps to grow normally in the ocean while preventing weird behaviour like this:

[media]

                  

[media]
migrated

I understand why they did this, otherwise a single missing source block in the ocean could ruin the growth. However this is still an oversight.

In my opinion, it should only be able to grow into flowing water (and turn it into a sourceblock) if the block above is also water (source or flowing). This would make it the best of both worlds, the kelp mechanic to create functional bubble columns can stay and farms will not be ruined.

From a logical perspective, this also makes the most sense in my opinion as it would still allow kelps to grow normally in the ocean while preventing weird behaviour like this:

[media]

                  

[media]
Adrian Östergård

Just to clarify: Growing Kelp shouldn't create water source blocks, but players should be able to place Kelp in order to create water source blocks.

Adrian Östergård

Just to clarify: Growing Kelp shouldn't create water source blocks, but players should be able to place Kelp in order to create water source blocks.

numeritos

Affects 1.16-rc1, a growing kelp created a water source block

numeritos

Affects 1.16

pulpetti

Affects In 1.16.1 and 20w29a

Avoma

Can confirm in 20w49a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 21w06a.

Avoma

Can confirm in 21w11a.

Avoma

Can confirm in 21w14a.

Avoma

Can confirm in 1.17.

ampolive

Can confirm in 1.17.1. I always thought this was intended.

migrated

Seems to work in another world in what acts like the Nether in the infinite snapshot. Also works in the Nether in 1.17.1 (with cheats to place some water to start flowing).

 

The kelp creates a water source block wherever placed in water. One water bucket and kelp can create an infinite water source, if done right, no bone meal or growth time needed.

migrated

Seems to work in another world in what acts like the Nether in the infinite snapshot. Also works in the Nether in 1.17.1 (with cheats to place some water to start flowing).

 

The kelp creates a water source block wherever placed in water. One water bucket and kelp can create an infinite water source, if done right, no bone meal or growth time needed.

ampolive

Can confirm in 21w39a.

Avoma

Can confirm in 1.18.1.

Avoma

Can confirm in 1.18.2.

Avoma

I can confirm this in 22w17a. Here's a code analysis of this issue.

The following is based on a decompiled version of Minecraft 1.18.2 using MCP-Reborn. 

Code Analysis:

net.minecraft.world.level.block.SeagrassBlock.java

public class SeagrassBlock extends BushBlock implements BonemealableBlock, LiquidBlockContainer {
   ...
   public void performBonemeal(ServerLevel $sl, Random $r, BlockPos $ps, BlockState $bs) {
      BlockState blockstate = Blocks.TALL_SEAGRASS.defaultBlockState();
      BlockState blockstate1 = blockstate.setValue(TallSeagrassBlock.HALF, DoubleBlockHalf.UPPER);
      BlockPos blockpos = $bp.above();
      if ($sl.getBlockState(blockpos).is(Blocks.WATER)) {
         $sl.setBlock($bp, blockstate, 2);
         $sl.setBlock(blockpos, blockstate1, 2);
      }

   }
   ...

net.minecraft.world.level.block.KelpBlock.java

public class KelpBlock extends GrowingPlantHeadBlock implements LiquidBlockContainer {
   ...
   protected boolean canGrowInto(BlockState $bs) {
      return $bs.is(Blocks.WATER);
   }
   ...

If we look at the above classes, we can see that seagrass requires Blocks.WATER above it in order to grow and similarly, kelp can only grow into Blocks.WATER. Since Blocks.WATER includes both flowing water and water source blocks, both kelp and seagrass can grow into flowing water.

Avoma

Can confirm in 1.19.

Avoma

Can confirm in 1.19.2.

Brain81505

Can confirm in 1.19.4 and 23w17a

Minecraft386882

Confirmed in 1.21.4 prerelease 1

Minecraft386882

Confirmed in 1.21.4 prerelease 3

Minecraft386882

Can confirm in 1.21.4 release candidate 3.

Minecraft386882

Confirmed in 1.21.4

Minecraft386882

Affects 25w05a

qwerty23495

(Unassigned)

Confirmed

Gameplay

Low

Block states

kelp, seagrass, tall_seagrass

Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre9, Minecraft 1.13, Minecraft 18w30b, ..., 1.21.4 Pre-Release 3, 1.21.4 Release Candidate 3, 1.21.4, 25w02a, 1.21.5

Retrieved