make sure we are in the same world
This commit is contained in:
parent
9421da491b
commit
02b4675fa0
@ -109,6 +109,7 @@ public class OptimizeByWorkstation implements VillagerOptimizerModule, Listener
|
||||
if (villager.getProfession() != workstationProfession) continue;
|
||||
WrappedVillager wrapped = villagerCache.getOrAdd(villager);
|
||||
if (wrapped.getJobSite() == null) continue;
|
||||
if (wrapped.getJobSite().getWorld() != workstationLoc.getWorld()) continue;
|
||||
if (LocationUtil.relDistanceSquared3D(wrapped.getJobSite(), workstationLoc) > 1) continue;
|
||||
|
||||
if (!wrapped.canOptimize(cooldown_millis) && !player.hasPermission(Permissions.Bypass.WORKSTATION_COOLDOWN.get())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user