Sonar: double if
This commit is contained in:
@@ -24,14 +24,12 @@ public class CoreEventListener {
|
|||||||
for (int cZ = cMinZ; cZ <= cMaxZ; cZ++) {
|
for (int cZ = cMinZ; cZ <= cMaxZ; cZ++) {
|
||||||
for (int cX = cMinX; cX <= cMaxX; cX++) {
|
for (int cX = cMinX; cX <= cMaxX; cX++) {
|
||||||
int compressXZ = CompactedCoords.compressXZ(cX, cZ);
|
int compressXZ = CompactedCoords.compressXZ(cX, cZ);
|
||||||
if (!event.getPlayer().getLoadedChunks().contains(compressXZ)) {
|
|
||||||
if (!event.getPlayer().getLoadedChunks().contains(compressXZ)) {
|
if (!event.getPlayer().getLoadedChunks().contains(compressXZ)) {
|
||||||
eventChunkLoad.getNeedLoadChunks().add(compressXZ);
|
eventChunkLoad.getNeedLoadChunks().add(compressXZ);
|
||||||
event.getPlayer().getLoadedChunks().add(compressXZ);
|
event.getPlayer().getLoadedChunks().add(compressXZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!eventChunkLoad.getNeedLoadChunks().isEmpty()) {
|
if (!eventChunkLoad.getNeedLoadChunks().isEmpty()) {
|
||||||
EventBus.getInstance().post(eventChunkLoad);
|
EventBus.getInstance().post(eventChunkLoad);
|
||||||
|
|||||||
Reference in New Issue
Block a user