Silverfish duplicate itself when infesting blocks
Closed
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
Had a question "> I am using silverfish for a spawner and they keep going into blocks. I looked it up on MythicMobs and it said they couldn't go into blocks by default but the silverfish still go in blocks. Can someone help me?" in community support on the discord. I tried normal silverfish without changing the options and they did infest blocks anyways (default i PreventBlockInfection: true); however, setting it in the options of the mob to true, then spawning 10 of them in an enclosed cracked_stone_brick area, they very quickly became 145 mobs.
changed milestone to %4.11.X
assigned to @ashijin
added Bug Completed / Resolved labels