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

/replaceitem doesn't work with chest or hopper minecarts


    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 1.13-pre10
    • Minecraft 14w26c, Minecraft 14w33a, Minecraft 1.8-pre1, Minecraft 1.8, Minecraft 1.8.7, Minecraft 1.8.9, Minecraft 15w51b, Minecraft 16w04a, Minecraft 1.9.2, Minecraft 1.9.4, Minecraft 1.10, Minecraft 1.10.2, Minecraft 16w38a, Minecraft 16w42a, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 1.12, Minecraft 1.12.2, Minecraft 17w50a, Minecraft 18w16a, Minecraft 18w20c, Minecraft 18w21a, Minecraft 18w21b, Minecraft 18w22a, Minecraft 18w22b, Minecraft 18w22c, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13-pre8, Minecraft 1.13-pre9
    • Confirmed

      The bug

      When using /replaceitem entity on a chest or hopper minecart, the command fails as shown in the picture, telling you that it could not replace the container slot with the specified item.

      How to reproduce

      1. Summon or place a normal chest minecart
      2. Run the following command while standing fairly close to the minecart
        /replaceitem entity @e[distance=..5,type=minecraft:chest_minecart] container.0 minecraft:dirt

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      Chest and hopper minecarts do not override the method net.minecraft.entity.Entity.replaceItemInInventory(int, ItemStack).

            boq [Mojang] Bartosz Bok
            Nethonos Nethonos
            40 Vote for this issue
            28 Start watching this issue