Simulated mana bursts trigger sculk sensors
TheRealWormbo opened this issue ยท 1 comments
Mod Loader
Both Fabric and Forge (I confirm that I have tested both loaders and will specify both loader versions below)
Minecraft Version
1.19.2
Botania version
1.19.2-438
Modloader version
any
Modpack info
No response
The latest.log file
Issue description
The simulated mana bursts used by mana spreaders produce "real" sculk sensor activation.
Steps to reproduce
- Place a sculk sensor and a block next to it.
- Move out of the sensor's range.
- Place a mana spreader pointing towards the block. The sculk seonsor activates.
- Place a mana spreader in the same area, but pointing away from the sensor and block. The sculk sensor does not activate.
Other information
The vibration frequency is that of entity interactions, i.e. it's not caused by a block placing, but indeed by the simulated mana burst hitting the block.
Analysis: These game events are triggered in Projectile code, PROJECTILE_SHOOT
during the first tick, PROJECTILE_LAND
in onHit
, after the onHitEntity
or onHitBlock
call.
The "first tick" is determined by a private boolean variable that is set to true after triggering the game event in tick
. Replacing it with a modified copy of the vanilla code is possible (and in fact, the projectiles of the Starcaller and the key relic extend from a copy of the vanilla parent class of the mana burst), but feels messy.
The onHit
method is inherited without modifications, so it could just be overridden with a copy of the vanilla code to make the game event calls optional for fake mana bursts.