mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 21:25:46 +01:00
Different Bukkit schedule spin workaround, that isn't so slow
Generalize texture image loading
This commit is contained in:
parent
4e810fc9d8
commit
1862dc918c
@ -302,7 +302,7 @@ public class MapManager {
|
|||||||
while(cnt > 0) {
|
while(cnt > 0) {
|
||||||
MapChunkCache c = chunkloads.peek();
|
MapChunkCache c = chunkloads.peek();
|
||||||
if(c == null)
|
if(c == null)
|
||||||
return;
|
break;
|
||||||
cnt = cnt - c.loadChunks(cnt);
|
cnt = cnt - c.loadChunks(cnt);
|
||||||
if(c.isDoneLoading()) {
|
if(c.isDoneLoading()) {
|
||||||
chunkloads.poll();
|
chunkloads.poll();
|
||||||
@ -311,6 +311,8 @@ public class MapManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(mapman.scheduler != null)
|
||||||
|
mapman.scheduler.scheduleSyncDelayedTask(mapman.plug_in, this, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,8 +365,9 @@ public class MapManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
scheduler.scheduleSyncRepeatingTask(plugin, new CheckWorldTimes(), 5*20, 5*20); /* Check very 5 seconds */
|
scheduler.scheduleSyncRepeatingTask(plugin, new CheckWorldTimes(), 5*20, 5*20); /* Check very 5 seconds */
|
||||||
scheduler.scheduleSyncRepeatingTask(plugin, new ProcessChunkLoads(), 1, 2); /* Chunk loader task - do every 2 to work around bukkit issue */
|
// scheduler.scheduleSyncRepeatingTask(plugin, new ProcessChunkLoads(), 1, 2);
|
||||||
|
/* Chunk loader task - work around bukkit issue */
|
||||||
|
scheduler.scheduleSyncDelayedTask(plugin, new ProcessChunkLoads());
|
||||||
}
|
}
|
||||||
|
|
||||||
void renderFullWorld(Location l, CommandSender sender) {
|
void renderFullWorld(Location l, CommandSender sender) {
|
||||||
|
@ -262,10 +262,10 @@ public class HDBlockModels {
|
|||||||
*/
|
*/
|
||||||
public static void loadModels(File datadir) {
|
public static void loadModels(File datadir) {
|
||||||
/* Load block models */
|
/* Load block models */
|
||||||
HDBlockModels.loadModelFile(new File(datadir, "models.txt"));
|
loadModelFile(new File(datadir, "models.txt"));
|
||||||
File custom = new File(datadir, "custom-models.txt");
|
File custom = new File(datadir, "custom-models.txt");
|
||||||
if(custom.canRead()) {
|
if(custom.canRead()) {
|
||||||
HDBlockModels.loadModels(custom);
|
loadModelFile(custom);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -76,26 +76,29 @@ public class TexturePack {
|
|||||||
private static final int BLOCKINDEX_MOVINGLAVA = 260;
|
private static final int BLOCKINDEX_MOVINGLAVA = 260;
|
||||||
private static final int MAX_BLOCKINDEX = 260;
|
private static final int MAX_BLOCKINDEX = 260;
|
||||||
private static final int BLOCKTABLELEN = MAX_BLOCKINDEX+1;
|
private static final int BLOCKTABLELEN = MAX_BLOCKINDEX+1;
|
||||||
|
|
||||||
|
private static class LoadedImage {
|
||||||
|
int[] argb;
|
||||||
|
int width, height;
|
||||||
|
int trivial_color;
|
||||||
|
}
|
||||||
|
|
||||||
private int[][] terrain_argb;
|
private int[][] terrain_argb;
|
||||||
private int terrain_width, terrain_height;
|
private int terrain_width, terrain_height;
|
||||||
private int native_scale;
|
private int native_scale;
|
||||||
|
|
||||||
private int[] grasscolor_argb;
|
private static final int IMG_GRASSCOLOR = 0;
|
||||||
private int grasscolor_width, grasscolor_height;
|
private static final int IMG_FOLIAGECOLOR = 1;
|
||||||
private int trivial_grasscolor;
|
private static final int IMG_WATERCOLOR = 2;
|
||||||
|
private static final int IMG_WATER = 3;
|
||||||
private int[] foliagecolor_argb;
|
private static final int IMG_CUSTOMWATERMOVING = 4;
|
||||||
private int foliagecolor_width, foliagecolor_height;
|
private static final int IMG_CUSTOMWATERSTILL = 5;
|
||||||
private int trivial_foliagecolor;
|
private static final int IMG_CUSTOMLAVAMOVING = 6;
|
||||||
|
private static final int IMG_CUSTOMLAVASTILL = 7;
|
||||||
private int[] watercolor_argb;
|
private static final int IMG_CNT = 8;
|
||||||
private int watercolor_width, watercolor_height;
|
|
||||||
private int trivial_watercolor;
|
|
||||||
|
|
||||||
private int[] water_argb;
|
|
||||||
private int water_width, water_height;
|
|
||||||
|
|
||||||
|
private LoadedImage[] imgs = new LoadedImage[IMG_CNT];
|
||||||
|
|
||||||
private HashMap<Integer, TexturePack> scaled_textures;
|
private HashMap<Integer, TexturePack> scaled_textures;
|
||||||
|
|
||||||
|
|
||||||
@ -179,28 +182,30 @@ public class TexturePack {
|
|||||||
if(ze == null)
|
if(ze == null)
|
||||||
throw new FileNotFoundException();
|
throw new FileNotFoundException();
|
||||||
is = zf.getInputStream(ze);
|
is = zf.getInputStream(ze);
|
||||||
loadGrassColorPNG(is);
|
loadBiomeShadingImage(is, IMG_GRASSCOLOR);
|
||||||
is.close();
|
is.close();
|
||||||
/* Try to find and load misc/foliagecolor.png */
|
/* Try to find and load misc/foliagecolor.png */
|
||||||
ze = zf.getEntry(FOLIAGECOLOR_PNG);
|
ze = zf.getEntry(FOLIAGECOLOR_PNG);
|
||||||
if(ze == null)
|
if(ze == null)
|
||||||
throw new FileNotFoundException();
|
throw new FileNotFoundException();
|
||||||
is = zf.getInputStream(ze);
|
is = zf.getInputStream(ze);
|
||||||
loadFoliageColorPNG(is);
|
loadBiomeShadingImage(is, IMG_FOLIAGECOLOR);
|
||||||
is.close();
|
is.close();
|
||||||
/* Try to find and load misc/watercolor.png */
|
/* Try to find and load misc/watercolor.png */
|
||||||
ze = zf.getEntry(WATERCOLOR_PNG);
|
ze = zf.getEntry(WATERCOLOR_PNG);
|
||||||
if(ze == null)
|
if(ze == null)
|
||||||
throw new FileNotFoundException();
|
throw new FileNotFoundException();
|
||||||
is = zf.getInputStream(ze);
|
is = zf.getInputStream(ze);
|
||||||
loadWaterColorPNG(is);
|
loadBiomeShadingImage(is, IMG_WATERCOLOR);
|
||||||
is.close();
|
is.close();
|
||||||
/* Try to find and load misc/water.png */
|
/* Try to find and load misc/water.png */
|
||||||
ze = zf.getEntry(WATER_PNG);
|
ze = zf.getEntry(WATER_PNG);
|
||||||
if(ze == null)
|
if(ze == null)
|
||||||
throw new FileNotFoundException();
|
throw new FileNotFoundException();
|
||||||
is = zf.getInputStream(ze);
|
is = zf.getInputStream(ze);
|
||||||
loadWaterPNG(is);
|
loadImage(is, IMG_WATER);
|
||||||
|
patchTextureWithImage(IMG_WATER, BLOCKINDEX_STATIONARYWATER);
|
||||||
|
patchTextureWithImage(IMG_WATER, BLOCKINDEX_MOVINGWATER);
|
||||||
is.close();
|
is.close();
|
||||||
|
|
||||||
zf.close();
|
zf.close();
|
||||||
@ -223,22 +228,25 @@ public class TexturePack {
|
|||||||
/* Check for misc/grasscolor.png */
|
/* Check for misc/grasscolor.png */
|
||||||
f = new File(texturedir, tpname + "/" + GRASSCOLOR_PNG);
|
f = new File(texturedir, tpname + "/" + GRASSCOLOR_PNG);
|
||||||
fis = new FileInputStream(f);
|
fis = new FileInputStream(f);
|
||||||
loadGrassColorPNG(fis);
|
loadBiomeShadingImage(fis, IMG_GRASSCOLOR);
|
||||||
fis.close();
|
fis.close();
|
||||||
/* Check for misc/foliagecolor.png */
|
/* Check for misc/foliagecolor.png */
|
||||||
f = new File(texturedir, tpname + "/" + FOLIAGECOLOR_PNG);
|
f = new File(texturedir, tpname + "/" + FOLIAGECOLOR_PNG);
|
||||||
fis = new FileInputStream(f);
|
fis = new FileInputStream(f);
|
||||||
loadFoliageColorPNG(fis);
|
loadBiomeShadingImage(fis, IMG_FOLIAGECOLOR);
|
||||||
fis.close();
|
fis.close();
|
||||||
/* Check for misc/waterecolor.png */
|
/* Check for misc/waterecolor.png */
|
||||||
f = new File(texturedir, tpname + "/" + WATERCOLOR_PNG);
|
f = new File(texturedir, tpname + "/" + WATERCOLOR_PNG);
|
||||||
fis = new FileInputStream(f);
|
fis = new FileInputStream(f);
|
||||||
loadWaterColorPNG(fis);
|
loadBiomeShadingImage(fis, IMG_WATERCOLOR);
|
||||||
fis.close();
|
fis.close();
|
||||||
/* Check for misc/water.png */
|
/* Check for misc/water.png */
|
||||||
f = new File(texturedir, tpname + "/" + WATER_PNG);
|
f = new File(texturedir, tpname + "/" + WATER_PNG);
|
||||||
fis = new FileInputStream(f);
|
fis = new FileInputStream(f);
|
||||||
loadWaterPNG(fis);
|
loadImage(fis, IMG_WATER);
|
||||||
|
patchTextureWithImage(IMG_WATER, BLOCKINDEX_STATIONARYWATER);
|
||||||
|
patchTextureWithImage(IMG_WATER, BLOCKINDEX_MOVINGWATER);
|
||||||
|
|
||||||
fis.close();
|
fis.close();
|
||||||
} catch (IOException iox) {
|
} catch (IOException iox) {
|
||||||
if(fis != null) {
|
if(fis != null) {
|
||||||
@ -255,24 +263,7 @@ public class TexturePack {
|
|||||||
this.terrain_height = tp.terrain_height;
|
this.terrain_height = tp.terrain_height;
|
||||||
this.native_scale = tp.native_scale;
|
this.native_scale = tp.native_scale;
|
||||||
|
|
||||||
this.grasscolor_argb = tp.grasscolor_argb;
|
this.imgs = tp.imgs;
|
||||||
this.grasscolor_height = tp.grasscolor_height;
|
|
||||||
this.grasscolor_width = tp.grasscolor_width;
|
|
||||||
this.trivial_grasscolor = tp.trivial_grasscolor;
|
|
||||||
|
|
||||||
this.watercolor_argb = tp.watercolor_argb;
|
|
||||||
this.watercolor_height = tp.watercolor_height;
|
|
||||||
this.watercolor_width = tp.watercolor_width;
|
|
||||||
this.trivial_watercolor = tp.trivial_watercolor;
|
|
||||||
|
|
||||||
this.foliagecolor_argb = tp.foliagecolor_argb;
|
|
||||||
this.foliagecolor_height = tp.foliagecolor_height;
|
|
||||||
this.foliagecolor_width = tp.foliagecolor_width;
|
|
||||||
this.trivial_foliagecolor = tp.trivial_foliagecolor;
|
|
||||||
|
|
||||||
this.water_argb = tp.water_argb;
|
|
||||||
this.water_height = tp.water_height;
|
|
||||||
this.water_width = tp.water_width;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load terrain.png */
|
/* Load terrain.png */
|
||||||
@ -300,94 +291,47 @@ public class TexturePack {
|
|||||||
img.flush();
|
img.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load misc/grasscolor.png */
|
/* Load image into image array */
|
||||||
private void loadGrassColorPNG(InputStream is) throws IOException {
|
private void loadImage(InputStream is, int idx) throws IOException {
|
||||||
/* Load image */
|
/* Load image */
|
||||||
BufferedImage img = ImageIO.read(is);
|
BufferedImage img = ImageIO.read(is);
|
||||||
if(img == null) { throw new FileNotFoundException(); }
|
if(img == null) { throw new FileNotFoundException(); }
|
||||||
grasscolor_width = img.getWidth();
|
imgs[idx] = new LoadedImage();
|
||||||
grasscolor_height = img.getHeight();
|
imgs[idx].width = img.getWidth();
|
||||||
grasscolor_argb = new int[grasscolor_width * grasscolor_height];
|
imgs[idx].height = img.getHeight();
|
||||||
img.getRGB(0, 0, grasscolor_width, grasscolor_height, grasscolor_argb, 0, grasscolor_width);
|
imgs[idx].argb = new int[imgs[idx].width * imgs[idx].height];
|
||||||
|
img.getRGB(0, 0, imgs[idx].width, imgs[idx].height, imgs[idx].argb, 0, imgs[idx].width);
|
||||||
img.flush();
|
img.flush();
|
||||||
/* Figure out trivial color */
|
}
|
||||||
trivial_grasscolor = grasscolor_argb[grasscolor_height*grasscolor_width*3/4 + grasscolor_width/2];
|
|
||||||
|
/* Load biome shading image into image array */
|
||||||
|
private void loadBiomeShadingImage(InputStream is, int idx) throws IOException {
|
||||||
|
loadImage(is, idx); /* Get image */
|
||||||
|
LoadedImage li = imgs[idx];
|
||||||
|
/* Get trivial color for biome-shading image */
|
||||||
|
int clr = li.argb[li.height*li.width*3/4 + li.width/2];
|
||||||
boolean same = true;
|
boolean same = true;
|
||||||
for(int j = 0; same && (j < grasscolor_height); j++) {
|
for(int j = 0; same && (j < li.height); j++) {
|
||||||
for(int i = 0; same && (i <= j); i++) {
|
for(int i = 0; same && (i <= j); i++) {
|
||||||
if(grasscolor_argb[grasscolor_width*j+i] != trivial_grasscolor)
|
if(li.argb[li.width*j+i] != clr)
|
||||||
same = false;
|
same = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* All the same - no biome lookup needed */
|
/* All the same - no biome lookup needed */
|
||||||
if(same)
|
if(same)
|
||||||
grasscolor_argb = null;
|
imgs[idx].argb = null;
|
||||||
|
li.trivial_color = clr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Load misc/foliagecolor.png */
|
/* Patch image into texture table */
|
||||||
private void loadFoliageColorPNG(InputStream is) throws IOException {
|
private void patchTextureWithImage(int image_idx, int block_idx) {
|
||||||
/* Load image */
|
|
||||||
BufferedImage img = ImageIO.read(is);
|
|
||||||
if(img == null) { throw new FileNotFoundException(); }
|
|
||||||
foliagecolor_width = img.getWidth();
|
|
||||||
foliagecolor_height = img.getHeight();
|
|
||||||
foliagecolor_argb = new int[foliagecolor_width * foliagecolor_height];
|
|
||||||
img.getRGB(0, 0, foliagecolor_width, foliagecolor_height, foliagecolor_argb, 0, foliagecolor_width);
|
|
||||||
img.flush();
|
|
||||||
/* Figure out trivial color */
|
|
||||||
trivial_foliagecolor = foliagecolor_argb[foliagecolor_height*foliagecolor_width*3/4 + foliagecolor_width/2];
|
|
||||||
boolean same = true;
|
|
||||||
for(int j = 0; same && (j < foliagecolor_height); j++) {
|
|
||||||
for(int i = 0; same && (i <= j); i++) {
|
|
||||||
if(foliagecolor_argb[foliagecolor_width*j+i] != trivial_foliagecolor)
|
|
||||||
same = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* All the same - no biome lookup needed */
|
|
||||||
if(same)
|
|
||||||
foliagecolor_argb = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Load misc/watercolor.png */
|
|
||||||
private void loadWaterColorPNG(InputStream is) throws IOException {
|
|
||||||
/* Load image */
|
|
||||||
BufferedImage img = ImageIO.read(is);
|
|
||||||
if(img == null) { throw new FileNotFoundException(); }
|
|
||||||
watercolor_width = img.getWidth();
|
|
||||||
watercolor_height = img.getHeight();
|
|
||||||
watercolor_argb = new int[watercolor_width * watercolor_height];
|
|
||||||
img.getRGB(0, 0, watercolor_width, watercolor_height, watercolor_argb, 0, watercolor_width);
|
|
||||||
img.flush();
|
|
||||||
/* Figure out trivial color */
|
|
||||||
trivial_watercolor = watercolor_argb[watercolor_height*watercolor_width*3/4 + watercolor_width/2];
|
|
||||||
boolean same = true;
|
|
||||||
for(int j = 0; same && (j < watercolor_height); j++) {
|
|
||||||
for(int i = 0; same && (i <= j); i++) {
|
|
||||||
if(watercolor_argb[watercolor_width*j+i] != trivial_watercolor)
|
|
||||||
same = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* All the same - no biome lookup needed */
|
|
||||||
if(same)
|
|
||||||
watercolor_argb = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Load misc/water.png */
|
|
||||||
private void loadWaterPNG(InputStream is) throws IOException {
|
|
||||||
/* Load image */
|
|
||||||
BufferedImage img = ImageIO.read(is);
|
|
||||||
if(img == null) { throw new FileNotFoundException(); }
|
|
||||||
water_width = img.getWidth();
|
|
||||||
water_height = img.getHeight();
|
|
||||||
water_argb = new int[water_width * water_height];
|
|
||||||
img.getRGB(0, 0, water_width, water_height, water_argb, 0, water_width);
|
|
||||||
img.flush();
|
|
||||||
/* Now, patch in to block table */
|
/* Now, patch in to block table */
|
||||||
int new_water_argb[] = new int[native_scale*native_scale];
|
int new_argb[] = new int[native_scale*native_scale];
|
||||||
scaleTerrainPNGSubImage(water_width, native_scale, water_argb, new_water_argb);
|
scaleTerrainPNGSubImage(imgs[image_idx].width, native_scale, imgs[image_idx].argb, new_argb);
|
||||||
terrain_argb[BLOCKINDEX_STATIONARYWATER] = new_water_argb;
|
terrain_argb[block_idx] = new_argb;
|
||||||
terrain_argb[BLOCKINDEX_MOVINGWATER] = new_water_argb;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get texture pack directory */
|
/* Get texture pack directory */
|
||||||
private static File getTexturePackDirectory() {
|
private static File getTexturePackDirectory() {
|
||||||
return new File(DynmapPlugin.dataDirectory, "texturepacks");
|
return new File(DynmapPlugin.dataDirectory, "texturepacks");
|
||||||
@ -586,7 +530,7 @@ public class TexturePack {
|
|||||||
while((line = rdr.readLine()) != null) {
|
while((line = rdr.readLine()) != null) {
|
||||||
if(line.startsWith("block:")) {
|
if(line.startsWith("block:")) {
|
||||||
ArrayList<Integer> blkids = new ArrayList<Integer>();
|
ArrayList<Integer> blkids = new ArrayList<Integer>();
|
||||||
int databits = 0;
|
int databits = -1;
|
||||||
int faces[] = new int[] { -1, -1, -1, -1, -1, -1 };
|
int faces[] = new int[] { -1, -1, -1, -1, -1, -1 };
|
||||||
line = line.substring(6);
|
line = line.substring(6);
|
||||||
String[] args = line.split(",");
|
String[] args = line.split(",");
|
||||||
@ -638,8 +582,10 @@ public class TexturePack {
|
|||||||
faces[BlockStep.Y_PLUS.ordinal()] = Integer.parseInt(av[1]);
|
faces[BlockStep.Y_PLUS.ordinal()] = Integer.parseInt(av[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* If no data bits, assume all */
|
||||||
|
if(databits < 0) databits = 0xFFFF;
|
||||||
/* If we have everything, build block */
|
/* If we have everything, build block */
|
||||||
if((blkids.size() > 0) && (databits != 0)) {
|
if(blkids.size() > 0) {
|
||||||
HDTextureMap map = new HDTextureMap(blkids, databits, faces);
|
HDTextureMap map = new HDTextureMap(blkids, databits, faces);
|
||||||
map.addToTable();
|
map.addToTable();
|
||||||
cnt++;
|
cnt++;
|
||||||
@ -767,30 +713,34 @@ public class TexturePack {
|
|||||||
/* Read color from texture */
|
/* Read color from texture */
|
||||||
rslt.setARGB(texture[v*native_scale + u]);
|
rslt.setARGB(texture[v*native_scale + u]);
|
||||||
if(textop > 0) {
|
if(textop > 0) {
|
||||||
|
LoadedImage li;
|
||||||
/* Switch based on texture modifier */
|
/* Switch based on texture modifier */
|
||||||
switch(textop) {
|
switch(textop) {
|
||||||
case COLORMOD_GRASSTONED:
|
case COLORMOD_GRASSTONED:
|
||||||
if(grasscolor_argb == null) {
|
li = imgs[IMG_GRASSCOLOR];
|
||||||
rslt.blendColor(trivial_grasscolor);
|
if(li.argb == null) {
|
||||||
|
rslt.blendColor(li.trivial_color);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rslt.blendColor(biomeLookup(grasscolor_argb, grasscolor_width, mapiter.getRawBiomeRainfall(), mapiter.getRawBiomeTemperature()));
|
rslt.blendColor(biomeLookup(li.argb, li.width, mapiter.getRawBiomeRainfall(), mapiter.getRawBiomeTemperature()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COLORMOD_FOLIAGETONED:
|
case COLORMOD_FOLIAGETONED:
|
||||||
if(foliagecolor_argb == null) {
|
li = imgs[IMG_FOLIAGECOLOR];
|
||||||
rslt.blendColor(trivial_foliagecolor);
|
if(li.argb == null) {
|
||||||
|
rslt.blendColor(li.trivial_color);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rslt.blendColor(biomeLookup(foliagecolor_argb, foliagecolor_width, mapiter.getRawBiomeRainfall(), mapiter.getRawBiomeTemperature()));
|
rslt.blendColor(biomeLookup(li.argb, li.width, mapiter.getRawBiomeRainfall(), mapiter.getRawBiomeTemperature()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case COLORMOD_WATERTONED:
|
case COLORMOD_WATERTONED:
|
||||||
if(watercolor_argb == null) {
|
li = imgs[IMG_WATERCOLOR];
|
||||||
rslt.blendColor(trivial_watercolor);
|
if(li.argb == null) {
|
||||||
|
rslt.blendColor(li.trivial_color);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rslt.blendColor(biomeLookup(watercolor_argb, watercolor_width, mapiter.getRawBiomeRainfall(), mapiter.getRawBiomeTemperature()));
|
rslt.blendColor(biomeLookup(li.argb, li.width, mapiter.getRawBiomeRainfall(), mapiter.getRawBiomeTemperature()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -264,9 +264,7 @@ public class LegacyMapChunkCache implements MapChunkCache {
|
|||||||
} catch (NoSuchMethodException nsmx) {
|
} catch (NoSuchMethodException nsmx) {
|
||||||
}
|
}
|
||||||
initialized = true;
|
initialized = true;
|
||||||
if(gethandle != null)
|
if(gethandle == null) {
|
||||||
Log.info("Chunk snapshot support enabled");
|
|
||||||
else {
|
|
||||||
Log.severe("ERROR: Chunk snapshot support not found - rendering not functiona!l");
|
Log.severe("ERROR: Chunk snapshot support not found - rendering not functiona!l");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -258,10 +258,6 @@ public class NewMapChunkCache implements MapChunkCache {
|
|||||||
} catch (ClassNotFoundException cnfx) {
|
} catch (ClassNotFoundException cnfx) {
|
||||||
} catch (NoSuchMethodException nsmx) {
|
} catch (NoSuchMethodException nsmx) {
|
||||||
}
|
}
|
||||||
if(getsnapshot2 != null)
|
|
||||||
Log.info("Biome data support is enabled");
|
|
||||||
else
|
|
||||||
Log.info("Biome data support is disabled");
|
|
||||||
init = true;
|
init = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
140
texture.txt
140
texture.txt
@ -6,15 +6,15 @@
|
|||||||
# 10xxx=inclined-torch,11xxx=grass-side,12xxx=clear if same block
|
# 10xxx=inclined-torch,11xxx=grass-side,12xxx=clear if same block
|
||||||
######
|
######
|
||||||
# Stone
|
# Stone
|
||||||
block:id=1,data=*,allfaces=1
|
block:id=1,allfaces=1
|
||||||
# Grass
|
# Grass
|
||||||
block:id=2,data=*,allsides=11003,top=1000,bottom=2
|
block:id=2,allsides=11003,top=1000,bottom=2
|
||||||
# Dirt
|
# Dirt
|
||||||
block:id=3,data=*,allfaces=2
|
block:id=3,allfaces=2
|
||||||
# Cobblestone
|
# Cobblestone
|
||||||
block:id=4,data=*,allfaces=16
|
block:id=4,allfaces=16
|
||||||
# Wooden Plank
|
# Wooden Plank
|
||||||
block:id=5,data=*,allsides=4,topbottom=4004
|
block:id=5,allsides=4,topbottom=4004
|
||||||
# Sapling
|
# Sapling
|
||||||
block:id=6,data=0,data=3,allsides=15
|
block:id=6,data=0,data=3,allsides=15
|
||||||
# Sapling (Spruce)
|
# Sapling (Spruce)
|
||||||
@ -22,25 +22,25 @@ block:id=6,data=1,allsides=63
|
|||||||
# Sapling (Birch)
|
# Sapling (Birch)
|
||||||
block:id=6,data=2,allsides=79
|
block:id=6,data=2,allsides=79
|
||||||
# Bedrock
|
# Bedrock
|
||||||
block:id=7,data=*,allfaces=16
|
block:id=7,allfaces=16
|
||||||
# Water
|
# Water
|
||||||
block:id=8,data=*,allfaces=12258
|
block:id=8,allfaces=12258
|
||||||
# Stationary water
|
# Stationary water
|
||||||
block:id=9,data=*,allfaces=12257
|
block:id=9,allfaces=12257
|
||||||
# Lava
|
# Lava
|
||||||
block:id=10,data=*,allfaces=260
|
block:id=10,allfaces=260
|
||||||
# Stationary Lava
|
# Stationary Lava
|
||||||
block:id=11,data=*,allfaces=259
|
block:id=11,allfaces=259
|
||||||
# Sand
|
# Sand
|
||||||
block:id=12,data=*,allfaces=18
|
block:id=12,allfaces=18
|
||||||
# Gravel
|
# Gravel
|
||||||
block:id=13,data=*,allfaces=19
|
block:id=13,allfaces=19
|
||||||
# Gold Ore
|
# Gold Ore
|
||||||
block:id=14,data=*,allfaces=32
|
block:id=14,allfaces=32
|
||||||
# Iron Ore
|
# Iron Ore
|
||||||
block:id=15,data=*,allfaces=33
|
block:id=15,allfaces=33
|
||||||
# Coal Ore
|
# Coal Ore
|
||||||
block:id=16,data=*,allfaces=34
|
block:id=16,allfaces=34
|
||||||
# Wood (std)
|
# Wood (std)
|
||||||
block:id=17,data=0,allsides=20,top=21,bottom=21
|
block:id=17,data=0,allsides=20,top=21,bottom=21
|
||||||
# Wood (spruce/pine)
|
# Wood (spruce/pine)
|
||||||
@ -54,13 +54,13 @@ block:id=18,data=1,allfaces=2132
|
|||||||
# Leaves (birch)
|
# Leaves (birch)
|
||||||
block:id=18,data=2,allfaces=2052
|
block:id=18,data=2,allfaces=2052
|
||||||
# Sponge
|
# Sponge
|
||||||
block:id=19,data=*,allfaces=48
|
block:id=19,allfaces=48
|
||||||
# Glass
|
# Glass
|
||||||
block:id=20,data=*,allfaces=12049
|
block:id=20,allfaces=12049
|
||||||
# Lapis Lazuli Ore
|
# Lapis Lazuli Ore
|
||||||
block:id=21,data=*,allfaces=160
|
block:id=21,allfaces=160
|
||||||
# Lapis Lazuli Block
|
# Lapis Lazuli Block
|
||||||
block:id=22,data=*,allfaces=144
|
block:id=22,allfaces=144
|
||||||
# Dispenser (facing east)
|
# Dispenser (facing east)
|
||||||
block:id=23,data=2,top=62,east=46,south=45,north=45,west=45,bottom=62
|
block:id=23,data=2,top=62,east=46,south=45,north=45,west=45,bottom=62
|
||||||
# Dispenser (facing west)
|
# Dispenser (facing west)
|
||||||
@ -70,7 +70,7 @@ block:id=23,data=4,top=62,north=46,south=45,east=45,west=45,bottom=62
|
|||||||
# Dispenser (facing south)
|
# Dispenser (facing south)
|
||||||
block:id=23,data=5,top=62,south=46,north=45,east=45,west=45,bottom=62
|
block:id=23,data=5,top=62,south=46,north=45,east=45,west=45,bottom=62
|
||||||
# Sandstone
|
# Sandstone
|
||||||
block:id=24,data=*,top=176,bottom=208,allsides=192
|
block:id=24,top=176,bottom=208,allsides=192
|
||||||
# Note Block
|
# Note Block
|
||||||
block:id=25,allfaces=74
|
block:id=25,allfaces=74
|
||||||
# Bed - head - pointing west
|
# Bed - head - pointing west
|
||||||
@ -126,7 +126,7 @@ block:id=29,data=4,data=12,north=106,south=109,top=108,bottom=5108,east=6108,wes
|
|||||||
# Sticky piston - facing south
|
# Sticky piston - facing south
|
||||||
block:id=29,data=5,data=13,north=109,south=106,top=5108,bottom=108,east=4108,west=6108
|
block:id=29,data=5,data=13,north=109,south=106,top=5108,bottom=108,east=4108,west=6108
|
||||||
# Web
|
# Web
|
||||||
block:id=30,data=*,allfaces=11
|
block:id=30,allfaces=11
|
||||||
# Dead shrub
|
# Dead shrub
|
||||||
block:id=31,data=0,allsides=55,top=20
|
block:id=31,data=0,allsides=55,top=20
|
||||||
# Tall Grass
|
# Tall Grass
|
||||||
@ -134,7 +134,7 @@ block:id=31,data=1,allfaces=1039
|
|||||||
# Fern
|
# Fern
|
||||||
block:id=31,data=2,allsides=1056,top=1000
|
block:id=31,data=2,allsides=1056,top=1000
|
||||||
# Dead shrub
|
# Dead shrub
|
||||||
block:id=32,data=*,allsides=55,top=20
|
block:id=32,allsides=55,top=20
|
||||||
# Piston - facing down
|
# Piston - facing down
|
||||||
block:id=33,data=0,data=8,top=109,bottom=107,allsides=5108
|
block:id=33,data=0,data=8,top=109,bottom=107,allsides=5108
|
||||||
# Piston - facing up
|
# Piston - facing up
|
||||||
@ -148,7 +148,7 @@ block:id=33,data=4,data=12,north=107,south=109,top=108,bottom=5108,east=6108,wes
|
|||||||
# Piston - facing south
|
# Piston - facing south
|
||||||
block:id=33,data=5,data=13,north=109,south=107,top=5108,bottom=108,east=4108,west=6108
|
block:id=33,data=5,data=13,north=109,south=107,top=5108,bottom=108,east=4108,west=6108
|
||||||
# Piston extesions - skipped - render all as if closed
|
# Piston extesions - skipped - render all as if closed
|
||||||
block:id=34,data=*
|
block:id=34
|
||||||
# Wool - white
|
# Wool - white
|
||||||
block:id=35,data=0,allfaces=64
|
block:id=35,data=0,allfaces=64
|
||||||
# Wool - orange
|
# Wool - orange
|
||||||
@ -182,19 +182,19 @@ block:id=35,data=14,allfaces=129
|
|||||||
# Wool - Black
|
# Wool - Black
|
||||||
block:id=35,data=15,allfaces=113
|
block:id=35,data=15,allfaces=113
|
||||||
# Block move by piston - don't render
|
# Block move by piston - don't render
|
||||||
block:id=36,data=*
|
block:id=36
|
||||||
# Dandelion
|
# Dandelion
|
||||||
block:id=37,data=*,allsides=13,top=162
|
block:id=37,allsides=13,top=162
|
||||||
# Rose
|
# Rose
|
||||||
block:id=38,data=*,allsides=12,top=129
|
block:id=38,allsides=12,top=129
|
||||||
# Brown mushroom
|
# Brown mushroom
|
||||||
block:id=39,data=*,allsides=29,top=161
|
block:id=39,allsides=29,top=161
|
||||||
# Red mushroom
|
# Red mushroom
|
||||||
block:id=40,data=*,allsides=28,top=129
|
block:id=40,allsides=28,top=129
|
||||||
# Gold block
|
# Gold block
|
||||||
block:id=41,data=*,allfaces=23
|
block:id=41,allfaces=23
|
||||||
# Iron block
|
# Iron block
|
||||||
block:id=42,data=*,allfaces=22
|
block:id=42,allfaces=22
|
||||||
# Double Slab - stone
|
# Double Slab - stone
|
||||||
block:id=43,data=0,allsides=5,topbottom=6
|
block:id=43,data=0,allsides=5,topbottom=6
|
||||||
# Double Slab - Sandstone
|
# Double Slab - Sandstone
|
||||||
@ -212,35 +212,35 @@ block:id=44,data=2,allsides=4,topbottom=4004
|
|||||||
# Slab - Cobblestone
|
# Slab - Cobblestone
|
||||||
block:id=44,data=3,allfaces=16
|
block:id=44,data=3,allfaces=16
|
||||||
# Brick Block
|
# Brick Block
|
||||||
block:id=45,data=*,allfaces=7
|
block:id=45,allfaces=7
|
||||||
# TNT
|
# TNT
|
||||||
block:id=46,data=*,top=9,bottom=10,allsides=8
|
block:id=46,top=9,bottom=10,allsides=8
|
||||||
# Bookshelf
|
# Bookshelf
|
||||||
block:id=47,data=*,topbottom=4,allsides=35
|
block:id=47,topbottom=4,allsides=35
|
||||||
# Mossy Cobblestone
|
# Mossy Cobblestone
|
||||||
block:id=48,data=*,allfaces=36
|
block:id=48,allfaces=36
|
||||||
# Obsidian
|
# Obsidian
|
||||||
block:id=49,data=*,allfaces=37
|
block:id=49,allfaces=37
|
||||||
# Torch - inclined
|
# Torch - inclined
|
||||||
block:id=50,data=1,data=2,data=3,data=4,allsides=10080,top=162,bottom=4
|
block:id=50,data=1,data=2,data=3,data=4,allsides=10080,top=162,bottom=4
|
||||||
# Torch - up
|
# Torch - up
|
||||||
block:id=50,data=5,allsides=80,top=162,bottom=4
|
block:id=50,data=5,allsides=80,top=162,bottom=4
|
||||||
# Fire
|
# Fire
|
||||||
block:id=51,data=*,allsides=129,top=162
|
block:id=51,allsides=129,top=162
|
||||||
# Monster spawner
|
# Monster spawner
|
||||||
block:id=52,data=*,allfaces=65
|
block:id=52,allfaces=65
|
||||||
# Wooden stairs
|
# Wooden stairs
|
||||||
block:id=53,data=*,allsides=4,topbottom=4004
|
block:id=53,allsides=4,topbottom=4004
|
||||||
# Chest - TODO: get entity data so we can see orientation
|
# Chest - TODO: get entity data so we can see orientation
|
||||||
block:id=54,data=*,top=25,south=27,north=27,east=26,west=26
|
block:id=54,top=25,south=27,north=27,east=26,west=26
|
||||||
# Redstone wire (model handling shape - use red wool for color)
|
# Redstone wire (model handling shape - use red wool for color)
|
||||||
block:id=55,data=*,allfaces=129
|
block:id=55,allfaces=129
|
||||||
# Diamond ore
|
# Diamond ore
|
||||||
block:id=56,data=*,allfaces=50
|
block:id=56,allfaces=50
|
||||||
# Diamond block
|
# Diamond block
|
||||||
block:id=57,data=*,allfaces=24
|
block:id=57,allfaces=24
|
||||||
# Crafting table
|
# Crafting table
|
||||||
block:id=58,data=*,topbottom=43,east=59,west=59,north=60,south=60
|
block:id=58,topbottom=43,east=59,west=59,north=60,south=60
|
||||||
# Crops (size 1)
|
# Crops (size 1)
|
||||||
block:id=59,data=0,allsides=88,top=1000
|
block:id=59,data=0,allsides=88,top=1000
|
||||||
# Crops (size 2)
|
# Crops (size 2)
|
||||||
@ -270,13 +270,13 @@ block:id=61,data=4,top=62,north=61,south=45,east=45,west=45,bottom=62
|
|||||||
# Furnace (facing south)
|
# Furnace (facing south)
|
||||||
block:id=61,data=5,top=62,south=61,north=45,east=45,west=45,bottom=62
|
block:id=61,data=5,top=62,south=61,north=45,east=45,west=45,bottom=62
|
||||||
# Signpost
|
# Signpost
|
||||||
block:id=62,data=*,allsides=4,topbottom=4004
|
block:id=62,allsides=4,topbottom=4004
|
||||||
# Wooden Door - bottom
|
# Wooden Door - bottom
|
||||||
block:id=64,data=0,data=1,data=2,data=3,data=4,data=5,data=6,data=7,allsides=97,topbottom=4
|
block:id=64,data=0,data=1,data=2,data=3,data=4,data=5,data=6,data=7,allsides=97,topbottom=4
|
||||||
# Wooden Door - top
|
# Wooden Door - top
|
||||||
block:id=64,data=8,data=9,data=10,data=11,data=12,data=13,data=14,data=15,allsides=81,topbottom=4
|
block:id=64,data=8,data=9,data=10,data=11,data=12,data=13,data=14,data=15,allsides=81,topbottom=4
|
||||||
# Ladders
|
# Ladders
|
||||||
block:id=65,data=*,allsides=83,topbottom=4
|
block:id=65,allsides=83,topbottom=4
|
||||||
# Rail - heading east-west
|
# Rail - heading east-west
|
||||||
# Rail - incline to east
|
# Rail - incline to east
|
||||||
# Rail - incline to west
|
# Rail - incline to west
|
||||||
@ -294,21 +294,21 @@ block:id=66,data=8,topbottom=6112,allsides=4
|
|||||||
# Rails - northwest corner
|
# Rails - northwest corner
|
||||||
block:id=66,data=9,topbottom=112,allsides=4
|
block:id=66,data=9,topbottom=112,allsides=4
|
||||||
# Cobblestone Stairs
|
# Cobblestone Stairs
|
||||||
block:id=67,data=*,allfaces=16
|
block:id=67,allfaces=16
|
||||||
# Wall sign
|
# Wall sign
|
||||||
block:id=68,data=*,allsides=4,topbottom=4004
|
block:id=68,allsides=4,topbottom=4004
|
||||||
# Switch (just do stone for now)
|
# Switch (just do stone for now)
|
||||||
block:id=69,data=*,allfaces=1
|
block:id=69,allfaces=1
|
||||||
# Stone pressure plate
|
# Stone pressure plate
|
||||||
block:id=70,data=*,allfaces=1
|
block:id=70,allfaces=1
|
||||||
# Iron Door - bottom
|
# Iron Door - bottom
|
||||||
block:id=71,data=0,data=1,data=2,data=3,data=4,data=5,data=6,data=7,allsides=98,topbottom=22
|
block:id=71,data=0,data=1,data=2,data=3,data=4,data=5,data=6,data=7,allsides=98,topbottom=22
|
||||||
# Iron Door - top
|
# Iron Door - top
|
||||||
block:id=71,data=8,data=9,data=10,data=11,data=12,data=13,data=14,data=15,allsides=82,topbottom=22
|
block:id=71,data=8,data=9,data=10,data=11,data=12,data=13,data=14,data=15,allsides=82,topbottom=22
|
||||||
# Wooden pressure plate
|
# Wooden pressure plate
|
||||||
block:id=72,data=*,allsides=4,topbottom=4004
|
block:id=72,allsides=4,topbottom=4004
|
||||||
# Redstone Ore
|
# Redstone Ore
|
||||||
block:id=73,id=74,data=*,allfaces=51
|
block:id=73,id=74,allfaces=51
|
||||||
# Redstone Torch - unlit - inclined
|
# Redstone Torch - unlit - inclined
|
||||||
block:id=75,data=1,data=2,data=3,data=4,allsides=10115,top=162,bottom=4
|
block:id=75,data=1,data=2,data=3,data=4,allsides=10115,top=162,bottom=4
|
||||||
# Redstone Torch - unlit - up
|
# Redstone Torch - unlit - up
|
||||||
@ -318,33 +318,33 @@ block:id=76,data=1,data=2,data=3,data=4,allsides=10099,top=162,bottom=4
|
|||||||
# Redstone Torch - lit - up
|
# Redstone Torch - lit - up
|
||||||
block:id=76,data=5,allsides=99,top=162,bottom=4
|
block:id=76,data=5,allsides=99,top=162,bottom=4
|
||||||
# Stone button
|
# Stone button
|
||||||
block:id=77,data=*,allfaces=1
|
block:id=77,allfaces=1
|
||||||
# Snow
|
# Snow
|
||||||
block:id=78,data=*,allfaces=66
|
block:id=78,allfaces=66
|
||||||
# Ice
|
# Ice
|
||||||
block:id=79,data=*,allfaces=12067
|
block:id=79,allfaces=12067
|
||||||
# Snow block
|
# Snow block
|
||||||
block:id=80,data=*,allfaces=66
|
block:id=80,allfaces=66
|
||||||
# Cactus
|
# Cactus
|
||||||
block:id=81,data=*,top=69,allsides=70,bottom=71
|
block:id=81,top=69,allsides=70,bottom=71
|
||||||
# Clay block
|
# Clay block
|
||||||
block:id=82,data=*,allfaces=72
|
block:id=82,allfaces=72
|
||||||
# Sugar Cane
|
# Sugar Cane
|
||||||
block:id=83,data=*,allsides=73,topbottom=21
|
block:id=83,allsides=73,topbottom=21
|
||||||
# Jukebox
|
# Jukebox
|
||||||
block:id=84,data=*,allsides=74,topbottom=75
|
block:id=84,allsides=74,topbottom=75
|
||||||
# Fence
|
# Fence
|
||||||
block:id=85,data=*,allsides=4,topbottom=4004
|
block:id=85,allsides=4,topbottom=4004
|
||||||
# Pumpkin
|
# Pumpkin
|
||||||
block:id=86,data=*,allsides=118,topbottom=102
|
block:id=86,allsides=118,topbottom=102
|
||||||
# Netherrock
|
# Netherrock
|
||||||
block:id=87,data=*,allfaces=103
|
block:id=87,allfaces=103
|
||||||
# SoulSand
|
# SoulSand
|
||||||
block:id=88,data=*,allfaces=104
|
block:id=88,allfaces=104
|
||||||
# Glowstone Block
|
# Glowstone Block
|
||||||
block:id=89,data=*,allfaces=105
|
block:id=89,allfaces=105
|
||||||
# Portal (no texture for this - using purple wool)
|
# Portal (no texture for this - using purple wool)
|
||||||
block:id=90,data=*,allfaces=193
|
block:id=90,allfaces=193
|
||||||
# Jack O Lantern (east)
|
# Jack O Lantern (east)
|
||||||
block:id=91,data=0,north=118,south=118,east=120,west=118,topbottom=102
|
block:id=91,data=0,north=118,south=118,east=120,west=118,topbottom=102
|
||||||
# Jack O Lantern (south)
|
# Jack O Lantern (south)
|
||||||
@ -354,12 +354,12 @@ block:id=91,data=2,north=118,south=118,east=118,west=120,topbottom=102
|
|||||||
# Jack O Lantern (north)
|
# Jack O Lantern (north)
|
||||||
block:id=91,data=3,north=120,south=118,east=118,west=118,topbottom=102
|
block:id=91,data=3,north=120,south=118,east=118,west=118,topbottom=102
|
||||||
# Cake Block
|
# Cake Block
|
||||||
block:id=92,data=*,allsides=122,top=121,bottom=124
|
block:id=92,allsides=122,top=121,bottom=124
|
||||||
# Repeater (off)
|
# Repeater (off)
|
||||||
block:id=93,data=*,top=131,allsides=1,bottom=1
|
block:id=93,top=131,allsides=1,bottom=1
|
||||||
# Repeater (on)
|
# Repeater (on)
|
||||||
block:id=94,data=*,top=147,allsides=1,bottom=1
|
block:id=94,top=147,allsides=1,bottom=1
|
||||||
# Locked Chest - TODO: get entity data so we can see orientation
|
# Locked Chest - TODO: get entity data so we can see orientation
|
||||||
block:id=95,data=*,top=25,south=27,north=27,east=26,west=26
|
block:id=95,top=25,south=27,north=27,east=26,west=26
|
||||||
# Trap door
|
# Trap door
|
||||||
block:id=96,data=*,topbottom=84,allsides=4
|
block:id=96,topbottom=84,allsides=4
|
||||||
|
Loading…
Reference in New Issue
Block a user