mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-26 18:47:40 +01:00
Add support and templates for "The End"
This commit is contained in:
parent
f1c04f6198
commit
fc824013b7
@ -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-";
|
||||
|
@ -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<DynmapChunk> 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;
|
||||
|
35
src/main/resources/templates/the_end-hires.txt
Normal file
35
src/main/resources/templates/the_end-hires.txt
Normal file
@ -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
|
||||
|
37
src/main/resources/templates/the_end-lowres.txt
Normal file
37
src/main/resources/templates/the_end-lowres.txt
Normal file
@ -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
|
||||
|
37
src/main/resources/templates/the_end-vlowres.txt
Normal file
37
src/main/resources/templates/the_end-vlowres.txt
Normal file
@ -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
|
||||
|
34
src/main/resources/templates/the_end.txt
Normal file
34
src/main/resources/templates/the_end.txt
Normal file
@ -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
|
BIN
web/images/block_the_end.png
Normal file
BIN
web/images/block_the_end.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Loading…
Reference in New Issue
Block a user