Tabs and spaces.
This commit is contained in:
parent
b01e0c8cdc
commit
05f3ced64f
33 changed files with 306 additions and 306 deletions
|
|
@ -67,7 +67,7 @@ public class KzedMap extends MapType {
|
|||
@Override
|
||||
public MapTile[] getTiles(Location l) {
|
||||
World world = l.getWorld();
|
||||
|
||||
|
||||
int x = l.getBlockX();
|
||||
int y = l.getBlockY();
|
||||
int z = l.getBlockZ();
|
||||
|
|
@ -141,7 +141,7 @@ public class KzedMap extends MapType {
|
|||
/**
|
||||
* Test if point x,z is inside rectangle with corner at r0x,r0z and with
|
||||
* size vectors s1x,s1z and s2x,s2z
|
||||
*
|
||||
*
|
||||
*/
|
||||
private boolean testPointInRectangle(int x, int z, int r0x, int r0z, int s1x, int s1z,
|
||||
int s2x, int s2z) {
|
||||
|
|
@ -150,7 +150,7 @@ public class KzedMap extends MapType {
|
|||
int dots1 = xr*s1x + zr*s1z;
|
||||
int dots2 = xr*s2x + zr*s2z;
|
||||
/* If dot product of relative point and each side is between zero and dot product
|
||||
* of each side and itself, we're inside
|
||||
* of each side and itself, we're inside
|
||||
*/
|
||||
if((dots1 >= 0) && (dots1 <= (s1x*s1x+s1z*s1z)) &&
|
||||
(dots2 >= 0) && (dots2 <= (s2x*s2x+s2z*s2z))) {
|
||||
|
|
@ -162,11 +162,11 @@ public class KzedMap extends MapType {
|
|||
public DynmapChunk[] getRequiredChunks(MapTile tile) {
|
||||
if (tile instanceof KzedMapTile) {
|
||||
KzedMapTile t = (KzedMapTile) tile;
|
||||
|
||||
|
||||
int ix = KzedMap.anchorx + t.px / 2 + t.py / 2;
|
||||
//int iy = 127;
|
||||
int iz = KzedMap.anchorz + t.px / 2 - t.py / 2;
|
||||
|
||||
|
||||
int x1 = ix - KzedMap.tileHeight / 2;
|
||||
int x2 = ix + KzedMap.tileWidth / 2 + KzedMap.tileHeight / 2;
|
||||
|
||||
|
|
@ -183,10 +183,10 @@ public class KzedMap extends MapType {
|
|||
* render path to y=0), correspond to ix-64, iz+64 to
|
||||
* ix,iz+128 to ix+64,iz+64 to ix,iz. Projection of
|
||||
* the prism on to the x,z plane (which is all that matters for
|
||||
* chunks) yields a diagonal rectangular area from ix-64(x1),iz+64
|
||||
* to ix,iz+128(z2) to ix+128(x2),iz to ix+64,iz-64(z1).
|
||||
* chunks) yields a diagonal rectangular area from ix-64(x1),iz+64
|
||||
* to ix,iz+128(z2) to ix+128(x2),iz to ix+64,iz-64(z1).
|
||||
* Chunks outside this are not needed - we scan a simple rectangle
|
||||
* (chunk grid aligned) and skip adding the ones that are outside.
|
||||
* (chunk grid aligned) and skip adding the ones that are outside.
|
||||
* This results in 42% less chunks being loaded.
|
||||
*/
|
||||
ArrayList<DynmapChunk> chunks = new ArrayList<DynmapChunk>();
|
||||
|
|
@ -211,7 +211,7 @@ public class KzedMap extends MapType {
|
|||
chunks.add(chunk);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DynmapChunk[] result = new DynmapChunk[chunks.size()];
|
||||
chunks.toArray(result);
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue