Browse Source

Visibility promotion for a data class

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
3fb08ca2c3
  1. 38
      src/engine/InterestManagement/HeightMap.java
  2. 4
      src/engine/db/handlers/dbHeightMapHandler.java
  3. 6
      src/engine/devcmd/cmds/ZoneInfoCmd.java
  4. 4
      src/engine/objects/Zone.java
  5. 2
      src/engine/server/world/WorldServer.java

38
src/engine/InterestManagement/HeightMap.java

@ -48,16 +48,16 @@ public class HeightMap { @@ -48,16 +48,16 @@ public class HeightMap {
public BufferedImage heightmapImage;
private final int heightMapID;
private final int maxHeight;
private final int fullExtentsX;
private final int fullExtentsY;
public final int heightMapID;
public final int maxHeight;
public final int fullExtentsX;
public final int fullExtentsY;
private float bucketWidthX;
private float bucketWidthY;
private final int zoneLoadID;
private float seaLevel = 0;
private int[][] pixelColorValues;
public float bucketWidthX;
public float bucketWidthY;
public final int zoneLoadID;
public float seaLevel = 0;
public int[][] pixelColorValues;
public float zone_minBlend;
public float zone_maxBlend;
@ -391,24 +391,4 @@ public class HeightMap { @@ -391,24 +391,4 @@ public class HeightMap {
return interpolatedHeight;
}
public float getBucketWidthX() {
return bucketWidthX;
}
public float getBucketWidthY() {
return bucketWidthY;
}
public int getHeightMapID() {
return heightMapID;
}
public BufferedImage getHeightmapImage() {
return heightmapImage;
}
public float getSeaLevel() {
return seaLevel;
}
}

4
src/engine/db/handlers/dbHeightMapHandler.java

@ -29,8 +29,8 @@ public class dbHeightMapHandler extends dbHandlerBase { @@ -29,8 +29,8 @@ public class dbHeightMapHandler extends dbHandlerBase {
while (rs.next()) {
thisHeightmap = new HeightMap(rs);
if (thisHeightmap.getHeightmapImage() == null) {
Logger.info("Imagemap for " + thisHeightmap.getHeightMapID() + " was null");
if (thisHeightmap.heightmapImage == null) {
Logger.info("Imagemap for " + thisHeightmap.heightMapID + " was null");
continue;
}
}

6
src/engine/devcmd/cmds/ZoneInfoCmd.java

@ -91,11 +91,11 @@ public class ZoneInfoCmd extends AbstractDevCmd { @@ -91,11 +91,11 @@ public class ZoneInfoCmd extends AbstractDevCmd {
output += newline;
if (zone.getHeightMap() != null) {
output += "HeightMap ID: " + zone.getHeightMap().getHeightMapID();
output += "HeightMap ID: " + zone.getHeightMap().heightMapID;
output += newline;
output += "Bucket Width X : " + zone.getHeightMap().getBucketWidthX();
output += "Bucket Width X : " + zone.getHeightMap().bucketWidthX;
output += newline;
output += "Bucket Width Y : " + zone.getHeightMap().getBucketWidthY();
output += "Bucket Width Y : " + zone.getHeightMap().bucketWidthY;
}
output += "radius: x: " + zone.getBounds().getHalfExtents().x + ", z: " + zone.getBounds().getHalfExtents().y;

4
src/engine/objects/Zone.java

@ -280,8 +280,8 @@ public class Zone extends AbstractGameObject { @@ -280,8 +280,8 @@ public class Zone extends AbstractGameObject {
return;
}
if (this.getHeightMap().getSeaLevel() != 0)
this.seaLevel = this.worldAltitude + this.getHeightMap().getSeaLevel();
if (this.getHeightMap().seaLevel != 0)
this.seaLevel = this.worldAltitude + this.getHeightMap().seaLevel;
else
this.seaLevel = this.parent.seaLevel;

2
src/engine/server/world/WorldServer.java

@ -468,7 +468,7 @@ public class WorldServer { @@ -468,7 +468,7 @@ public class WorldServer {
for (Zone zone : ZoneManager.getAllZones()) {
if (zone.getHeightMap() != null) {
if (zone.getHeightMap().getBucketWidthX() == 0) {
if (zone.getHeightMap().bucketWidthX == 0) {
System.out.println("Zone load num: " + zone.getLoadNum() + " has no bucket width");
}
}

Loading…
Cancel
Save