Silverfish duplicate itself when infesting blocks
Summary
When a Silverfish type mob has option PreventBlockInfection: true, an error is thrown and the mob duplicate itself.
Steps to reproduce
- Make a Silverfish type mob
- Set PreventBlockInfection: true
- Place on some stone and wait for it to infest the block
Current behavior
When the silverfish is infesting a block, a ClassCastException is thrown and the mob duplicates itself, but the stone block remain disinfected. The mob has the same property as the original mob, and will keep trying to infest the stone block to create more of itself.
Intended correct behavior
The silverfish should not be duplicating itself.
Server log file
Debug log snippet
Proposed fixes
Don't cast ActiveMob
to LivingEntity
lol