Mojira Archive
MCM-774

Clearing items from the player's inventory on a clock causes additional items to be cleared when trading

Partner Rank: 3

Partner Team Reporting: Gamemode One

Verification builds and Platforms: Minecraft-Release_UAP_x64_2388834 Minecraft.Windows_1.12.11.0_x64_UAP.Release_Test

 

Summary:
When items are being actively removed with a repeating command block (example of command: "/clear @a baked_potato 0 1"), additional items that are added to the inventory through trading are instantly cleared all at once. (with some inconsistency).

Impact:

This prevents accurately increment a score by counting items in the player's inventory. This method is useful for keeping a score currency that can be increased by finding or trading items. Alternative collection methods such as item-deposit chest are incredibly inconvenient to use and interrupts gameplay.

Repro Steps:

  1. Download and install the attached world. It should contain a flatworld with a villager and some command blocks.
  2. Insert a number of apples into the trade window and tally the expected number of potatoes.
  3. Slowly click the "Trade" button, waiting for each stack to deplete before hitting it again.
  4. Take note of the resulting "potatoes" score. This score should match the expected number of potatoes.
  5. Reset the score using the command block with the button.
  6. Repeat steps 2-4 but instead click the "Trade" button as quickly as possible. This time, the score should be noticeably lower than the expected result.

Observed Results:
Trading while items are being removed from the inventory this results in the loss of items. It seems to occur more often to players who are not the host of the world.

Expected Results:
The correct number of items are removed, resulting in the correct score.

Screenshots/Videos attached:

This video showcases the player trading 4 apples. Some of the items are unduly deleted, resulting in a score less than 80.
https://www.youtube.com/watch?v=FC8eLIm6EJo&feature=youtu.be

The .mcworld built to showcase the issue.

Clear bug report.mcworld

Fixed

Cade Anderson (Edacth)

2019-08-12, 10:12 PM

2019-11-06, 01:40 AM

2019-11-06, 01:40 AM

0

0

Future Release

-