Teleport fishing spots properly

This commit is contained in:
bushtail
2023-05-07 03:30:28 +00:00
committed by Ryan
parent d0ae674155
commit 6bebd1d53a
@@ -36,7 +36,9 @@ class FishingNPC : NPCBehavior(*fishingSpots) {
} }
else -> { else -> {
val randLoc = spot.locations[RandomFunction.random(spot.locations.size)] val randLoc = spot.locations[RandomFunction.random(spot.locations.size)]
if(findLocalNPCs(randLoc, 0).isEmpty()) self.location = randLoc if(findLocalNPCs(randLoc, 0).isEmpty()) {
teleport(self, randLoc)
}
setAttribute(self, "fishing:switchdelay", getWorldTicks() + getRandomDelay()) setAttribute(self, "fishing:switchdelay", getWorldTicks() + getRandomDelay())
} }
} }