BG-Software-LLC / WildChests

Sell chests, auto crafters, storage units, larger chests and more in one plugin!
https://bg-software.com/wildchests/
GNU General Public License v3.0
39 stars 23 forks source link

Hoppers push into wildchest items AFTER pulling, instead of before. #153

Closed zaphod77 closed 1 year ago

zaphod77 commented 1 year ago

Minecraft's Version

1.19.3 pufferfish

Plugin's Version

86 11/12/2022 16:12:18 (latest supposedly)

Describe the bug

You should be able to use storage units to make a sorter without comparators but it doesn't work. Even with stacked hoppers pointing sideways, it goes clear to the bottom even if it should go into the storage unit.

To Reproduce

Place three hoppers on top of each other all pointing sideways at a temporary block. Remove the temporary blocks Place a storage unit in front of the bottom two hoppers. place two different items in the top hopper.

One item should go into the first empty storage unit, and the second item should go into the second storage unit.

Instead, one goes into the second unit, and nothing goes into the first because the hopper below pulls it out too quickly, even though it should have been able to do the push.

If there is no hopper below, then it pushes into the storage unit fine if the item matches or it's empty. but if there is one below it drops down instead of going into the storage unit, in defiance of normal hopper logic.

Additional Information

I suspect it's because pushing into custom items is being processed after the pulls instead of before, even though all pushes are supposed to be before all pulls, and all on the same tick. if this actually worked, we could use linked chests to create a massive storage unit sorter to hold every type of item infinitely. (well would probably break at 10 million, that should be the default limit..)

OmerBenGera commented 1 year ago

Do you mind taking a video or a picture of the way I should layout the hoppers? This way I will not do it wrong and hopefully I will be able to replicate it as well.

zaphod77 commented 1 year ago

i thought my description was very clear. all three stacked on top of each other, pointing sideways, and storage units in front of the bottom two. :)

H HS HS

with all three pointing to the right (>) in my crude ascii drawing. :)

be sure to use the same server software (pufferfish from pufferrish.host)

it's the usual setup for vertically stacked chests with hoppers going into their sides, except using storage units. :)

OmerBenGera commented 1 year ago

I'd like you to take a video of the issue or at least a screenshot.

zaphod77 commented 1 year ago

I'm not sure how to get a video, and screenshots won't show anything but the setup, which is the basic accessible storage silo, but with storage units instead.

https://minecraft.fandom.com/wiki/Tutorials/Hopper#Storage_silos

what should happen is each unique item goes into a different storage unit. instead, they all go down to the bottom.

This may be the fautt of pufferfish. i haven't tested on normal spigot or paper yet. but the accessible storage silo works fine with normal chests..

On Thu, Jan 12, 2023 at 1:23 PM Ome_R @.***> wrote:

I'd like you to take a video of the issue or at least a screenshot.

— Reply to this email directly, view it on GitHub https://github.com/BG-Software-LLC/WildChests/issues/153#issuecomment-1380898997, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQL7ZLWAQSZBNVHKIQDPHLWSBKWHANCNFSM6AAAAAATTWBDWA . You are receiving this because you authored the thread.Message ID: @.***>

zaphod77 commented 1 year ago

http://eunich.cochems.com/~zaphod/bug.mp4 finally got video. first showing a working storage unit. then showing it not working with hoppers aiming sideways into it

ImNotStable commented 1 year ago

That isn't a bug that's a feature of Minecraft the bottom chest must be full and the hopper connected to it aswell

zaphod77 commented 1 year ago

That is NOT true. try it with normal chests. they fill from TOP TO BOTTOM.

you are thinking of a different trick.

Hoppers first push, then pull. both actions happen in the same tick, but all pushes are before all pulls. so normally the hopper will push one out to the side before the one below pulls one down.

This SHOULD work, and yet it doesn't.

The issue is that when the push fails due to unrecgnized destination item, so it schedules the new hook to allow pushing into storage units, most likely at the end of the tick, but by then, it's already pulled out by the hopper below. when that one tries to push, again it's delayed because it's a storage unit, not a chest, and again the hopper below pulls it away too fast. so none of it goes into the storage units, and ALL of t goes into the overflow chest.

When you do the same, but with normal chests, they fill top to bottom properly. Try it yourself.

On Mon, Jan 16, 2023 at 12:16 AM ImNotStable @.***> wrote:

That isn't a bug that's a feature of Minecraft the bottom chest must be full and the hopper connected to it aswell

— Reply to this email directly, view it on GitHub https://github.com/BG-Software-LLC/WildChests/issues/153#issuecomment-1383543129, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQL7ZIYAWBNXNHQG57PP2TWSTRO5ANCNFSM6AAAAAATTWBDWA . You are receiving this because you authored the thread.Message ID: @.***>

ImNotStable commented 1 year ago

I've tested Vanilla chests in 1.19.3, the items end up in both the top and bottom chest IF YOU PUT MULTIPLE ITEMS IN THE TOP HOPPER I've tested Paper which doesn't change how hoppers work And I've tested WildChests which works exactly like Vanilla and Paper hoppers

Do your due diligence before making claims like this, the normal Minecraft mechanic is it pulls before pushing which is why the items end up in the bottom, many servers make it so hoppers work faster which makes it so the hopper doesn't put any items in the top chest and they all end up in the bottom. I was partially wrong as I had the mindset of the hoppers being able to transfer items faster, but still, this is a normal Minecraft mechanic.

ImNotStable commented 1 year ago

I realized you used multiple items, to mirror vanilla behavior go to your spigot.yml and change these values

ticks-per: hopper-transfer: 8 hopper-check: 1 hopper-amount: 1

zaphod77 commented 1 year ago

Do what i did in the video. but use normal chests. they fill from top to bottom.

the first chest fills with items, then the second chest fills with items, then the third chest fills with items.

Quoth the wiki.

"Item pushes and pulls are processed in the same game tick, but pushes are processed before pulls. "

The hoppers are pushing and pulling one item at once on the server. That's clear from my video. you can see them going down one at a time.

If I have to, i will make a second video showing the accessible storage silo using normal chest, and prove that it fills top to bottom.

I'm well aware this may be a weird fault in pufferfish, so i asked people to reproduce it there, but the hoppers settings are 100% vanilla.

The correct behavior would be each storage unit being filled with a different item. If this happens for you in testing, then it's a fault with pufferfish. Airplane also has weird behavior, and that's confirmed. but pufferfish claims 100% compatability with paper.

I can try and replace it with a stock paper and see if the issue persists.

OmerBenGera commented 1 year ago

I tried it on Paper with regular chests and the items are going to the bottom chest. It seems like vanilla behavior.

zaphod77 commented 1 year ago

That's definitely not vanilla behavior.

WIthout Wildchests installed, they 100% fill from top to bottom.

Run the same test on normal chests without the plugin enabled.

Is this some feature of the plugin put i on purpose to make storage silos more convenient?

wow. okay. seems this is a Mojang change after all. i know in the past vanilla worked exactly as i described. now stuff teleports clear down to the lowest hopper in the chain. it was not like this before.

There seems to be new code that detects the storage silo and forces stuff to the bottom somehow.

OmerBenGera commented 1 year ago

In general, WildChests doesn't change the hoppers behavior at all So even if it wasn't a change of Mojang, I'd say it is not a fault of WildChests