onSignal not working every time
Closed
onSignal not working every time
Summary
The variableAdd{var=caster.strength;amount=1} @self ~onSignal:wheat
isn't being ran every time the ~onSignal is called.
Steps to reproduce
Use these skills and mobs:
Skills: https://pastebin.com/dydS4BAg
Mobs: https://pastebin.com/JZ0CKyhM
Summon mob n1
Smack mob n1
Current behavior
It sends a message that is not equal to the number of dirt blocks there are around it, but far less.
Intended correct behavior Sends an accurate amount of dirt blocks
Server log file
Debug log snippet
Proposed fixes
It works fine on free version 5.1.4
added Could Not Replicate label
removed Could Not Replicate label
The problem isn't with signal, it's that, because the skill is running async, the spawned mobs are trying to send the signal to their parent before they have even finished spawning. It takes a tick before they even know who their parent is.
You can fix this by adding a 1 tick delay to the signal
- signal{s=dirt;delay=1} @parent
added Invalid / Not a Bug label