Bug Closed · Invalid

Post Restart MythicMobs Error

#1587 opened by Unknown 5 years ago

Unknownreported this bug

Summary

There is mob that has 3 lives, these 3 lives are counted through the use of variables. It works fine, but after the server restarts, the first mob(in this case, the Cerberus), launches an error in the console, and gives it 1 extra life, meaning 4 lives now. This is not intended behavior. for some reason, the issue is settled after it happens once, and the count is fine after the first mob, however I would like if the first Cerberus doesn't have 4 lives and doesn't fire an error in the console

Steps to reproduce

The Skill File: https://pastebin.ubuntu.com/p/4qpPycKK3B/

The Mob File: https://pastebin.ubuntu.com/p/s5TtTGWTTk/

Restart the server, after restart, spawn the mob using /mm m spawn Cerberus, and kill it two times.

Current behavior

It's firing a console error at the very first mob being killed for the second time (second life of it) after a server restart and giving an extra life.

Intended correct behavior

The intended behavior is for it to not fire an error at the very first mob spawned of this type(no other mobs like this currently in my server) and to not give it an extra life.

Server log file

-> This is the error, recreated. https://pastebin.ubuntu.com/p/wTwyVpJzg8/

-> This is the server log. [Legacy attachment omitted]

Debug log snippet

This is on debug level (4). https://pastebin.ubuntu.com/p/C9zHhFzd2R/

Proposed fixes

I do not know as I am not experienced in Java.

NOTE: Read discord ticket called "mythicmobs-0567".

Unknowncommented

Hello. I scanned over your stuff and saw you had some of your config running in the wrong order. The error was happening because the global.cerberuslimit variable was being called from the cerberus2 mob onspawn before it was being set from the parent.

Pastebin of working mobs with no errors on my end: https://pastebin.com/64YnpXTF

Video showing it works. I get no console errors and no 4th spawn: [Legacy attachment omitted]

Sorry for the crappy quality size, i had to shrink minecraft pretty low to fit the less them 10MB file size for this forum to upload.

MM: 4.11 9c128e99 - Newest Dev build as of this post

MC: 1.16.4

Unknowncommented

- setvariable{var=global.cerberusLimit;val="<caster.var.cerberusLimit>"} You did not have save=true in the global variable, and that might be why it was not keeping the data after the server reload as well.

Sign in to join the discussion.