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]: Show extra icon if shulker has 27×64 of the same item #11

Closed vlad2305m closed 1 year ago

vlad2305m commented 1 year ago

Request Description

In technical Minecraft, resources are produced and processed as chests of shulkers of a resource. Therefore I would like to have an extra icon on full shulkers to be able to quickly identify that the shulker is missing items and is therefore unsuited for processing.

Images

No response

Fabric Version

1.19.3-0.14.18

Additional Context

No response

BVengo commented 1 year ago

Hi there,

Thanks for the suggestion! Considering I'm quite busy at the moment and this requires exploring the MC code beyond what is currently being used, I'm leaving this suggestion open to see if it gains any further interest before taking action.

In the meantime, I'd like to hear more about your thoughts on this feature. What sort of icon are you picturing, and what sort of placement such that it doesn't clutter up the inventory?

vlad2305m commented 1 year ago

https://github.com/vlad2305m/simple-shulker-preview https://github.com/vlad2305m/simple-shulker-preview/releases/tag/2.2%2B Screenshot_20230411_160923 ^ You know when you can just grab a box without looking inside and it will have 27 minecarts, as expected Screenshot_20230411_161154 ^^ somebody snatched elytras from the middle of a chest. Screenshot_20230411_161536 Our chest of string

The code I wrote is just the lowest-effort patch. If you want me to rewrite everything with better practices and make a pull request, let me know.

BVengo commented 1 year ago

It's an interesting idea, but I'm not entirely sold on showing a big item overlaying the shulker since it makes reading the inventory a lot harder (am I grabbing my spare stack of blocks, or a shulker containing them?).

If possible, I'd rather keep the two ideas (swapping icons / showing a full indicator) separate. I think it will help control the customisability and clean look of future implementation.

vlad2305m commented 1 year ago

Screenshot_20230411_164159 Here's default settings. I just enlarged the normal overlay to see it better. (The box is missing 1 redstone block) The issue is just differentianting between a full and a partial box, which is kindof a big deal in TMC

BVengo commented 1 year ago

The recent commit addresses the original request in this issue.

Implementation 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:

Comments I know the original request was to display an extra icon for a full shulkerbox, however I feel this will end up cluttering the display too much. I also think switching the display order will make inventories a bit confusing for the majority of users.

This particular implementation attempts to provide finer control over stack displays, and using the second example above will allow you to see which shulkers are completely filled without cluttering the UI too much.

AdamRaichu commented 1 year ago

This issue is still open. I believe you meant to close it using keywords but that didn't work right.

BVengo commented 1 year ago

Not yet. I am waiting for feedback from @vlad2305m because my changes weren't identical to the request, with plans to close the issue when the 1.20 version is released if there are no actionable responses.

vlad2305m commented 1 year ago

Maybe this goes direcly against the notion of this mod being "simple", but I am not willing to give up the preview just in order to see the full boxes. (Maybe there could be a hotkey, but that would be even less simple.) Thank you for implementing the feature anyway, but for the time being I will maintain a fork of this for the technical Minecraft community, who don't mind clutter so long as it's useful. A solution would be to provide an option to turn this on, which is fine for the majority of users, who never open the options screen. Then, TMC member have the ability to put a default config file in the modpack, and it is a win-win for everybody? Sorry for such a coarse response. After refactoring your code to accomodate that feature, I do understand that it is not an easy thing to do. Maybe asking for that was too much?

BVengo commented 1 year ago

image

Hi @vlad2305m , I have now implemented a feature similar to damage bars / bundle capacity that will appear in the upcoming 1.20.1 release. I'll close this now, but let me if you have any further thoughts for implementation :)