Sophisticated Core

Sophisticated Core

65M Downloads

Pickup upgrade not working with Ars Nouveau pickup spell

theboo opened this issue ยท 7 comments

commented

Putting this here because I think this is where the pickup upgrade is... This is an issue that existed early in 1.16 but you helped ars use the correct forge pickup events properly to make it work with the backpack pickup upgrade... In 1.21.1 neo, they no longer work together. Ars pickup glyph puts the items in my inventory but they never end up in the backpack.

As someone who knows mostly nothing, it looks like ars is using the correct neo events here: https://github.com/baileyholl/Ars-Nouveau/blob/5133633386148144c2d19e2190c11208f826775d/src/main/java/com/hollingsworth/arsnouveau/common/spell/effect/EffectPickup.java#L40

This has been reported to ars as well(in their 1.21 testing channel on discord), unsure which side is at fault here haha...

commented

made a quick instance with just ars, jei, sophisticated mods and dependencies, same result for me: https://gyazo.com/dfb650512bef7a8a3c64ab8e196a5152

neo 1.21.1 v21.1.72, all other mods whatever is latest on curseforge

commented

I am actually unable to recreate this one - when I try to use the pickup spell the backpack properly picks up the item. Maybe your pickup filter is preventing the item from being pulled in?

commented

here's a gif of what i am experiencing in enigmatica 10 v 1.12.0, maybe we have some other mod conflicting? That's gonna be a nightmare to track down if so lol. i tried both block and allow mode on the advanced pickup filter.

https://gyazo.com/a8649a1db81ab0697e521126ea78fc3d

commented

just to be sure i tried with the basic pickup upgrade as well, same result

commented

Ok found out why this is behaving the way it is - the sophisticated pickup upgrades will only pickup stacks that have pickupDelay at 0 - think of when you as a player drop an item on the ground and it takes a bit of time before you can pick it up again. If the pickup upgrades were not respecting that you wouldn't be able to drop anything out of backpacks without turning their pickup upgrades off first because the moment stack would be dropped the backpack would immediately pick it up.

Now ars pickup spell doesn't have that check which makes sense because you're casting the spell to pickup stack so it should just pick it up regardless of the pickup delay. And I actually wasn't able to recreate before because I would drop stack on the ground and then cast spell to pick it up which was cast after delay was over so it went in the backpack.

In this case the only solution I can see is have the pickup spell modify the item entity to 0 pickup delay before passing it over in the pickup event. Shouldn't really cause any issues as the pickup spell anyway doesn't look at it and would have any other mod that checks for pickupDelay of 0 trigger properly because anyway you as a player are intentionally saying you want to pickup the stack now.

commented

One more note on this - I was wondering when exactly and why I added the pickup delay check and it turns out it was added as part of 1.21 port because apparently in there the usual player pickup has changed so that the even is fired the moment a player touches stack regardless of its pickupDelay where prior to 1.21 the even would only be fired after the pickupDelay is at 0. So the only way for me to keep parity with previous versions (where you are able to drop stacks out of backpack with pickup upgrade) is adding that pickupDelay check.

commented

awesome, thanks for all the info! ars has implemented the pickup delay for their next release!