forked from MagicBane/Server
Visibility promotion for a data class
This commit is contained in:
@@ -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 {
|
||||
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()) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user