klikli-dev / occultism

A magic mod inspired by the world of Jonathan Stroud's Bartimaeus. With the help of occult rituals players can summon entities from the "Other Side" to perform magic.
https://www.curseforge.com/minecraft/mc-mods/occultism
MIT License
70 stars 43 forks source link

Transporter seems to void items if it cant place them in the inventory they are set to deposit to. #1148

Closed Pilpoh closed 1 month ago

Pilpoh commented 1 month ago

Describe the bug Transporter seems to void items if it cant place them in the inventory they are set to deposit to.

To Reproduce Steps to reproduce the behavior:

  1. Bind a Transporter to an inventory (I used an interface from AE2) as Exract
  2. Bind the Transporter to another inventory (I used a Crushing Spirit)
  3. If the inventory is full the items being transported seem to be voided off (all my raw ores got voided)

Expected behavior Transporter waits with items if it cant place them in the inventory they are set to deposit to until it can place them in that inventory.

System (please complete the following information):

Additional context You are awesome. Keep up the great work :)

AdelinPanait commented 1 month ago

Happened to me as well recently so I did some testing, it doesn't work with full chests, the transporter waits for a free slot before trying to add the item to them.

I think the issue is with the Crusher itself accepting items even thou it doesn't have any free slots and deleting them.

klikli-dev commented 1 month ago

Thanks for reporting and investigating, I will look into that. Can't have them eat items!

klikli-dev commented 1 month ago

@Pilpoh @AdelinPanait can you provide a step by step repro? I tried with a chest, crusher spirit, transporter spirit, and iron + copper ore and it placed copper ore in the crusher and did not void iron ore but held it in the transporter inventory

EDIT: maybe it's a mod interaction thing or a specific neo version?

AdelinPanait commented 1 month ago

Hi, so I did some more testing, now without any other mods, only the occultism required ones and the transporter waits for the crusher to finish an ore before adding the other items (as intended). So this definitely is a mod interaction issue, will test by adding mods one by one( or in groups if it requires other mods to work) until I find which mod causes it. Will update later tonight, after work.

Pilpoh commented 1 month ago

I got a little video of it that might help https://youtu.be/ooc2mMmfRNA

I also tried it with a barrel and the transporter does still seem to void off items. i had 2 stacks of copper and 1 iron raw and once the first stack of copper went in and was starting to be crushed, the iron raw got voided :/

klikli-dev commented 1 month ago

Hi, so I did some more testing, now without any other mods, only the occultism required ones and the transporter waits for the crusher to finish an ore before adding the other items (as intended). So this definitely is a mod interaction issue, will test by adding mods one by one( or in groups if it requires other mods to work) until I find which mod causes it. Will update later tonight, after work.

Thanks a lot that would be great. If we know the mod combination we can figure out where it is coming from to report there and work with them to fix it

AdelinPanait commented 1 month ago

Ok, so I finished my testing, using the following mods will result in the bug: -Glodium-1.21-1.2-neoforge -hardenedarmadillos-1.21.0-0.1.0 -getittogetherdrops-neoforge-1.21-1.3.1 -fuelgoeshere-1.21.0-1.0.2

All these mods need to be used in combination to result in the bug, I tested with removing them and see if maybe only one of them causes the issue, but it only happens when all four of them are used. Haven't been able to test if there are other combinations because i bubble sorted the mods until I was left with this list (testing all combinations would not be feasible, there's too many combination)

The occultism mods used are : -occultism-1.21-neoforge-1.135.0 -geckolib-neoforge-1.21-4.5.6 -SmartBrainLib-neoforge-1.21-1.14.4 -modonomicon-1.21-neoforge-1.94.0

klikli-dev commented 1 month ago

Thanks a lot! I will try to reproduce it with these four in the dev env and see if I can make sense of it

klikli-dev commented 1 month ago

@AdelinPanait I tried with these mods in dev and the error does not happen. What neoforge version are you using? I had 21.0.76-beta

AdelinPanait commented 1 month ago

Hi, sorry for not mentioning it before. I used neoforge 21.0.65-beta

klikli-dev commented 1 month ago

Thanks! I just managed to reproduce it in a "live" build of latest neo, so neo version seems not to be the issue. It is odd though that it won't happen in dev

AdelinPanait commented 1 month ago

posted a proof video of using only those mods here (didnt have time to edit it): https://youtu.be/3VKTaIfpfgM

I tested with removing 3 of those mods and keeping the rest, currently looking for another mod combination that causes it since I tried removing everything but Glodium( some mods required it) and I saw it happen then also, so I am looking into other combinations

klikli-dev commented 1 month ago

@AdelinPanait I think I am onto something, but I am not sure what is going on. So basically in a curseforge pack when I ask for the inventory capability of the crusher I do not get the crusher inventory, but rather a virtual inventory that consists of the "item in hand" and the "armor" slot.

Something seems to go wrong with that. I think I have all the info I need to proceed, I will have to ask the neo people how to approach this

klikli-dev commented 1 month ago

Ok, thank you all for your help! I found a workaround, the underlying problem is in my opinion how Neoforge handles entity capabilities/inventories.

The way it is currently set up leads to a certain random element that impacts whether a particular pack returns the modded inventory or the (virtual) vanilla inventory.