[MCPE-17964] Clone command incorrect results with large chest Created: 05/Nov/16  Updated: 03/Apr/19  Resolved: 01/Aug/17

Status: Resolved
Project: Minecraft (Bedrock codebase)
Component/s: None
Affects Version/s: 0.16.0, 0.16.1, 0.16.2, 1.0.0, 1.0.6.52, 1.1.0.9, 1.0.9.1
Fix Version/s: 1.2.0.2

Type: Bug
Reporter: [MCPE Mod] Auldrick
Resolution: Fixed Votes: 3
Labels: clone, command, double-chest

Attachments: PNG File Alternate result.png     File Clone a Chest Bug mk2.mcworld     File Clone a Chest.mcworld     PNG File Clone command and resulting overlapping chests.png     PNG File Contents of cloned large chest.png     PNG File Contents of cloned small chest.png     PNG File Contents of original chest.png     JPEG File ScreenShot 203.JPG     JPEG File chest1.JPG     JPEG File chest2.JPG     JPEG File chest3.JPG     JPEG File chest4.JPG    
Issue Links:
Duplicate
is duplicated by MCPE-22743 Issue with chest cloning. Resolved
Relates
relates to MCPE-44173 Cloning two single chests from source... Open
Confirmation Status: Confirmed
Platform: Windows
CHK:
ADO: 54337

 Description   

When cloning a large chest, the right half is cloned as a small chest on the left and the double chest is cloned either in the same block or one block to the right.

Steps to reproduce:
1. Place a double chest facing west.
2. Place two distinct items in left and right sides of chest.
3. Use /tp to determine coordinates of chest.
4. Use /clone to clone the chest two blocks to the east.
5. Observe overlapping small and large chests at destination.
6. Observe small chest on left contains item placed in right side of original chest, large cloned chest contains both items from original chest.

This result was observed while trying to reproduce the clone error shown in the "Alternate result" screenshot, where the large chest overlapped the block to its right (a hopper which was also cloned). I don't know what the condition is that changes the result, but both results likely have the same cause.



 Comments   
Comment by [MCPE Mod] Auldrick [ 01/Aug/17 ]

Appears to be fixed in 1.2.0.2 (Win 10).

Comment by [Mojang] Mega_Spud (Jay Wells) [ 24/May/17 ]

Still affects 1.1.0.9.

Added another basic test world with command blocks for convenience.

Comment by [MCPE Mod] Auldrick [ 18/Jan/17 ]

Additional info: The original large chest was created by placing two small chests side by side. Call the first one S1 and the second S2. S2 can be placed on either side of S1, but S1 will always contain the top half of the resulting large chest's inventory. From the behavior of this bug I infer that when S2 is placed, S1 is updated with a reference to S2. Likewise, S2 is updated with a reference to S1.
The /clone command correctly duplicates S1 and S2 at the target coordinates. Call the cloned blocks D1 and D2 corresponding to S1 and S2, respectively. However, it doesn't fix up the references correctly. D2 ends up as a small chest with no connection to D1. D1 ends up as an apparent large chest, and D1 and S2 (not D2) are linked by references. This can be demonstrated after the /clone operation in several ways:
(1) Right-clicking on S2 opens D1 instead of S1.
(2) Changing the contents of S2 changes D1's inventory.
(3) Breaking S1 leaves an invisible chest at S2.
(4) Breaking S2 (whether or not you broke S1 first) converts D1 into a single chest.
(5) Breaking D2 if necessary to get it out of the way, one side of D1 can be seen to have no hit box. You can place a block there, or if you attempt to break it you will break the block below or behind it instead.

Comment by [Mojang] Mega_Spud (Jay Wells) [ 25/Nov/16 ]

Using the attached test world ("Clone a Chest.mcworld"):
Complete the command shown on the sign, and notice the double chest is separated.
(Copy and paste: /clone 1370 4 4 1367 4 6 1367 5 6 )

Then move the clone destination down by one to place it on the ground, notice how it is a glitched double chest
(Copy and paste: /clone 1370 4 4 1367 4 6 1367 4 6 )




Comment by [Mojang] Mega_Spud (Jay Wells) [ 25/Nov/16 ]

Confirmed for Windows 10 0.16.2

It does seem to affect chests that are cloned on the ground. If they are cloned in the air, they separate.

Generated at Sat Jan 11 15:17:30 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.