Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-171120

Wither roses cannot be placed on any type of nylium

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • None
    • 20w06a, 20w07a, 20w09a, 20w10a, 20w11a, 20w13a, 20w16a, 20w18a, 1.16 Pre-release 1, 1.16 Pre-release 2, 1.16.1, 20w28a, 1.16.2 Pre-release 1, 1.16.2 Release Candidate 1, 1.16.2 Release Candidate 2, 1.16.2, 1.16.3, 1.16.4 Pre-release 1, 1.16.4, 20w46a, 20w48a, 20w51a, 21w03a, 21w11a, 21w14a, 1.17, 1.17.1, 1.18.1, 1.18.2, 22w15a, 1.19, 1.19.2, 22w46a, 1.19.3
    • Confirmed
    • Block states
    • Normal

    Description

      Wither roses cannot be placed on crimson or warped nylium.

      Code Analysis
      Code Analysis done by Thumpbacker

      This is because on the canPlaceOn method for the Wither Rose there is no check for Nylium

      Current Code

      net/minecraft/world/level/block/WitherRoseBlock.java
         protected boolean mayPlaceOn(BlockState p_58248_, BlockGetter p_58249_, BlockPos p_58250_) {
            return super.mayPlaceOn(p_58248_, p_58249_, p_58250_) || p_58248_.is(Blocks.NETHERRACK) || p_58248_.is(Blocks.SOUL_SAND) || p_58248_.is(Blocks.SOUL_SOIL);
         }
      

      Fixed Code

      net/minecraft/world/level/block/WitherRoseBlock.java
         protected boolean mayPlaceOn(BlockState p_58248_, BlockGetter p_58249_, BlockPos p_58250_) {
            //Having it being able to be placed on blocks in the Nylium tag (which includes Warped & Crimson Nylium by default) fixes MC-171120
            return super.mayPlaceOn(p_58248_, p_58249_, p_58250_) || p_58248_.is(Blocks.NETHERRACK) || p_58248_.is(Blocks.SOUL_SAND) || p_58248_.is(Blocks.SOUL_SOIL) || p_58248_.is(BlockTags.NYLIUM);
         }
      

      Attachments

        1. 2021-04-11_18.04.19.png
          2021-04-11_18.04.19.png
          1.08 MB
        2. 2021-04-11_18.04.20.png
          2021-04-11_18.04.20.png
          1.15 MB
        3. MC-171120.mp4
          2.78 MB
        4. wither_rose_bug_new_nether_blocks.png
          wither_rose_bug_new_nether_blocks.png
          156 kB
        5. wronass.png
          wronass.png
          266 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              cocosteam36400 Pacify UwU
              Votes:
              27 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                CHK: