quilt-kotlin-libraries icon indicating copy to clipboard operation
quilt-kotlin-libraries copied to clipboard

itemSettingsOf creates incorrect settings

Open Cypher121 opened this issue 2 years ago • 0 comments

The main issue here is setting maxDamage and maxCount.

Right now, maxDamage is always called after maxCount. The problem is, even if the argument is 0, it still sets maxCount to 1, so all items created with itemSettingsOf don't stack.

If they're swapped, they create an unexpected behavior with default values: setting damage but not setting stack size, tries to set stack size to 64 and throws an exception.

Perhaps all arguments should be null by default like most of them are instead.

Cypher121 avatar Dec 07 '22 07:12 Cypher121