mojira.dev
MC-929

Sugar cane can be placed underwater

The Bug:

Sugar cane can be placed underwater.

If there is water adjacent to and below the desired location of placement, sugar cane can be placed. This of course results in sugar cane being allowed to be placed underwater.

Steps to Reproduce:

  1. Obtain some sugar cane and locate an open body of water.

  2. Attempt to place sugar cane on any block underwater that has water adjacent to and below it.

  3. Take note as to whether or not sugar cane can be placed underwater.

Observed Behavior:

Sugar cane can be placed underwater.

Expected Behavior:

Sugar cane would not be able to be placed underwater.

Code Analysis:

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

Related issues

MC-3271 Sugar Canes can be placed underwater if there is a hole right next to it (and water in the hole) MC-7701 Sugar cane can be planted in water MC-9688 sugar cane problem MC-9762 Sugarcane can be placed under water on multiplayer MC-10281 Bug: Sugar Canes under water MC-13048 I am able to place Sugar Cane underwater. MC-14232 Sugar Can can be Placed in Water MC-17130 water/lava don't break sugar cane when landing on top of it MC-24145 SugarCanes can be placed in on a block in water. (See descriptions and picture for more details) MC-30956 suger canes MC-31024 Reeds can be placed underwater MC-44408 Sugarcane Underwater? MC-56602 sugar cane is placeble in and under water. MC-63887 Water cannot break Sugar Cane MC-63948 If sugarcain is placed in water, it doesn't brake. Is this normally? MC-69376 Sugar cane can be place under water and it grows MC-73299 SugarCane MC-82660 MC-929 is back in 1.8.7 / Sugarcane can be placed in water MC-83493 Placing Sugar Canes Under Water MC-84385 Placing sugarcane in water MC-95894 Bug Snapshot 16w03a Sugar cane MC-103189 Sugar Cane in water MC-108091 you can place sugercane underwater and doesn't brake MC-116461 Sugarcane can be placed underwater, if the block it is placed on is next to water MC-116587 Sugar canes can be placed under water without breaking MC-118306 Sugarcane under water MC-119462 sugarcane in water MC-122025 Sugar Canes Placable Underwater MC-125387 Sugar cane is still placeable under water. MC-125821 Sugar Cane can be placed underwater MC-126707 Under water sugarcane MC-127533 Sugar Cane Can Be Placed in (Some) Water MC-133405 Planting sugar canes underwater. MC-133468 Sugar canes in water MC-133599 Sugarcanes can be planted underwater MC-134093 Sugar cane gone wrong in the water :O MC-134708 Sugar Cane Can Be Placed In Solid Water Blocks MC-135160 Player can place sugar canes on surface of water on grass/sand block. MC-135372 Sugar Cane MC-137149 Sugarcane and water problem MC-137166 You can put sugar cane in the water. MC-149884 Place sugar cane underwater in 1.14 MC-152275 Sugar cane can be placed in water MC-152731 Underwater Sugarcane MC-153449 sugar cane underwater farm MC-154077 We can put sugar cane in water. MC-157328 chugerkan in wawer MC-157914 сахарный тростник MC-158496 Water does not break Sugar cane placed underwater MC-159040 You can plant sucarcane in water??? MC-164109 Ability to place sugar cane underwater MC-165286 Underwater sugarcane MC-165622 Sugarcane can be placed in water MC-166288 Sugar cane doesn't break when put in water MC-167568 sugarcane underwater MC-167837 you can place sugar cane underwater MC-167982 Sugar Cane in water MC-169196 Water MC-171601 you can place sugar cane into water MC-172024 Sugar cane can be placed in water MC-173066 Sugarcanes are immune to water MC-173152 Sugar Cane in the water MC-173609 sugar cane and water MC-173659 Sugar Canes Broken MC-173886 Sugarcane can be placed underwater MC-174799 sugar cane can be placed in water MC-174952 Sugar Cane Placement Underwater MC-175261 Sugar cane is not broken by water MC-176409 Sugar cane in water BUT because of afk fishing farm nerf MC-177920 Sugar cane can be placed in water MC-178258 Sugar cane is found in the water itself MC-178857 тростник MC-179414 Suger cane underwater MC-181177 Sugar canes not acting as usual MC-182836 Sugar Cane can be placed in water MC-184231 Sugar Cane can be planted under water, if placed on an edge block MC-184603 Sugar cane can be placed in water MC-188411 bug MC-190309 sugar cane can be planted under water. MC-190327 Placing Sugarcane In Water MC-190558 Suger Cane placeble onder water MC-191197 Sugar Cane can be planted underwater MC-191491 In 1.16 release, you can place sugarcane underwater/in water MC-191527 Sugar Cane can be Planted in the Water MC-192079 Sugar cane can be placed underwater MC-192333 sugarcane can be placed underwater MC-192599 sugar canes can be put under water MC-192663 bug with sugar cane MC-192666 Sugar cane underwater MC-192707 You can plant sugar cane in whater MC-192741 Sugarcane being places underwater MC-192932 Sugarcane is able to be placed in water if there is a water source next to ground block. MC-192947 sugar cane can be planted in water MC-193477 Sugar cane is planted in water MC-193558 placing sugar cane into water MC-193997 sugarcane can be placed under water MC-194233 Sugarcane Doesn't get broken by water MC-194512 Sugarcane is placable in water without getting destroyed MC-194979 Sugarcane can be placed underwater MC-195602 SUGAR CAN DOES WATER BLOCK MC-196138 Sugar Cane Bug MC-196234 shugarcane planted in water MC-198834 Bug MC-199122 Sugar cane in water bug MC-199351 bug MC-199372 sugaer cane water bug MC-200577 sugar cane MC-201184 Sugercain bug and water bug also boats MC-201772 I can Place Sugar cane in water MC-202354 Sugar cane in water MC-202666 Sugarcane can be placed inside water MC-202923 Sugar cane problem in water MC-203024 sugar cane can grow in water but dont water log MC-204715 Sugarcanes not affected by water MC-205641 sugar cane dont get broken in water MC-205673 Sugar Cane can be placed in water MC-205748 Sugarcane bug MC-206087 you can plant sugar cane under water MC-206916 In the latest snapshot you are able to place sugar cane underwater MC-207146 Suger Cane MC-209270 sugarcane can be placed anywhere MC-209287 sugarcane bug MC-209623 Sugar Being placed on water MC-211672 Sugar Cane Can Be Placed Underwater? MC-214747 Sugarcane can be grown in water. MC-217313 can place sugar cane under water MC-217350 I can place the sugar cane into the water MC-217824 If theres is 1 block hole next to another block you can place a sugarcane underwater MC-217825 If theres is 1 block hole next to another block you can place a sugarcane underwater MC-219331 sugar cane on water MC-221747 sugar canes not breaking MC-222038 Sugar cane can be placed under water MC-222194 It is possible to place sugarcane underwater MC-223272 you can place sugar cane in water MC-223848 You can grow sugarcane underwater MC-224178 Bug de caña de azucar MC-226797 Sugar cane can be placed in the water source MC-227047 sugar cane MC-227984 Sugarcane under the water MC-228126 Sugar cane problem MC-228563 Sufar cane water bug MC-228766 you can put sugar cane in water without breaking it MC-229380 Sugar Cane underwater bug (new in 1.17) MC-229480 Sugarcane placed in water MC-229728 Place sugarcane in water MC-229941 I'm able to place sugar cane under water MC-230450 1.17 Underwater Sugarcane Bug MC-231038 在水面下的第一层如果是沙子或者泥土,就能在水里钟甘蔗 MC-231269 sugar canes are plantable in water! MC-231316 Sugar cane can be placed in the water MC-231612 Sugar Cane Bug MC-232234 Sugarcane holds back water MC-232342 Sugarcane can be placed underwater MC-232523 sugarcane MC-233302 bug MC-234195 Sugar Cane can be placed in water MC-235038 Sugar canes are placable in water and doesn't break. [1.17] MC-235046 Sugar Cane Bug MC-236183 Sugarcane blocking water flow bug MC-237417 Sugar cane can be planted in water MC-238234 You can place sugar cane in water MC-239167 Sugar cane in water MC-239182 Sugar cane can be planted in a liquid if there is water adjacent to to it and one block lower MC-239532 Able To Plant Suger Cane While In Water MC-240634 Sugar Cane Water MC-240738 what's wrong with sugarcane ?! MC-241677 Sugarcane error MC-242533 Maybe, this is a bug. MC-242690 Sugar cane is placed under water MC-258742 Sugar cane exploit, water dont destroy the item and create an air block in the ocean MC-258837 Sugarcane Can Be Placed Underwater MC-259205 Sugarcane placed underwater MC-261527 Sugar Cane under water MC-262675 Sugar cane can be placed under water. MC-263031 Sugarcane can be planted underwater MC-263341 sugar cane put in the water and it grows MC-263747 You can place sugar cane underwater MC-263812 Sugar Cane can be placed in water MC-263844 Sugar cane can be planted in the water MC-263907 Sugar Cane can be placed in water MC-264343 Sugarcane bug MC-264352 Sugar Cane can place on water MC-264452 Sugar cane can some times be placed under water MC-265627 Sugar canes can be placed underwater MC-266220 Sugar Cane can be placed underwater MC-266367 Sugar Cane does not break from water and breaks water sources MC-268695 Sugar cane placed underwater MC-269108 Sugar cane can be placed in water MC-270534 Sugar Can can be placed on cliffsides under water MC-273104 Sugar cane is able to be placed in water directly MC-273457 sugar cane in water MC-273480 Sugarcanes Can Be Placed In Water MC-273513 Sugarcane Placed In water MC-273681 Sugarcane can be grown underwater. 甘蔗可以在水下种植 MC-273855 Sugar cane can be placed underwater MC-274076 Sugarcane can be grown into water MC-274408 Sugar Canes can be placed in and under water on ledges MC-276672 Sugar cane can be planted underwater MC-276721 Sugar Cane Glitch MC-278075 Sugar Cane Bug MC-278707 Placing sugar cane into water MC-279814 sugar cane can be placed in water MC-279821 Unintended Placement of Sugarcane MC-295979 Planting Sugare Cane unederwater MC-296765 Sugar cane can be placed in water MC-296798 Sugar cane can be placed underwater MC-297357 Placing Sugar Cane in water will not update the water. MC-297920 Sugar cane can be planted in water MC-298208 I can breathe underwater MC-298267 Sugar cane underwater MCL-10938 I can plant sugarcane under water MCL-16012 I am able to place Sugar Cane in the water and its not breaking automatically MCL-22603 Sugar cane underwater REALMS-2612 You can place sugar canes in water on a Realm

Attachments

Comments

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

This is how it works normally. This isn't a bug.

"When used underwater, sugar cane displaces the water, just as slabs do, leaving an air pocket."
-http://www.minecraftwiki.net/wiki/Sugar_Cane

migrated

Agreed with Tristan.

This isn't a bug. This has been like this since Alpha. At least it was like this when I started in Alpha 1.2.

migrated

Sugar Cane can be placed under water on multiplayer but not single player in the newest snapshot.

migrated

it is back in 1.8 i reported it, they took it down, even though it was updated

migrated

Ask for re-open Bug Report, since water-logged blocks are now possible and sugarcanes still do that air
Affected in minecraft snapshot 19w09a

Asteraoth

@unknown, see MC-125351.

migrated

Weird sugarcane underwater is probably one of those "intentional bugs".

Known for years, never bothered to fix.

migrated

This is intentional bug.

pulpetti

This isn't a bug, and the wiki just tells you that sugarcane can leave airpockets underwater which some people might interpret as the wiki saying that "it's a feature" which it clearly isn't because IT'S AN ALPHA OLD ALPHA BUG, ALPHA IS ALPHA.

Even if it is an Alpha feature why is it listed as a block that's bugged in water in MC-125351, and why is Mojang trying to remove blocks that leave airpockets underwater in Java and Bedrock if it is somekind of "feature".

