
Conduit network tick triggers ClassCastException in Botania's ManaPoolBlock
Closed this issue · 6 comments
Is there an existing issue for this?
- I did not find any existing issues.
Current Behavior
Description
When the Ender IO Redstone Conduit network ticks, it reads analog output signals from adjacent blocks. This triggers a in Botania's method, as Botania incorrectly assumes the block entity is a (but it is actually Ender IO's ).ClassCastExceptionManaPoolBlock.getAnalogOutputSignal()ManaPoolBlockEntityConduitBundleBlockEntity
Context Details
Minecraft Version: 1.21.1
Ender IO Conduits Version: 7.1.8.657-nightly
Botania Version: 451-SNAPSHOT
Loader: NeoForge 21.1.208
Trigger: Conduit network ticking (specifically and RedstoneConduitTicker.tick()RedstoneSensorFilter.getInputSignal())
Reproduction Steps
Install Ender IO Conduits and Botania on a 1.21.1 NeoForge server.
Place Redstone Conduits near Botania blocks (e.g., Mana Pool) or other blocks.
The conduit network’s signal-reading logic invokes Botania’s , leading to a crash.getAnalogOutputSignal()
Note for Developers
The root cause is a missing type check in Botania’s code (already reported to their repo), but we wanted to notify you of the interaction scenario. No action may be needed from Ender IO if Botania fixes their type handling, but your input on signal-reading best practices is welcome.
VazkiiMods/Botania#4931
Full Crash Report
crash-2025-09-16_15.23.51-server.txt
As far as I can tell, RedstoneSensorFilter
seems to call the getAnalogOutputSignal
method of a block state for a position that might not contain that block state's block type:
That doesn't sound like a good idea. Minecraft ensures the block state and block entity at a given position match, so it's a fair assumption that something like logic for getting the comparator output at a certain position is only called when that position actually contains that type of block.
The fix is really simple: You put the same position into getAnalogOutput
as you did into getBlockState
, because that's how balls on block state methods work – the block state has no idea where it is in the world, so you always need to pass in the position. You are passing in an offset and end up making the block state try to get its data from your block.
This error is a logic issue in EnderIO, the dev version of Botania merely exposed it. In fact, there's another issue reporting that this bug already happened in 1.20.1, so technically there's something you can actually test against.
(I'm reasonably sure you will find that other modded blocks that don't crash won't be able to expose their comparator value properly either.)
do note we might need botania snapshot in dev environment in order to fix this, make sure doesn't crash again before pushing out the build
This 1.21.1 Botania build should be stable enough for a sanity check of your potential fix: https://github.com/VazkiiMods/Botania/actions/runs/17715712655
We may create a workaround for the immediate cause of the crash on our end eventually, but until EnderIO fixes the RedstoneSensorFilter
, it will be unable to read out the actual comparator signals from blocks that way.
Fixed in dev 1.21 (will be in latest nightly and first 8.x releases), I've also fixed for 1.20.1 given it is a simple tweak, will be in the next community release.
Thanks @TheRealWormbo for the diagnosis :)