Botania

Botania

133M Downloads

Agricarnation has conflicting requirement and effect

TheRealWormbo opened this issue ยท 2 comments

commented

Mod Loader

Both Fabric and Forge (I confirm that I have tested both loaders and will specify both loader versions below)

Minecraft Version

1.20.1

Botania version

443

Modloader version

(any)

Modpack info

No response

The latest.log file

(n/a)

Issue description

Currently the Agricarnation flower explicitly looks for plants that are bonemeal targets, but then only random-ticks them, without even checking if the target even accepts random ticks. This leads to a couple inconsistencies:

  • azalea bushes do not grow, even though they should probably be considered saplings
  • cactus and sugarcane is ignored, which is intentional (see #856) but apparently not obvious
  • on the other hand, very similar blocks like bamboo and twisting vines are boosted by the Agricarnation's effect
  • some blocks like rooted dirt, glow lichen, or mangrove leaves cause the flower to consume mana without having any effect, because they can be bonemealed but not random-ticked
  • hanging plants (glowberry vines, weeping vines) only have their top block randon-ticked, which does nothing for the rest of the plant, which grows downwards; in fact, after having grown to at least two blocks height, such vines cause the flower to consume mana without doing actually anything (glowberry vines don't even grow glowberries this way)

Steps to reproduce

No response

Other information

Agricarnation not growing sugarcane was declared intentional a long time ago, as even back then it checked that target blocks could accept bonemeal. However even back then it instead triggered block updates, which at the time where equivalent to random ticks for blocks that cared about those.

commented

A proposal on how to make the Agricarnation more consistent:

  • by default it assumes all blocks as candidate blocks, if they extend BushBlock (no more hard-coded exceptions here) or accept bonemeal
  • additional candidate blocks can be specified via block tag (e.g. #botania:agricarnation/growth_candidate)
  • candidate blocks are excluded if they do not support random ticking
  • additional candidate block exclusions can be defined via block tag (e.g. #botania:agricarnation/exclude)

For comparison, the current behavior:

  • block must not be a spreading grass/mycelium-type block
  • blocks are considered candidate blocks if they accept bonemeal
  • if the block extends BushBlock, but not a known subclass of that, it is excluded
  • previously there was an additional restriction on supported block materials (specifically: plant, cactus, grass, leaves, vegetable, water plant, bamboo, and bamboo sapling), but materials are no longer a thing

Examples of how this would change the affected set of vanilla blocks:

  • now boosted, but can optionally be excluded via tag:
    • netherwart (previously a "won't fix" bug: #643)
    • brown and red vanilla mushrooms (for spreading, not growing into tall version)
    • pumpkins/melons, not just their stems (there never was any bug report about those)
    • any modded crops that just happen to extend BushBlock, but not one of its previously allowed subclasses
  • still not boosted by default, but now optionally supported through tags:
    • sugarcane and cactus
    • chorus trees (chorus flowers, specifically)
    • vines (the original flat ones)
  • no longer considered (because they would fail to be boosted anyway):
    • azalea saplings
    • mangrove leaves
    • "body blocks" of bonemeal-accepting multi-block plants, such as kelp or glowberry vines (the "head block" still gets growth boosts)
  • no explicit exclusion required anymore, because even though bonemeal is accepted, random ticks are not:
    • tall flowers
    • sea pickles
    • short grass/fern
    • nether fungi
    • buried petals

To reduce frustration trying to grow weeping vines or glowberries, maybe the Agricarnation should also find the "head block" of that category of plants when it hits a "body block" in its search.

commented

Actually, this should be a more accurate set of rules to properly cover vanilla blocks and be as flexible as possible for customization:

  • three block tags: "growth candidate", "apply boost as bonemeal" (includes azalea bushes by default, and is included in the "growth canidates"), and "growth exclusion"
  • blocks extending SpreadingSnowyDirtBlock/NyliumBlock (because turns out those accept both random ticks and bonemeal), unless they are tagged as candidates, and blocks tagged for exclusion are not considered
  • a block is considered as candidate if it is tagged as such, accepts bonemeal, or extends BushBlock
  • a candidate block is accepted as growth boost target if it can be random-ticked, or if it accepts bonemeal and is tagged for bonemeal application

To balance the usually way more powerful bonemeal application, I recommend to have blocks that are eligible for it (i.e. they are tagged accordingly and actually accept bonemeal) having to pass both their native success check as well as an additional random chance to actually receive the bonemeal boost. Failing either check would still consume mana, and not give the random tick boost either.