Fixed a minor GC overhead in world generation
This commit is contained in:
parent
2dfefc7355
commit
2bdbbc1ca7
1 changed files with 21 additions and 7 deletions
|
@ -203,13 +203,27 @@ public final class EntitySphereGen extends Entity {
|
|||
final OrbShell orbShell = orbInstance.getShellForSqRadius(sqRange);
|
||||
// WarpDrive.logger.info(String.format("sqRange %d sqRadius %d", sqRange, sqRadius));
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord + x, yCoord + y, zCoord + z));
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord - x, yCoord + y, zCoord + z));
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord + x, yCoord - y, zCoord + z));
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord + x, yCoord + y, zCoord - z));
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord - x, yCoord - y, zCoord + z));
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord + x, yCoord - y, zCoord - z));
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord - x, yCoord + y, zCoord - z));
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord - x, yCoord - y, zCoord - z));
|
||||
if (x != 0) {
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord - x, yCoord + y, zCoord + z));
|
||||
}
|
||||
if (y != 0) {
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord + x, yCoord - y, zCoord + z));
|
||||
if (x != 0) {
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord - x, yCoord - y, zCoord + z));
|
||||
}
|
||||
}
|
||||
if (z != 0) {
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord + x, yCoord + y, zCoord - z));
|
||||
if (x != 0) {
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord - x, yCoord + y, zCoord - z));
|
||||
}
|
||||
if (y != 0) {
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord + x, yCoord - y, zCoord - z));
|
||||
if (x != 0) {
|
||||
addBlock(isSurface, new JumpBlock(orbShell.getRandomUnit(rand), xCoord - x, yCoord - y, zCoord - z));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue