Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-Inventory List Max Stack Size #7229

Open
LunaSquee opened this issue Apr 9, 2018 · 10 comments
Open

Per-Inventory List Max Stack Size #7229

LunaSquee opened this issue Apr 9, 2018 · 10 comments
Labels
Concept approved Approved by a core dev: PRs welcomed! Feature request Issues that request the addition or enhancement of a feature @ Script API

Comments

@LunaSquee
Copy link
Contributor

Issue type
  • Feature request
Summary

It would be neat if we could set the max stack size on a list in an inventory in order to create storage system GUIs that condense multiple stacks into one. This would be extremely useful in mods like Refined Storage, Applied Enertistics, Storage Interface, etc.

Taking an item from this list would just give the player a normal stack size of said item.

@Fixer-007
Copy link
Contributor

Fixer-007 commented Apr 9, 2018

Absence of this feature holds back development of storage mods that involve condensing blocks into larger stacks. Here is example from mod called storage-interface by @cx384 that will benefit, as well as new holostorage mod.
default

@ghost
Copy link

ghost commented Apr 9, 2018

Since changing the maximum stack size from arbitrary 99 to something that makes actual sense (any value roughly around 90-100 in base 2 or base 10 or base 16) is discussed into oblivion and won’t be changed ever, I highly doubt that it would be changed/configurable based on inventory the stack is in.

@rubenwardy
Copy link
Member

I like this. Should this be a per-list maximum for all items? Should it be per-stack as meta data? I prefer the former, although it's not as versatile, as it's simpler and less likely to have issues.

@paramat paramat added the Feature request Issues that request the addition or enhancement of a feature label Apr 9, 2018
@paramat
Copy link
Contributor

paramat commented Apr 9, 2018

I prefer per-list too.

@LunaSquee
Copy link
Contributor Author

Yes, per list is what I mean. Sorry for the confusion.

@LunaSquee LunaSquee changed the title Per-Inventory Max Stack Size Per-Inventory List Max Stack Size Apr 9, 2018
@paramat
Copy link
Contributor

paramat commented Apr 9, 2018

No confusion, you were clear this is per-list. I think rubenwardy was just wondering, maybe due to the other issue that is for per-stack #5730

@paramat paramat added the Concept approved Approved by a core dev: PRs welcomed! label Apr 21, 2019
@AKryukov92
Copy link

While this is not implemented I can describe workaround of this issue for containers.

Some time ago I played on Xanadu with shops mod. I was able to set up shop which takes 999 cobble from player and gives him 1 dirt. This way I have managed to compress enormous amount of cobble to single chest.
So I assume if you want container with larger stacks, you need to implement storage which moves items with lua instead of drag&drop.

@beepbopbeepboop
Copy link

No mods to the base system are necessary to do this. See microexpansion which handles up to 2^16 items per stack. I have a round of changes to bump this up to 2^48 or so, but the UI is lightly less pretty (I show a nominal count (2^15 items), and manage the real count on on_put, on_take and so on. This inelegant UI I think can be improved, by displaying the count with the item description or the short description and having the UI not display the count.
One just has to handle metadata stripping on remove, and adding on insert as appropriate.

But, that said, we'd benefit if ItemStack could make a 2^48 count in a fat stack and leave the interface alone and update the UI code to handle and display the fat ItemStack as well. minecraft mods often like inventories in the 2^32 range, 2^16 is just simply too small.

Another solution is to make a manager like lwcomponents, the UI there is just buttons, and the semantics are anything you want to program. So, in short, you can write a library to abstract and handle the entire work load for you.

@SwissalpS
Copy link
Contributor

it shouldn't be possible to stack items with max size of 1 e.g. many types of tools shouldn't become stackable by this.

@beepbopbeepboop
Copy link

It is and it works perfectly? Now what? Or, put another way, what breaks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Concept approved Approved by a core dev: PRs welcomed! Feature request Issues that request the addition or enhancement of a feature @ Script API
Projects
None yet
Development

No branches or pull requests

8 participants