Bug Open

Problem with the onSummonSkill portion of the Summon Mechanic

#6495 opened by Unknown 1 year ago

Unknownreported this bug

Summary

When using the onSummonSkill portion of the Summon mechanic, there seems to be a randomization between whether the newly summoned mob will first do the skills from the summon mechahnic, or do skills from the ~onSpawn portion of the new mobs skills. This can cause some unexpected behavior when trying to set variables using the summon mechanic, or really anything else.

Steps to reproduce

Here are my mobs I'm using to test this. Summon the VarPass_Parent mob any way, then right-click on the mob.

VarPass_Parent:
  Type: zombie
  Display: 'Var Pass Parent'
  Options:
    MovementSpeed: 0
    PreventSunburn: true
  Skills:
  - setvar{var=caster.Test;val=<caster.name>;type=STRING} @self ~onSpawn
  - summon{type=VarPass_Child;a=1;onsummonskill=[ setvar{var=target.Test;val=<caster.var.Test>;type=STRING} ]} @selflocation{fo=-1;y=1} ~onInteract
VarPass_Child:
  Type: baby_zombie
  Display: 'Var Pass Child'
  Options:
    MovementSpeed: 0
    PreventSunburn: true
  Skills:
  - message{m=<caster.name><&co> <caster.var.Test> is my dad} @PIR{r=50} ~onSpawn

Current behavior

it will summon a child mob and it should say "VarPass_Parent is my dad" in chat. But sometimes it says "Undefined is my dad".

Intended correct behavior

Ideally, it should always do the summon skills first, THEN the onSpawn skills.

Server log file

Full Server Log: https://pastebin.com/HkYyQsBQ

Server Details Snippet: Purpur 1.21.4-2416 Mythic Mobs: 5.10.0, within last week recent.

setting up a 1.21.8 test server to test on there, too.

Debug log snippet

Debug Snippet: https://pastebin.com/aaHNvDRB

Chat Output during debug:

[Legacy attachment omitted]

Proposed fixes

Describe what you think the issue or any potential fixes may be.

Unknowncommented

Confirmed on 1.21.8 as well [Legacy attachment omitted]

Sign in to join the discussion.