misode / minecraft-schemas

Schemas to parse and validate JSON structures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The weight in loot_tables may be non-positive value, but the schema shows an error.

Ai-Akaishi opened this issue · comments

When are non-positive weights useful? Would this not be the same as using an "empty" entry, or is there a combination of weight and quality where this makes sense?

A non-positive number of WEIGHT, combined with QUALITY, can constitute an ENTRY that is valid only if it is under the effect of LUCK or UNLUCK.

This combination has been available since version 1.9, when the loot_table was introduced, and I used this in a custom map for that version as "a mini-game that allows you to catch different items than usual for a certain time (by applying the effect of UNLUCK level 21).
I have found this incorrect error message while remaking the custom map for 1.18.2.
I have confirmed that this is still a valid setting in version 1.18.2.

commented

@Ai-Akaishi Sorry it took more than a year to fix this 😅