Quark Oddities

Quark Oddities

22M Downloads

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

LlubNek opened this issue ยท 8 comments

commented

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>
commented

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

commented

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.

commented

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

commented

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).

commented

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

commented

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).

commented

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.

commented

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