migrated

See MC-125351 just as Asteraoth said. This isn't an intentional bug.

muzikbike

There is no such thing as an intentional bug by definition.

migrated

This was fixed yet. I tried to make this but nothing happened

migrated

No, I can place yet

migrated

Which is the difference in put a sugar cane in the water on a superflat world and a normal world??

SunCat

there should be no difference. Make sure you put the sugar cane on allowed blocks (dirt, grass, sand)

migrated

confirmed for 1.15.2

[Mod] markderickson

Hello @unknown! There's actually no need to confirm something in a version that is not the latest version or the latest snapshot. Adding those versions to reports is something that is not helpful to Mojang in fixing the bug, and adding outdated versions is not actually possible to do without special permissions on the tracker as far as I'm aware.

Avoma

Can confirm in 20w48a.

Avoma

Can confirm in 20w49a.

Avoma

Can confirm in 21w03a.

Avoma

Can confirm in 21w05a.

Avoma

Can confirm in 21w05b.

Avoma

Can confirm in 21w07a.

Avoma

Can confirm in 21w08b.

migrated

Can confirm in 1.16.5 

migrated

21w13a the error continues to happen in the latest version

Avoma

Can confirm in 21w17a.

migrated

i can confirm still in 1.17 

[media]
migrated

still possible 1.17 , when would it be fixed? But maybe its an new feature to make tunnels out of cane lol?

