kernitus / BukkitOldCombatMechanics

Spigot plugin to configure combat mechanics from 1.9 onwards
https://www.spigotmc.org/resources/19510/
Mozilla Public License 2.0
160 stars 70 forks source link

hit-frequency on mythicmobs not working #671

Closed neptunuu closed 5 months ago

neptunuu commented 1 year ago

Hello, i was trying out the hit-frequency recently and set it to 1 tick on mobs and players, works perfectly on vanilla mobs, but not on mythicmobs, it's like it has no effect, is there anything I could be doing wrong or is this a bug?

neptunuu commented 1 year ago

After a bit more testing i realised that the hit-frequency works as inteded only if i reload the plugin after i spawn the mob, but my issue still kind of stands

kernitus commented 1 year ago

This implies that mythicmobs is not calling the CreatureSpawnEvent like entities are supposed to. When you reload the plugin it applies the new delay to all existing entities, otherwise this happens at entity spawn. Evidently mythicmobs is not letting other plugins know a spawn happened.

neptunuu commented 1 year ago

Alright, say i made a script using another plugin that reloads the oldcombatplugin every 2 ticks, all works well, except is there any way to disable the output in the console when the plugin reloads?

kernitus commented 1 year ago

That seems like a terrible idea, it would be incredibly computationally expensive to run every 2 ticks. Through a lot of digging I have found MythicMobs has an API that can be used to know when a MythicMob is spawned.

kernitus commented 6 months ago

@NeptuneDaFish Cannot reproduce this at all. If I spawn a mythic mob with /mythicmobs mobs spawn GIANT it calls the CreatureSpawnEvent just like all mobs and applies the hit delay.