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

Problems interacting strangely with mods such as wooden hopper #4

Closed
citric-sulfur opened this issue Jul 4, 2023 · 4 comments
Closed

Comments

@citric-sulfur
Copy link

debug.log
latest.log

javaw_aI0uytkTgJ
It is not composted and is stored.
Destroying the composter in this state does not drop the seeds.

javaw_TvNkxwO148
Must use wooden hopper again to eject.

javaw_XF9aAKlFPF
All items will be stored.

javaw_Du98mykPTX
javaw_6GBMDAT7YR
The same problem occurs with similar blocks in different mods.

@yurisuika
Copy link
Owner

Ah, okay it didn't occur to me when you said wooden hopper that you were referring to a mod. For some reason the wooden part of the composter and the hopper amalgamated in my mind and it just went through me.

So, on Forge for some reason it is all screwy and I had to disable insertHook of Forge's VanillaInventoryCodeHooks from running because this was happening with the vanilla hopper. I cannot figure out what exactly goes wrong with it, so just stopping this if statement from returning true makes it work with the vanilla hopper. I don't know if it has any side effects, but it was enough to get it going.
image

Unless I can figure out what can actually be fixed with that, you will have to use a version of the mod prior to 1.2.0 if you want it to work with this mod, This is only a problem with the Forge version, the Fabric one did not need this workaround.

@yurisuika
Copy link
Owner

Good news! I finally figured out the issue. It had to use Forge's ItemStackHandler for an inventory. Will probably have the update out tomorrow.

@yurisuika
Copy link
Owner

Well it turns out I was wrong, it actually didn't fix it because I was testing the Fabric version on Forge. I was dead tired at the time so you can blame it on that haha. But after a bit more research today I figured out the real issue and have confirmed it to now work! We'll see, I might still be able to get a release out tonight.

@yurisuika
Copy link
Owner

yurisuika commented Jan 15, 2024

The issue was specifically that the blockentity did not override the isValid method, which is basically the canInsert method without the side parameter. It wasn't till I was looking through another mod that uses mojmaps instead of yarn that this realization came to me, as those methods are called canPlaceItem and canPlaceItemThroughFace there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants