Spectrum

Spectrum

2M Downloads

[Question] Possible to reliably automate Midnight Dipping?

ianjsikes opened this issue ยท 4 comments

commented

(apologies for labeling this as a "bug"... it isn't really a bug or a feature, more a question)

Describe the bug

I haven't been able to reliably automate Midnight Dipping. My setup is as shown:
image
A cobble generator & chute (hopper) continually drops cobblestone into the Midnight Solution. A filtered hopper below the solution pulls out Netherrack.

This works sometimes... Often, the cobblestone will just slowly pile up inside the solution without ever converting. I've tried varying the rate at which cobble is dropped into the solution, but it seems very inconsistent. I believe this is the relevant line for converting items, but I don't know enough about to modding to know what's wrong here. Maybe it has something to do with dropped items merging with other dropped items to form a stack, thus creating a new entity with a different age? Just spitballing...

// src/main/java/de/dafuqs/spectrum/blocks/fluid/MidnightSolutionFluidBlock.java#L116

} else if (entity instanceof ItemEntity itemEntity && itemEntity.age % 120 == 0 && !itemEntity.cannotPickup()) { // cannotPickup: looks nicer, also exploit protection

To Reproduce
Set up a system like the one I've shown above. The blocks from other mods are probably not relevant, you can do the same thing with a vanilla chest full of cobble and a hopper.

Mod version

Mod: v1.4.2-1.18.2-chaos_and_exploration
Pack: All of Fabric 5 (1.18.2)

commented

Pretty sure if item entities merge, they merge into the "newest" one with least age (so they have a longer despawn timer). itemEntity.age % 120 will not match, as you guessed. As soon as a item entity is full of 64 items, this /should/ not happen anymore. I can try it out tomorrow.

commented

Tried to do something similar but with Create's Brass Funnel (instead of the Smart Chute like in the picture) today, the way they work is that they will only put new items into the liquid once the other ones are already gone (picked up after conversion). So there's ever only one stack that drops and no merging occurs, so no messing with item stack age

However this still does not work, like the original post said it works sometimes but most of the time it just gets stuck

I would like to add that this happens regardless of the automation, Midnight Dipping in my experience has been very unreliable, sometimes taking so long that the items despawn before anything happens, while other times being nearly instant

Picking the liquid up and putting it down again repeatedly sometimes helped but not sure if it wasn't just pure chance

commented

Seems to work perfectly fine with Spectrum alone.
Can you try standalone, not in a big modpack, if the issue still occurs?
If no, your pack seems to have a mod that is interfering. If you can figure out which mod it is, them or me can get it fixed

commented

Caused in combination with Lithium.
With lithium, the fluid collision only triggers every 4 ticks (so age=1, age=5, age=9), which makes the itemEntity.age % 120 == 0 check not trigger in 3/4 of all cases.

I removed my age check to make it work more reliably, but at the cost of performance. Ironic.