[media]
ampolive

Can confirm in 1.17.1 Pre-release 2.

ampolive

Can confirm in 1.17.1 Release Candidate 1.

ampolive

Can confirm in 1.17.1 Release Candidate 2.

migrated

Let me add. this works with lava (if there is water in an adjacent block that is one lower that the place you are trying to place the sugar cane on.
Also if the water is replaced by sugar cane placed using the same bug, the top sugar cane will pop off, on a block update or random tick.

[media][media]
migrated

Can confirm on Minecraft 1.18 Pre Release 6

Avoma

Can confirm in 1.18.1.

Avoma

Can confirm in 1.18.2.

Avoma

Can confirm in 1.18.2 and 22w16b. Here's a code analysis of this issue.

Code Analysis:

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

net.minecraft.world.level.block.SugarCaneBlock.java

public class SugarCaneBlock extends Block {
   ...
   public boolean canSurvive(BlockState $bs, LevelReader $lr, BlockPos $bp) {
      BlockState blockstate = $lr.getBlockState($bp.below());
      if (blockstate.is(this)) {
         return true;
      } else {
         if (blockstate.is(BlockTags.DIRT) || blockstate.is(Blocks.SAND) || blockstate.is(Blocks.RED_SAND)) {
            BlockPos blockpos = $bp.below();

            for(Direction direction : Direction.Plane.HORIZONTAL) {
               BlockState blockstate1 = $lr.getBlockState(blockpos.relative(direction));
               FluidState fluidstate = $lr.getFluidState(blockpos.relative(direction));
               if (fluidstate.is(FluidTags.WATER) || blockstate1.is(Blocks.FROSTED_ICE)) {
                  return true;
               }
            }
         }

         return false;
      }
   }
   ...

If we look at the above class, we can see that the code only checks to see whether or not the block adjacent to and below the desired placing location is water or frosted ice, before being able to place down some sugar cane. This is evident through the following line of code:

if (fluidstate.is(FluidTags.WATER) || blockstate1.is(Blocks.FROSTED_ICE))

Since no checks are carried out to see if the sugar cane is underwater or in lava before being placed, this results in this problem occurring.

DrageonDB

Affect 1.19 pre 3

Avoma

Can confirm in 1.19.

Avoma

Can confirm in 1.19.1.

pulpetti

In 1.19.2

migrated

In 1.19.3 Release Candidate 1

Avoma

@unknown, 1.19.3 Release Candidate 1 is an archived affect version and cannot be added to this report. We can only update reports with the latest snapshot or release of the game as of the current moment in time. As of the present moment, 1.19.2 and 1.19.3 Release Candidate 3 can only be added. 🙂

I've just tested this problem now in 1.19.3-rc3 and the bug is still present so I've added this as an affected version. Just thought I'd let you know. 🙂

Moesh

As this has been long-standing behavior, we have decided that if we fix this, it will be as part of a design change instead of as a bug fix. If we address this issue, it will be on a different work track.

migrated

Сan confirm in 23w44a.

migrated

Is also present in 1.20.6 version

[Mod] markderickson

(Unassigned)

Confirmed

Normal

Block states

mojang_internal_1, placement-and-support, sugar_cane, water, waterlogged-blocks

Minecraft 1.4.2, 1.16.1, 20w28a, 20w29a, 20w30a, ..., 1.19.1, 1.19.2, 22w42a, 1.19.3 Release Candidate 3, 1.19.3

Retrieved