mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 05:27:37 +00:00
Let the day/night transform actually fire
EntityAITransform claimed the PASSIVE mutex, so any running movement or look task blocked it from ever starting. The swap only happened in the gaps where those yielded - which is why it appeared to trigger when an NPC said a line and for a moment afterwards. The task only polls world time and flips the state, so it needs no mutex at all.
This commit is contained in:
1 parent
dedbe94cd8
commit
466b49db5e
1 file changed
+4
-1
@@ -10,7 +10,10 @@ public class EntityAITransform extends EntityAIBase {
|
||||
|
||||
public EntityAITransform(EntityNPCInterface npc) {
|
||||
this.npc = npc;
|
||||
setMutexBits(AiMutex.PASSIVE);
|
||||
// No mutex: this only polls the world time and flips the transform, it drives nothing.
|
||||
// Claiming PASSIVE let any running movement or look task starve it, so the day/night
|
||||
// swap only fired in the gaps where those yielded - such as while saying a line.
|
||||
setMutexBits(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user