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

Commands and structure blocks cannot properly create a moving piston block (no block entity created)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.12.2, Minecraft 18w16a, Minecraft 18w19b, Minecraft 1.13, Minecraft 18w30b, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2, Minecraft 18w43a, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w47b, Minecraft 18w48a, Minecraft 18w48b, Minecraft 18w49a, Minecraft 19w04b, Minecraft 19w07a, Minecraft 19w12b, Minecraft 19w13b, Minecraft 19w14a, Minecraft 19w14b, Minecraft 1.14.3
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      As the title says, when attempting to create a moving_piston block, the block entity is not created.

      How to reproduce

      1. Type
        setblock ~ ~ ~ minecraft:moving_piston

        → See it suggests NBT data ({)

      2. Finish the command:
        setblock ~ ~ ~ minecraft:moving_piston{blockState:{Name:"minecraft:piston_head",Properties:{facing:"south",short:"false",type:"normal"}},facing:3,progress:0.0f,source:1b,extending:1b}

        → It says the block has been placed, but there's nothing visible

      3. Type
        /data get block ~ ~ ~

        → It says no block entity was found. Note: using that same command on a moving block created by a piston does return the block entity

      Affected methods

      • setblock
      • fill
      • clone
      • structure loading

      Code analysis

      Using MCP 1.12 names:

      The tab-complete suggestion for NBT data occurs due to net.minecraft.block.Block.hasTileEntity() method returning true for the net.minecraft.block.BlockPistonMoving block. However, the block entity itself is not created because net.minecraft.block.BlockPistonMoving.createNewTileEntity() returns null.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Asteraoth [Mod] Asteraoth
              • Votes:
                5 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  CHK: