mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Remove redundant MobRepository access
This commit is contained in:
@@ -49,11 +49,11 @@ public final class MobRepository<T extends Mob> implements Iterable<T> {
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
if (foundIndex == repository.size()) {
|
||||
if (foundIndex == size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
while (currentIndex < repository.capacity()) {
|
||||
while (currentIndex < capacity()) {
|
||||
if (mobs[currentIndex++] != null) {
|
||||
foundIndex++;
|
||||
return true;
|
||||
@@ -64,7 +64,7 @@ public final class MobRepository<T extends Mob> implements Iterable<T> {
|
||||
|
||||
@Override
|
||||
public T next() {
|
||||
return repository.get(currentIndex);
|
||||
return get(currentIndex);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user