mojira.dev
MCPE-86412

/replaceitem doesn't work with campfires

The bug

When used on a campfire block, /replaceitem says "Block at Pos(x,y,z) is not a container" and does nothing

How to reproduce

/setblock ~ ~ ~ campfire
/replaceitem block ~ ~ ~ slot.container 0 porkchop

Expected result
Porkchop is placed on campfire, just like if you right-clicked on it
Actual result
Error

Linked issues

Comments 2

The "Error" is an error message: "Block at Pos(x, y, z) is not a container".

The /replaceitem command only works with containers. This error occurs because a campfire is not a container. The items cooking on it are not stored as an inventory, but as discrete properties (called Item1 etc.).

I checked the wiki and there's no suggestion that a campfire is a kind of container on either the Campfire article or the Inventory article. Why do you expect this command to work? Does it work this way in Java? If not, then I don't see any reason to believe this is a bug.

Affects both regular and soul campfires.

tryashtar

(Unassigned)

377204

Confirmed

Multiple

1.19.80.21 Preview, 1.17.40.23 Beta, 1.17.40.21 Beta, 1.17.20.20 Beta, 1.16.20.50 Beta, ..., 1.16.210, 1.17.2 Hotfix, 1.17.30, 1.17.32, 1.19.70

Retrieved