Bug Closed · Resolved

Silverfish duplicate itself when infesting blocks

#1067 opened by Unknown 5 years ago

Unknownreported this bug

Summary

When a Silverfish type mob has option PreventBlockInfection: true, an error is thrown and the mob duplicate itself.

Steps to reproduce

  1. Make a Silverfish type mob
  2. Set PreventBlockInfection: true
  3. 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

https://pastebin.com/SkHUpzF9

Debug log snippet

https://pastebin.com/hreK5Xui

Proposed fixes

Don't cast ActiveMob to LivingEntity lol

Unknowncommented

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.

Sign in to join the discussion.