Open DefiantBurger opened 1 year ago
Can you show me that part of your code?, to figure out what value you mean.
El vie, 14 jul 2023 a las 20:45, Joseph Cicalese @.***>) escribió:
Could you add getters for the follow distances for NPCs? I currently have to do a scrappy HashMap to keep track of the follow distances so that I can change them relatively.
— Reply to this email directly, view it on GitHub https://github.com/SergiFerry/PlayerNPC/issues/39, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVGYYCUT6GV4S3SZHIDEBELXQGHURANCNFSM6AAAAAA2KVQE6Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>
I am no longer using the code, but it was something like this:
public static HashMap<Pair<Player, NPCLib.Registry.ID>, Integer> followDistances = new HashMap<>(); ... npc.followPlayer(followDistances.get(new Pair<>(player, NPCLib.Registry.ID.of(plugin, "ghost"))), 100);
Then I would have to increment the followDistances HashMap.
Instead it would be nice to do something like this:
npc.followPlayer(npc.getMinimumFollowDistance() - 1, 100);
I wanted to do this so that the NPC very slowly gets closer to the player under certain conditions, then stop at certain distances that gradually reduce. But, I was able to do this through the NPC goTo method instead.
Could you add getters for the follow distances for NPCs? I currently have to do a scrappy HashMap to keep track of the follow distances so that I can change them relatively.