mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-27 09:42:37 +01:00
Disable flock caching
This commit is contained in:
parent
8a87326c44
commit
f46285b238
@ -53,8 +53,8 @@ public class FollowTrait extends Trait {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttach() {
|
||||
flock = new Flocker(npc, new RadiusNPCFlock(4, 20), new SeparationBehavior(1));
|
||||
public void onDespawn() {
|
||||
flock = null;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -71,6 +71,11 @@ public class FollowTrait extends Trait {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSpawn() {
|
||||
flock = new Flocker(npc, new RadiusNPCFlock(4, 0), new SeparationBehavior(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (player == null || !player.isValid()) {
|
||||
|
Loading…
Reference in New Issue
Block a user