Make End cities more accurate
Fixes bug where the influence of all nearby islands wasn't taken into account.master
parent
a9b41aec3c
commit
eac81d5777
|
@ -39,13 +39,17 @@ public class EndCityWorldIconTypeProvider implements
|
|||
*/
|
||||
private DefaultWorldIconTypes hasSuitableIslandFoundation(int chunkX,
|
||||
int chunkY, List<EndIsland> endIslands) {
|
||||
|
||||
DefaultWorldIconTypes result = null;
|
||||
|
||||
for (EndIsland island : endIslands) {
|
||||
float influence = island.influenceAtChunk(chunkX, chunkY);
|
||||
if (influence >= 0.0) {
|
||||
return getResult(influence);
|
||||
result = getResult(influence);
|
||||
if (result == DefaultWorldIconTypes.END_CITY) break;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
private DefaultWorldIconTypes getResult(float influence) {
|
||||
|
|
Loading…
Reference in New Issue