Botania

Botania

133M Downloads

Hopperhock no longer has shortened pickup delay for mana infusion outputs

TheRealWormbo opened this issue · 2 comments

commented

Mod Loader

Forge

Minecraft Version

1.18.2

Botania version

1.18.2-432

Modloader version

Forge: 40.1.25

Modpack info

Plain Forge profile in GDLauncher with Botania and its dependencies

The latest.log file

https://gist.github.com/TheRealWormbo/800b8b09b160e0db1b507fdf37de4918

Issue description

Mana infusion output items are subject to the same 3 second pickup delay for hopperhocks as any other item dropped into the world. There used to be a special case for mana infusion results that would grab the output items after a delay of only a few ticks. Without that, automating mana infusion gets a lot more complicated.
The code suggests there is still some kind of infusion cooldown, but it is entirely irrelevant, since mana infusion outputs do not override the much longer inherent functional flower interaction cooldown.

Steps to reproduce

  1. Place mana pool, fill it with mana. (e.g. Everlasting Guilty Pool)
  2. Place hopperhock such that items dropped into the pool or generated as output are within pickup range.
  3. Place an item container (e.g. chest) next to the hopperhock.
  4. Throw an item into the pool that has a mana infusion recipe, e.g. a iron ingot.

Expected result: Hopperhock does not pick up the iron ingot, but quickly grabs the resulting manasteel ingot.
Observed result: Hopperhock does not pick up the iron ingot, but lets the manasteel ingot linger for about 3 seconds, as if it was dropped by a player.

Other information

This is an issue especially for recipes which produce an output that itself is an input, such as any conjuration catalyst recipes and any of the conversion cycles with an alchemy catalyst. Since the output item very likely lands on the pool again before the 3 second delay is over, things can get out of hand very quickly until the pool's mana content is drained.

commented

I commented on reddit, but it would be nice for investigation if someone researched how this used to behave in older versions. There was a lot of code cleanup done on the timers/cooldowns so it's possible something was broken.

commented

Some notes on the old item age behavior, based on the 1.16 Forge branch code (I vaguely remember seeing the same numbers in the 1.12 branch, but did not check for this summary):

  • By default items start with an age of 0, and it increases by 1 every game tick (That's just vanilla/forge default, age 6000 is the default item lifespan.)
  • Open (and Crafty) Crates set the age of the dropped item to -200 (i.e. it only reaches 0 after 10 seconds) if the crate is redstone-powered while ejecting the item
  • Mana pools set the age of a mana infusion result to 105 when spawning the item
  • Mana pools ignore items with an age between 100 and 130 for their mana infusion processing
  • Flowers that care about items determine a separate "slowdown" value based on the soil they are planted on – podzol = 5 ticks, mycelium = 10 ticks, everything else 0 ticks
  • Endoflames consume items with an age above or equal to 59 + slowdown (I assume to not accidentally burn a player's dropped bow, since items dropped by a player have a pickup delay of 40 ticks; but it's still faster than a hopperhock)
  • Gourmaryllis and Spectrolus consume items with an age above or equal to 0 + slowdown
  • Hopperhocks ignore items with an age below 60 + slowdown, but also the age range of 105 (inclusive, i.e. the age a mana pool sets) to 110 (exclusive, i.e. a 5 tick cooldown, I assume so players can grab the item first)
  • Daffomill pushes items with an age above or equal to the slowdown
  • Labellia (which existed, but I think was not actually released yet?), Pollidisiac, Rannuncarpus, and Spectranthemum all ignore items with an age below 60 + slowdown

So, relevant to this bug:

  • Mana pools had a cooldown of 25 ticks before they reconsidered mana infusion results for processing
  • Hopperhocks had a fixed 5 tick delay before picking up mana infusion results
  • any other flowers that might care about the item type produced by a mana infusion did not have any delays (i.e. a Spectranthemum could teleport the item immediately)