Settable zoom out code - incomplete prototype
This commit is contained in:
parent
a7c6a20dcc
commit
bec1108fa1
9 changed files with 269 additions and 5 deletions
|
|
@ -11,6 +11,8 @@ public class CaveTileRenderer extends DefaultTileRenderer {
|
|||
super(configuration);
|
||||
}
|
||||
|
||||
public boolean isNightAndDayEnabled() { return false; }
|
||||
|
||||
@Override
|
||||
protected void scan(World world, int seq, boolean isnether, final Color result, final Color result_day,
|
||||
MapIterator mapiter) {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ public class DefaultTileRenderer implements MapTileRenderer {
|
|||
return name;
|
||||
}
|
||||
|
||||
public boolean isNightAndDayEnabled() { return night_and_day; }
|
||||
|
||||
public DefaultTileRenderer(ConfigurationNode configuration) {
|
||||
this.configuration = configuration;
|
||||
name = (String) configuration.get("prefix");
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import org.dynmap.Log;
|
|||
import org.dynmap.MapManager;
|
||||
import org.dynmap.MapTile;
|
||||
import org.dynmap.MapType;
|
||||
import org.dynmap.MapType.ZoomStepDirection;
|
||||
import org.dynmap.utils.MapChunkCache;
|
||||
import org.json.simple.JSONObject;
|
||||
import java.awt.image.DataBufferInt;
|
||||
|
|
@ -326,6 +327,20 @@ public class KzedMap extends MapType {
|
|||
return false;
|
||||
}
|
||||
|
||||
public List<String> baseZoomFilePrefixes() {
|
||||
ArrayList<String> s = new ArrayList<String>();
|
||||
for(MapTileRenderer r : renderers) {
|
||||
s.add("z" + r.getName());
|
||||
if(r.isNightAndDayEnabled())
|
||||
s.add("z" + r.getName() + "_day");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public int baseZoomFileStepSize() { return zTileWidth; }
|
||||
|
||||
public ZoomStepDirection zoomFileStepDirection() { return ZoomStepDirection.NEGATIVE_X_POSITIVE_Y; }
|
||||
|
||||
public String getName() {
|
||||
return "KzedMap";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,4 +15,5 @@ public interface MapTileRenderer {
|
|||
|
||||
boolean isBiomeDataNeeded();
|
||||
boolean isRawBiomeDataNeeded();
|
||||
boolean isNightAndDayEnabled();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue