Skip to content

[1.21.1] [Crash] Conflict with Botania (and possibly other mods) #733

@ArtemShustov

Description

@ArtemShustov

I wanted to play on the new version of Minecraft, but ran into a crash when using ProductiveBees and Botania. (Botania hasn't officially released for 1.21.x, so I built the mod from 1.21.1-porting).
When loading into a world, after ~5 seconds or even immediately I get a crash:

java.lang.ClassCastException: class net.minecraft.core.BlockPos$MutableBlockPos cannot be cast to class net.minecraft.world.level.block.state.BlockState (net.minecraft.core.BlockPos$MutableBlockPos and net.minecraft.world.level.block.state.BlockState are in module minecraft@1.21.1 of loader 'TRANSFORMER' @765ffb14)

crash-2026-03-12_17.39.32-server.txt

I'm not a Java developer and don't fully understand how mixins work, but as far as I can tell the issue is caused by BeePollinateGoalMixin. (added in the 1.21.x branch, no issues on 1.20.1)
Your mixin signature:

private Predicate<BlockPos> VALID_POLLINATION_BLOCKS;
private Optional<BlockPos> findNearestBlock(Predicate<BlockPos> predicate, double distance)

Vanilla code:

private final Predicate<BlockState> VALID_POLLINATION_BLOCKS
private Optional<BlockPos> findNearestBlock(Predicate<BlockState> predicate, double distance)

Botania also uses BlockState and its code hasn't changed since 1.20.x.
I think the code should be rewritten to avoid issues in the future.

Environment:
Minecraft: 1.21.1
NeoForge: 21.1.219
Mods:

  1. botania-neoforge-1.21.1-452-SNAPSHOT
  2. curios-neoforge-9.5.1+1.21.1
  3. geckolib-neoforge-1.21.1-4.8.4
  4. Patchouli-1.21.1-92-NEOFORGE
  5. productivebees-1.21.1-13.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions