Visibility promotion for a data class

This commit is contained in:
2023-09-17 12:53:56 -04:00
parent 83be09d643
commit 3fb08ca2c3
5 changed files with 17 additions and 37 deletions
+9 -29
View File
@@ -48,16 +48,16 @@ public class HeightMap {
public BufferedImage heightmapImage; public BufferedImage heightmapImage;
private final int heightMapID; public final int heightMapID;
private final int maxHeight; public final int maxHeight;
private final int fullExtentsX; public final int fullExtentsX;
private final int fullExtentsY; public final int fullExtentsY;
private float bucketWidthX; public float bucketWidthX;
private float bucketWidthY; public float bucketWidthY;
private final int zoneLoadID; public final int zoneLoadID;
private float seaLevel = 0; public float seaLevel = 0;
private int[][] pixelColorValues; public int[][] pixelColorValues;
public float zone_minBlend; public float zone_minBlend;
public float zone_maxBlend; public float zone_maxBlend;
@@ -391,24 +391,4 @@ public class HeightMap {
return interpolatedHeight; 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;
}
} }
@@ -29,8 +29,8 @@ public class dbHeightMapHandler extends dbHandlerBase {
while (rs.next()) { while (rs.next()) {
thisHeightmap = new HeightMap(rs); thisHeightmap = new HeightMap(rs);
if (thisHeightmap.getHeightmapImage() == null) { if (thisHeightmap.heightmapImage == null) {
Logger.info("Imagemap for " + thisHeightmap.getHeightMapID() + " was null"); Logger.info("Imagemap for " + thisHeightmap.heightMapID + " was null");
continue; continue;
} }
} }
+3 -3
View File
@@ -91,11 +91,11 @@ public class ZoneInfoCmd extends AbstractDevCmd {
output += newline; output += newline;
if (zone.getHeightMap() != null) { if (zone.getHeightMap() != null) {
output += "HeightMap ID: " + zone.getHeightMap().getHeightMapID(); output += "HeightMap ID: " + zone.getHeightMap().heightMapID;
output += newline; output += newline;
output += "Bucket Width X : " + zone.getHeightMap().getBucketWidthX(); output += "Bucket Width X : " + zone.getHeightMap().bucketWidthX;
output += newline; 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; output += "radius: x: " + zone.getBounds().getHalfExtents().x + ", z: " + zone.getBounds().getHalfExtents().y;
+2 -2
View File
@@ -280,8 +280,8 @@ public class Zone extends AbstractGameObject {
return; return;
} }
if (this.getHeightMap().getSeaLevel() != 0) if (this.getHeightMap().seaLevel != 0)
this.seaLevel = this.worldAltitude + this.getHeightMap().getSeaLevel(); this.seaLevel = this.worldAltitude + this.getHeightMap().seaLevel;
else else
this.seaLevel = this.parent.seaLevel; this.seaLevel = this.parent.seaLevel;
+1 -1
View File
@@ -468,7 +468,7 @@ public class WorldServer {
for (Zone zone : ZoneManager.getAllZones()) { for (Zone zone : ZoneManager.getAllZones()) {
if (zone.getHeightMap() != null) { 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"); System.out.println("Zone load num: " + zone.getLoadNum() + " has no bucket width");
} }
} }