kernitus / BukkitOldCombatMechanics

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

hit-frequency on mythicmobs not working #671

Closed mihaidobr closed 10 months ago

mihaidobr 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?

mihaidobr 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.

mihaidobr 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 10 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.