diff --git a/src/main/java/org/dynmap/DynmapPlugin.java b/src/main/java/org/dynmap/DynmapPlugin.java index 150e1024..7d62ba77 100644 --- a/src/main/java/org/dynmap/DynmapPlugin.java +++ b/src/main/java/org/dynmap/DynmapPlugin.java @@ -168,7 +168,8 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI { /* Table of default templates - all are resources in dynmap.jar unnder templates/, and go in templates directory when needed */ private static final String[] stdtemplates = { "normal.txt", "nether.txt", "skylands.txt", "normal-lowres.txt", "nether-lowres.txt", "skylands-lowres.txt", "normal-hires.txt", "nether-hires.txt", "skylands-hires.txt", - "normal-vlowres.txt", "skylands-vlowres.txt", "nether-vlowres.txt" + "normal-vlowres.txt", "skylands-vlowres.txt", "nether-vlowres.txt", "the_end.txt", "the_end-vlowres.txt", + "the_end-lowres.txt", "the_end-hires.txt" }; private static final String CUSTOM_PREFIX = "custom-"; diff --git a/src/main/java/org/dynmap/utils/NewMapChunkCache.java b/src/main/java/org/dynmap/utils/NewMapChunkCache.java index 2e3451f3..271ebd88 100644 --- a/src/main/java/org/dynmap/utils/NewMapChunkCache.java +++ b/src/main/java/org/dynmap/utils/NewMapChunkCache.java @@ -95,13 +95,13 @@ public class NewMapChunkCache implements MapChunkCache { public final int getHighestBlockYAt() { return snap.getHighestBlockYAt(bx, bz); } - public final int getBlockSkyLight() { + public int getBlockSkyLight() { return snap.getBlockSkyLight(bx, y, bz); } public final int getBlockEmittedLight() { return snap.getBlockEmittedLight(bx, y, bz); } - public Biome getBiome() { + public final Biome getBiome() { return snap.getBiome(bx, bz); } public double getRawBiomeTemperature() { @@ -234,6 +234,15 @@ public class NewMapChunkCache implements MapChunkCache { } } + private class OurEndMapIterator extends OurMapIterator { + + OurEndMapIterator(int x0, int y0, int z0) { + super(x0, y0, z0); + } + public final int getBlockSkyLight() { + return 15; + } + } /** * Chunk cache for representing unloaded chunk (or air) */ @@ -377,9 +386,6 @@ public class NewMapChunkCache implements MapChunkCache { @SuppressWarnings({ "unchecked", "rawtypes" }) public void setChunks(World w, List chunks) { this.w = w; - //if(w.getEnvironment() != Environment.NORMAL) { - // biome = biomeraw = false; - //} this.chunks = chunks; if(poppreservedchunk == null) { /* Get CraftWorld.popPreservedChunk(x,z) - reduces memory bloat from map traversals (optional) */ @@ -658,6 +664,8 @@ public class NewMapChunkCache implements MapChunkCache { * Get cache iterator */ public MapIterator getIterator(int x, int y, int z) { + if(w.getEnvironment().toString().equals("THE_END")) + return new OurEndMapIterator(x, y, z); return new OurMapIterator(x, y, z); } /** @@ -726,13 +734,8 @@ public class NewMapChunkCache implements MapChunkCache { } @Override public boolean setChunkDataTypes(boolean blockdata, boolean biome, boolean highestblocky, boolean rawbiome) { -// if((w != null) && (w.getEnvironment() != Environment.NORMAL)) { -// this.biome = this.biomeraw = false; -// } -// else { - this.biome = biome; - this.biomeraw = rawbiome; -// } + this.biome = biome; + this.biomeraw = rawbiome; this.highesty = highestblocky; this.blockdata = blockdata; return true; diff --git a/src/main/resources/templates/the_end-hires.txt b/src/main/resources/templates/the_end-hires.txt new file mode 100644 index 00000000..0a97d0ba --- /dev/null +++ b/src/main/resources/templates/the_end-hires.txt @@ -0,0 +1,35 @@ +version: 0.20 +# +# Default template for "The End" environment worlds (deftemplatesuffix="hires") +# Uses the HDMap renderer with view from the SE with the "hires" resolution (16 pixels per block edge) +# +# This file MAY need to be replaced during an upgrade - rename file to 'custom-the_end-hires.txt' if you wish to customize it +# +templates: + # The End world template (HDMap hires) + the_end-hires: + enabled: true + # Number of extra zoom-out levels for world (each level is twice as big as the previous one) + extrazoomout: 2 + #center: + # x: 0 + # y: 64 + # z: 0 + maps: + - class: org.dynmap.hdmap.HDMap + name: flat + title: "Flat" + prefix: flat + perspective: iso_S_90_lowres + shader: stdtexture + lighting: brightnight + mapzoomin: 1 + - class: org.dynmap.hdmap.HDMap + name: the_end + title: "Surface" + prefix: st + perspective: iso_SE_30_hires + shader: stdtexture + lighting: brightnight + mapzoomin: 1 + \ No newline at end of file diff --git a/src/main/resources/templates/the_end-lowres.txt b/src/main/resources/templates/the_end-lowres.txt new file mode 100644 index 00000000..43a3c18d --- /dev/null +++ b/src/main/resources/templates/the_end-lowres.txt @@ -0,0 +1,37 @@ +version: 0.20 +# +# Default template for "The End" environment worlds (deftemplatesuffix="lowres") +# Uses the HDMap renderer with view from the SE with the "lowres" resolution (4 pixels per block edge) +# +# This file MAY need to be replaced during an upgrade - rename file to 'custom-the_end-lowres.txt' if you wish to customize it +# +templates: + # The End world template (HDMap lowres) + the_end-lowres: + enabled: true + # Number of extra zoom-out levels for world (each level is twice as big as the previous one) + extrazoomout: 2 + #center: + # x: 0 + # y: 64 + # z: 0 + maps: + - class: org.dynmap.hdmap.HDMap + name: flat + title: "Flat" + prefix: flat + perspective: iso_S_90_lowres + shader: stdtexture + lighting: brightnight + # Adjust extra zoom in levels - default is 2 + mapzoomin: 2 + - class: org.dynmap.hdmap.HDMap + name: the_end + title: "Surface" + prefix: st + perspective: iso_SE_60_lowres + shader: stdtexture + lighting: brightnight + # Adjust extra zoom in levels - default is 2 + mapzoomin: 2 + \ No newline at end of file diff --git a/src/main/resources/templates/the_end-vlowres.txt b/src/main/resources/templates/the_end-vlowres.txt new file mode 100644 index 00000000..563a923a --- /dev/null +++ b/src/main/resources/templates/the_end-vlowres.txt @@ -0,0 +1,37 @@ +version: 0.24 +# +# Default template for "The End" environment worlds (deftemplatesuffix="vlowres") +# Uses the HDMap renderer with view from the SE with the "vlowres" resolution (2 pixels per block edge) +# +# This file MAY need to be replaced during an upgrade - rename file to 'custom-the_end-vlowres.txt' if you wish to customize it +# +templates: + # The End world template (HDMap vlowres) + the_end-vlowres: + enabled: true + # Number of extra zoom-out levels for world (each level is twice as big as the previous one) + extrazoomout: 2 + #center: + # x: 0 + # y: 64 + # z: 0 + maps: + - class: org.dynmap.hdmap.HDMap + name: flat + title: "Flat" + prefix: flat + perspective: iso_S_90_vlowres + shader: stdtexture + lighting: brightnight + # Adjust extra zoom in levels - default is 2 + mapzoomin: 2 + - class: org.dynmap.hdmap.HDMap + name: the_end + title: "Surface" + prefix: st + perspective: iso_SE_60_vlowres + shader: stdtexture + lighting: brightnight + # Adjust extra zoom in levels - default is 2 + mapzoomin: 2 + \ No newline at end of file diff --git a/src/main/resources/templates/the_end.txt b/src/main/resources/templates/the_end.txt new file mode 100644 index 00000000..c37f1b6e --- /dev/null +++ b/src/main/resources/templates/the_end.txt @@ -0,0 +1,34 @@ +version: 0.20 +# +# Default template for "The End" environment worlds (deftemplatesuffix="") +# +# This file MAY need to be replaced during an upgrade - rename file to 'custom-the_end.txt' if you wish to customize it +# +templates: + # The End world template (classic render) + the_end: + enabled: true + # # If bigworld set to true, use alternate directory layout better suited to large worlds + # bigworld: true + # # Number of extra zoom-out levels for world (each level is twice as big as the previous one) + # extrazoomout: 3 + #center: + # x: 0 + # y: 64 + # z: 0 + maps: + - class: org.dynmap.flat.FlatMap + name: flat + title: "Flat" + prefix: flat + colorscheme: default + # The textured setting makes the flat render toning much more consistent with the other maps: set to 'none' for the original flat texture, 'smooth' for blended tile top colors, 'dither' for dither pattern + textured: smooth + - class: org.dynmap.kzedmap.KzedMap + renderers: + - class: org.dynmap.kzedmap.DefaultTileRenderer + name: the_end + title: "Surface" + prefix: st + maximumheight: 127 + colorscheme: default diff --git a/web/images/block_the_end.png b/web/images/block_the_end.png new file mode 100644 index 00000000..69bcc329 Binary files /dev/null and b/web/images/block_the_end.png differ