mirror of
https://github.com/Elecast2/EntityTrackerFixer.git
synced 2024-11-26 03:45:20 +01:00
remove unnecesary check on checktask
This commit is contained in:
parent
7e31f4bab2
commit
e38f3a5a3f
@ -40,14 +40,12 @@ public class CheckTask extends BukkitRunnable {
|
|||||||
int d = ConfigMain.getTrackingRange();
|
int d = ConfigMain.getTrackingRange();
|
||||||
for(Player player : Bukkit.getWorld(worldName).getPlayers()) {
|
for(Player player : Bukkit.getWorld(worldName).getPlayers()) {
|
||||||
for(Entity ent : player.getNearbyEntities(d, d, d)) {
|
for(Entity ent : player.getNearbyEntities(d, d, d)) {
|
||||||
if(!cps.playerChunkMap.trackedEntities.containsKey(ent.getEntityId())) {
|
|
||||||
trackAgain.add(((CraftEntity)ent).getHandle());
|
trackAgain.add(((CraftEntity)ent).getHandle());
|
||||||
if(ConfigMain.isDisableTickUntracked()) {
|
if(ConfigMain.isDisableTickUntracked()) {
|
||||||
EntityTickManager.getInstance().enableTicking(((CraftEntity)ent).getHandle(), worldName);
|
EntityTickManager.getInstance().enableTicking(((CraftEntity)ent).getHandle(), worldName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
NMSEntityTracker.trackEntities(cps, trackAgain);
|
NMSEntityTracker.trackEntities(cps, trackAgain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,14 +40,12 @@ public class CheckTask extends BukkitRunnable {
|
|||||||
int d = ConfigMain.getTrackingRange();
|
int d = ConfigMain.getTrackingRange();
|
||||||
for(Player player : Bukkit.getWorld(worldName).getPlayers()) {
|
for(Player player : Bukkit.getWorld(worldName).getPlayers()) {
|
||||||
for(Entity ent : player.getNearbyEntities(d, d, d)) {
|
for(Entity ent : player.getNearbyEntities(d, d, d)) {
|
||||||
if(!cps.playerChunkMap.trackedEntities.containsKey(ent.getEntityId())) {
|
|
||||||
trackAgain.add(((CraftEntity)ent).getHandle());
|
trackAgain.add(((CraftEntity)ent).getHandle());
|
||||||
if(ConfigMain.isDisableTickUntracked()) {
|
if(ConfigMain.isDisableTickUntracked()) {
|
||||||
EntityTickManager.getInstance().enableTicking(((CraftEntity)ent).getHandle(), worldName);
|
EntityTickManager.getInstance().enableTicking(((CraftEntity)ent).getHandle(), worldName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
NMSEntityTracker.trackEntities(cps, trackAgain);
|
NMSEntityTracker.trackEntities(cps, trackAgain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user