Bug Closed · Invalid

onSignal not working every time

#4066 opened by Unknown 3 years ago

Unknownreported this bug

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

https://pastebin.com/fRKSRPMd

Debug log snippet

https://pastebin.com/QDLa1Mkd

Proposed fixes

It works fine on free version 5.1.4

Unknowncommented

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

Sign in to join the discussion.