BVengo / simple-shulker-preview

A minecraft fabric mod that displays a configurable icon indicating the contents of a shulker box, as well as a capacity bar.
GNU Lesser General Public License v3.0
8 stars 8 forks source link

[Feature]: Display item: at least Х (X is user-defined) #10

Closed Aprekot closed 1 year ago

Aprekot commented 1 year ago

Request Description

Could you add an option to display an item that has at least user specified amount, else dont display any item.

Please add this to version 1.18.2 if you can

Images

No response

Fabric Version

No response

Additional Context

No response

BVengo commented 1 year ago

Good idea, I'll probably add it into the next release.

I'm hoping to add bundle support in the next release too, so I'm aiming for the next release to be around when 1.20 drops (for all current supported MC versions).

BVengo commented 1 year ago

Here we go! Let me know your thoughts, and if this provides the functionality you were after (even if it's implemented slightly differently)!

Implementation I've added a couple of stack size options that will address this request as well as provide scalability for other config options.

There are two options implemented in 2.4.0 (not yet released).

These are multiplied together to determine if an item is actually rendered or not. Examples:

Implementation Quirk Display option = FIRST Min size = 32, min count = 1 -> minimum number of items required = 32

Stacks in a shulker box, in order:

Although dirt (16+24=40) comes first in the shulker and meets the minimum number, sand will be displayed. This is because it is meets the number requirement in slot 2, whereas dirt meets that requirement upon hitting slot 3.

Aprekot commented 1 year ago

Hi! Thank you for taking the time to do this. That's exactly what I wanted.

BVengo commented 1 year ago

Fantastic to hear! I'll make sure to roll out these changes to all currently supported versions of MC once everything is ready (probably around 1.20 release).

BVengo commented 1 year ago

Hiya @Aprekot , The update is live! Feel free to download the latest 1.18.2 version - it's only available on GitHub though, so make sure to read the change notes.