Mojira Archive
MC-93483

Spectators opening Loot Table (double)Chests will generate the items inside

Update as of 15w51a: Double chests are still affected. Also, hoppers, when opened by a spectator, generate their own loot and the loot of containers above themselves. However this does not happen when the hopper is above a container or when a HopperMinecart is used.


If you open a chest with a loot table as a spectator, it will generate it's contents affecting gameplay for other survival/adventure players on the map.

Somebody with bad luck or luck effects that open a chest will have better/worse chance of getting good items from chests. A spectator could open all chests and make their contents fixed/unchangeable.

What should happen: A chest that has a loot table with a unspecified lootTableSeed should show a question mark in the chest and NOT generate the items. If the chest has fixed seed or fixed items inside that won't matter.
OR: a gamerule the allows spectators to generate loot in chests and other storage when opened.

Summarized:

  • Spectators influence loot table chests
  • Fix: Chests with loot table and random lootTableSeed will not generate items when opened by spectator
  • Alternate fix: /gamerule spectatorsGenerateLoot true/false. This will make spectators not generate any loot when they open chests/furnaces etc.

Code analysis by Marcono1234 can be found in this comment.