mojira.dev
MC-140162

Luck does not impact Loot Tables on double chests or Shulker Boxes

Using a custom loot table, luck has an impact on drops (by design) when applied to a single chest. Placing 2 chest side-by-side (double chest) has loot drops for both chests but the results are not impacted by luck. If a shulker box is used instead, the loot drops are also not impacted by luck.

I've attached a very basic loot table to show the issue. You'll need to open it as a chest with luck amp 0 and without on a chest, double chest and shulker box.

Linked issues

Attachments

Comments 2

Brandonn Richmond

I think I understand what is happening after thinking about it. I'm assuming placing 2 chest the game is generating the loot rather than the player, so no luck is applied. I can confirm this by placing a single and double chest tied to a loot table and then try to look inside each in spectator mode. On the single, I get the message I'd expect, that I can look inside - on the double, the loot has already been generated.

In the case of the shulker box, spectator mode shows that the loot isn't generated yet, but luck is still not applied.

I think in the case of the double chest, the placing players luck could still be checked. In the case of the shulker box and other containers, the code may just not be in place - but shulker boxes are perfect for loot rewards because they can be different colors and the box is a reward in and of itself.

 

EDIT: I also meant to add - breaking a container attached to a loot table does not check the luck value of the player either.

Brandonn Richmond

(Unassigned)

Unconfirmed

Minecraft 18w47b

Retrieved