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

Let it be more than 64 stacks of item on the ground at the same time. #17503

Open
4 tasks done
CatsLeftEar opened this issue Sep 28, 2024 · 7 comments
Open
4 tasks done

Comments

@CatsLeftEar
Copy link

Your GTNH Discord Username

Keyla3300

Your Pack Version

2.6.1

Your Proposal

Let it be more than 64 stacks of same item on the ground at the same time. When breaking a barrel, for example, with 128 stacks of item, you will only get 64 stacks after its broken by accident (and some more if you are lucky by picking up some stacks in your inventory). All stacks over the limit are just voided.

Your Goal

Make items not void

Your Vision

Group same items in one stack by texture, but let there be next to infinite amount of items on the ground

Final Checklist

  • I have searched this issue tracker and there is nothing similar already. Posting on a closed issue saying I like this change please reconsider adding it will prompt us to investigate and reopen it once we confirm your report.
  • I understand this change request may not attract enough attention and thus not be implemented.
  • I understand this change request may be rejected due to other community members think it's inappropriate.
  • I believe this feature would make the pack better.
@CatsLeftEar CatsLeftEar added Status: Triage Issue awaiting triage. Remove once this issue is processed Suggestion labels Sep 28, 2024
@dvdmandt
Copy link

I don't think it's a limit of how many stacks can be on the ground, I believe it's a special handling of breaking drawers so that they don't spawn thousands of stacks at once, crashing the server.

@CatsLeftEar
Copy link
Author

I don't think it's a limit of how many stacks can be on the ground, I believe it's a special handling of breaking drawers so that they don't spawn thousands of stacks at once, crashing the server.

Could be, i have only tested it with the barrel

@dvdmandt
Copy link

I could definitely be wrong about how it was implemented, but I'm pretty sure the reason for it is that it slows down performance to the level where the server essentially stops responding. Just removing the limit would bring back that issue, so that's not really an option. What would perhaps be a solution would be to somehow merge stacks into some form of superstack, but since it hasn't already been done, I'm guessing it's non-trivial to do so.

@RecursivePineapple
Copy link

You can easily make a single EntityItem with more than 64 items by just setting the stackSize to a higher value. I'm not sure if there are any side effects, but it worked fine when I tested it (I tested stacks of a few hundred).

@dvdmandt
Copy link

I know I was looking at some mod that was designed for that purpose (merging item stacks and xp orbs) and they had crossed over arbitrary size for item stacks and had it at 127 max due to "vanilla limitations". Did you try those big item stacks across network etc?

@RecursivePineapple
Copy link

It looks like ItemStacks cast their stackSize to a byte in writeToNBT, so that could be the problem.
It would be trivial to subclass EntityItem and override the nbt serialization, which is what I'll probably do. Thanks for pointing that out, I probably wouldn't've found it on my own.

@dvdmandt
Copy link

That sounds like a likely cause of the limitations they mentioned indeed. Also need to verify compatibility with other stuff that interacts with items on ground, like golems, Botania flowers, hoppers etc, but that seems doable. Do we have any entity counters or stuff like weighted pressure plates that could break?

@Yamnasm Yamnasm added Type: QoL Type: Not GTNH About a non-GTNH usecase. Can still be relevant for GTNH or can be on an actively supported mod. and removed Status: Triage Issue awaiting triage. Remove once this issue is processed Type: Not GTNH About a non-GTNH usecase. Can still be relevant for GTNH or can be on an actively supported mod. labels Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants