Quark icon indicating copy to clipboard operation
Quark copied to clipboard

Stacks of seed pouches behave badly (1.19.2, bigger stacks)

Open LlubNek opened this issue 2 years ago • 8 comments

When a stack of seeds is right clicked onto a stack of seed pouches, the stack of seeds is added to all the seed pouches the stack of seed pouches can then be divided, resulting in item duplication.

Recommended solution: When a stack of seeds is right clicked onto a stack of seed pouches, the stack size of stack of seed pouches decreases by 1 and a populated seed pouch is added to the inventory or dropped if the inventory is full.

Note: bigger stacks is not the only way to get stacks of unstackable items. Any other mod that does something similar will have the same issue.

See also the other issue I just created for another problem relating to stacks of pouches.

Minecraft 1.19.2 forge 43.2.21 quark 3.4-405 AutoRegLib 1.8.2-55 bigger stacks 1.19.2-3.8.1

log n/a

Use this for config/biggerstacks-rules.xml:

<ruleset>
	<!-- stackable seed pouches -->
	<rule stacksize="64">
		<condition>id = quark:seed_pouch</condition>
	</rule>
</ruleset>

LlubNek avatar Aug 06 '23 02:08 LlubNek

Would also need to handle adding seeds to a stack of populated pouches...

Maybe when the user tries to stack two pouches containing the same thing, transfer items from one pouch to the other instead.

LlubNek avatar Aug 06 '23 02:08 LlubNek

I don't think that you should be making container items stackable.

yrsegal avatar Aug 12 '23 16:08 yrsegal

I added a safery checks to not allow transfer for stacks greater than 1 just incase

MehVahdJukaar avatar Aug 15 '23 22:08 MehVahdJukaar

I don't think that you should be making container items stackable.

Stacking empty pouches is useful at least, or letting them go into bundles maybe (like bundles themselves).

LlubNek avatar Aug 20 '23 11:08 LlubNek

I added a safery checks to not allow transfer for stacks greater than 1 just incase

I haven't tested it yet, but I think this would still allow populated seed pouches to be stacked after they're filled, and you'd run into problems when using the world interaction features of such stacks (decreasing the item count of all seed pouches in the stack).

LlubNek avatar Aug 20 '23 11:08 LlubNek

It shouldn't as they would have different nbt. Should however prevent those interactions when stacks are more than 1

MehVahdJukaar avatar Aug 20 '23 12:08 MehVahdJukaar

if it's the same count and the same items inside, it's the same NBT. If someone put 64 wheat seeds in each seed pouch, they could then stack those seed pouches.

I submitted a similar bug report for Utilitix mob yoinkers a little while ago. There it wasn't an issue, because with populated yoinkers the mob had enough NBT data to make the populated yoinker unique, and easy villagers never had a problem to begin with for the same reason. But there isn't much NBT data for a seed item, so same seed, same count = same NBT, and they stack.

LlubNek avatar Aug 20 '23 19:08 LlubNek

Looking at this again. I think the best way to fix this would be officially allowing empty seed pouches to stack so you don't need to use a hacky stack-increasing mod anyway, a third-party mod is not able to understand when to disallow Quark's interactions.

Itemstack sensitive "getMaxStackSize" is a forge extension so I can't use it directly in quark

quat1024 avatar Feb 11 '24 15:02 quat1024