Fix mushroom stem render, cleanup System.out uses

This commit is contained in:
Mike Primm 2021-12-28 14:37:20 -06:00
parent 48ba0b2e41
commit 332292c42c
45 changed files with 197 additions and 161 deletions

View File

@ -678,12 +678,12 @@ public class DynmapCore implements DynmapCommonAPI {
events.<Object>trigger("initialized", null);
//dumpColorMap("standard.txt", "standard");
//dumpColorMap("dokudark.txt", "dokudark.zip");
//dumpColorMap("dokulight.txt", "dokulight.zip");
//dumpColorMap("dokuhigh.txt", "dokuhigh.zip");
//dumpColorMap("misa.txt", "misa.zip");
//dumpColorMap("sphax.txt", "sphax.zip");
dumpColorMap("standard.txt", "standard");
dumpColorMap("dokudark.txt", "dokudark.zip");
dumpColorMap("dokulight.txt", "dokulight.zip");
dumpColorMap("dokuhigh.txt", "dokuhigh.zip");
dumpColorMap("misa.txt", "misa.zip");
dumpColorMap("sphax.txt", "sphax.zip");
if (configuration.getBoolean("dumpBlockState", false)) {
Log.info("Block State Dump");
@ -742,13 +742,13 @@ public class DynmapCore implements DynmapCommonAPI {
switch(idx) {
case 1: // grass
case 18: // grass
System.out.println("Used grass for " + blk);
Log.info("Used grass for " + blk);
c.blendColor(tp.getTrivialGrassMultiplier() | 0xFF000000);
break;
case 2: // foliage
case 19: // foliage
case 22: // foliage
System.out.println("Used foliage for " + blk);
Log.info("Used foliage for " + blk);
c.blendColor(tp.getTrivialFoliageMultiplier() | 0xFF000000);
break;
case 13: // pine
@ -762,19 +762,19 @@ public class DynmapCore implements DynmapCommonAPI {
break;
case 3: // water
case 20: // water
System.out.println("Used water for " + blk);
Log.info("Used water for " + blk);
c.blendColor(tp.getTrivialWaterMultiplier() | 0xFF000000);
break;
case 12: // clear inside
if (blk.isWater()) { // special case for water
System.out.println("Used water for " + blk);
Log.info("Used water for " + blk);
c.blendColor(tp.getTrivialWaterMultiplier() | 0xFF000000);
}
break;
}
int custmult = tp.getCustomBlockMultiplier(blk);
if (custmult != 0xFFFFFF) {
System.out.println(String.format("Custom color: %06x for %s", custmult, blk));
Log.info(String.format("Custom color: %06x for %s", custmult, blk));
if ((custmult & 0xFF000000) == 0) {
custmult |= 0xFF000000;
}

View File

@ -13,6 +13,7 @@ public class GenericChunk {
public final long inhabitedTicks;
public final int dataVersion; // Version of chunk data loaded
public final String chunkStatus; // Chunk status of loaded chunk
public final boolean isEmpty; // All sections are empty
private GenericChunk(int cx, int cz, int cy_min, GenericChunkSection[] sections, long inhabTicks, int dataversion, String chunkstatus) {
this.cx = cx;
@ -23,11 +24,14 @@ public class GenericChunk {
this.sections = new GenericChunkSection[sections.length + 2]; // Add one empty at top and bottom
this.cy_min = cy_min - 1; // Include empty at bottom
Arrays.fill(this.sections, GenericChunkSection.EMPTY); // Fill all spots with empty, including pad on bottom/top
boolean empty = true;
for (int off = 0; off < sections.length; off++) {
if (sections[off] != null) { // If defined, set the section
this.sections[off+1] = sections[off];
empty = empty && sections[off].isEmpty;
}
}
this.isEmpty = empty;
}
// Get section for given block Y coord
public final GenericChunkSection getSection(int y) {
@ -72,9 +76,6 @@ public class GenericChunk {
return String.format("chunk(%d,%d:%s,off=%d", cx, cz, Arrays.deepToString((sections)), cy_min);
}
// Generic empty (coordinates are wrong, but safe otherwise
public static final GenericChunk EMPTY = new GenericChunk(0, 0, -4, new GenericChunkSection[24], 0, 0, null);
// Builder for fabricating finalized chunk
public static class Builder {
int x;

View File

@ -70,7 +70,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
this.bz = z & 0xF;
if ((chunkindex >= snapcnt) || (chunkindex < 0)) {
snap = GenericChunk.EMPTY;
snap = getEmpty();
} else {
snap = snaparray[chunkindex];
}
@ -294,7 +294,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
bx = 0;
chunkindex++;
if ((chunkindex >= snapcnt) || (chunkindex < 0)) {
snap = GenericChunk.EMPTY;
snap = getEmpty();
} else {
snap = snaparray[chunkindex];
}
@ -320,7 +320,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
bz = 0;
chunkindex += x_dim;
if ((chunkindex >= snapcnt) || (chunkindex < 0)) {
snap = GenericChunk.EMPTY;
snap = getEmpty();
} else {
snap = snaparray[chunkindex];
}
@ -336,7 +336,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
bx = 15;
chunkindex--;
if ((chunkindex >= snapcnt) || (chunkindex < 0)) {
snap = GenericChunk.EMPTY;
snap = getEmpty();
} else {
snap = snaparray[chunkindex];
}
@ -362,7 +362,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
bz = 15;
chunkindex -= x_dim;
if ((chunkindex >= snapcnt) || (chunkindex < 0)) {
snap = GenericChunk.EMPTY;
snap = getEmpty();
} else {
snap = snaparray[chunkindex];
}
@ -511,29 +511,44 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
}
}
private static final GenericChunkSection STONESECTION = (new GenericChunkSection.Builder()).singleBlockState(DynmapBlockState.getBaseStateByName(DynmapBlockState.STONE_BLOCK)).build();
private static final GenericChunkSection WATERSECTION = (new GenericChunkSection.Builder()).singleBlockState(DynmapBlockState.getBaseStateByName(DynmapBlockState.WATER_BLOCK)).build();
// Generate generic chunks for STONE and OCEAN hidden areas
private static final GenericChunk STONE = (new GenericChunk.Builder(-64, 319))
.addSection(0, STONESECTION).addSection(1, STONESECTION).addSection(2, STONESECTION).addSection(0, STONESECTION).build();
private static final GenericChunk OCEAN = (new GenericChunk.Builder(-64, 319))
.addSection(0, WATERSECTION).addSection(1, WATERSECTION).addSection(2, WATERSECTION).addSection(0, WATERSECTION).build();
public static void init() {
if (!init) {
init = true;
}
}
private static final GenericChunkSection STONESECTION = (new GenericChunkSection.Builder()).singleBiome(BiomeMap.PLAINS).singleBlockState(DynmapBlockState.getBaseStateByName(DynmapBlockState.STONE_BLOCK)).build();
private static final GenericChunkSection WATERSECTION = (new GenericChunkSection.Builder()).singleBiome(BiomeMap.OCEAN).singleBlockState(DynmapBlockState.getBaseStateByName(DynmapBlockState.WATER_BLOCK)).build();
private GenericChunkCache cache;
// Lazy generic chunks (tailored to height of world)
private GenericChunk empty_chunk;
private GenericChunk stone_chunk;
private GenericChunk ocean_chunk;
private final GenericChunk getEmpty() {
if (empty_chunk == null) {
empty_chunk = (new GenericChunk.Builder(dw.minY, dw.worldheight)).build();
}
return empty_chunk;
}
private final GenericChunk getStone() {
if (stone_chunk == null) {
GenericChunk.Builder bld = new GenericChunk.Builder(dw.minY, dw.worldheight);
for (int sy = -sectoff; sy < 4; sy++) { bld.addSection(sy, STONESECTION); }
stone_chunk = bld.build();
}
return stone_chunk;
}
private final GenericChunk getOcean() {
if (ocean_chunk == null) {
GenericChunk.Builder bld = new GenericChunk.Builder(dw.minY, dw.worldheight);
for (int sy = -sectoff; sy < 3; sy++) { bld.addSection(sy, STONESECTION); }
bld.addSection(3, WATERSECTION); // Put stone with ocean on top - less expensive render
ocean_chunk = bld.build();
}
return ocean_chunk;
}
/**
* Construct empty cache
*/
public GenericMapChunkCache(GenericChunkCache c) {
cache = c; // Save reference to cache
init();
cache = c; // Save reference to cache
}
public void setChunks(DynmapWorld dw, List<DynmapChunk> chunks) {
@ -611,11 +626,11 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
ss = ssr.ss;
if (!vis) {
if (hidestyle == HiddenChunkStyle.FILL_STONE_PLAIN) {
ss = STONE;
ss = getStone();
} else if (hidestyle == HiddenChunkStyle.FILL_OCEAN) {
ss = OCEAN;
ss = getOcean();
} else {
ss = GenericChunk.EMPTY;
ss = getEmpty();;
}
}
int idx = (chunk.x - x_min) + (chunk.z - z_min) * x_dim;
@ -678,13 +693,13 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
}
else {
if (hidestyle == HiddenChunkStyle.FILL_STONE_PLAIN) {
ss = STONE;
ss = getStone();
}
else if (hidestyle == HiddenChunkStyle.FILL_OCEAN) {
ss = OCEAN;
ss = getOcean();
}
else {
ss = GenericChunk.EMPTY;
ss = getEmpty();
}
}
snaparray[chunkindex] = ss;
@ -741,13 +756,13 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
// If hidden
if (!vis) {
if (hidestyle == HiddenChunkStyle.FILL_STONE_PLAIN) {
ss = STONE;
ss = getStone();
}
else if (hidestyle == HiddenChunkStyle.FILL_OCEAN) {
ss = OCEAN;
ss = getOcean();
}
else {
ss = GenericChunk.EMPTY;
ss = getEmpty();
}
}
else {
@ -772,9 +787,9 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
/* Fill missing chunks with empty dummy chunk */
for (int i = 0; i < snaparray.length; i++) {
if (snaparray[i] == null) {
snaparray[i] = GenericChunk.EMPTY;
snaparray[i] = getEmpty();
}
else if (snaparray[i] != GenericChunk.EMPTY) {
else if (!snaparray[i].isEmpty) {
isempty = false;
}
}
@ -819,7 +834,7 @@ public abstract class GenericMapChunkCache extends MapChunkCache {
private void initSectionData(int idx) {
isSectionNotEmpty[idx] = new boolean[nsect + 1];
if (snaparray[idx] != GenericChunk.EMPTY) {
if (!snaparray[idx].isEmpty) {
for (int i = 0; i < nsect; i++) {
if (snaparray[idx].isSectionEmpty(i - sectoff) == false) {
isSectionNotEmpty[idx][i] = true;

View File

@ -0,0 +1,92 @@
package org.dynmap.hdmap.renderer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Map;
import org.dynmap.renderer.CustomRenderer;
import org.dynmap.renderer.DynmapBlockState;
import org.dynmap.renderer.MapDataContext;
import org.dynmap.renderer.RenderPatch;
import org.dynmap.renderer.RenderPatchFactory;
/**
* Simple renderer for creating a model of a block, with a selection of two possible textures for each of the 6 faces
* The texture selection is based on the value of the corresponding facing attribute in the state ('down','up','north','south','east','west')
* Order of textures is false value followed by true value, for down, up, west, east, north, south
*/
public class BoxStateRenderer extends CustomRenderer {
// Models for each state index
private RenderPatch[] models[];
@Override
public boolean initializeRenderer(RenderPatchFactory rpf, String blkname, BitSet blockdatamask, Map<String,String> custparm) {
if(!super.initializeRenderer(rpf, blkname, blockdatamask, custparm))
return false;
double xmin = 0.0, xmax = 1.0;
double ymin = 0.0, ymax = 1.0;
double zmin = 0.0, zmax = 1.0;
/* Check limits */
String lim = custparm.get("xmin");
if (lim != null) {
xmin = Double.valueOf(lim);
if (xmin < 0.0) xmin = 0.0;
}
lim = custparm.get("xmax");
if (lim != null) {
xmax = Double.valueOf(lim);
if (xmax > 1.0) xmax = 1.0;
}
lim = custparm.get("ymin");
if (lim != null) {
ymin = Double.valueOf(lim);
if (ymin < 0.0) ymin = 0.0;
}
lim = custparm.get("ymax");
if (lim != null) {
ymax = Double.valueOf(lim);
if (ymax > 1.0) ymax = 1.0;
}
lim = custparm.get("zmin");
if (lim != null) {
zmin = Double.valueOf(lim);
if (zmin < 0.0) zmin = 0.0;
}
lim = custparm.get("zmax");
if (lim != null) {
zmax = Double.valueOf(lim);
if (zmax > 1.0) zmax = 1.0;
}
DynmapBlockState bs = DynmapBlockState.getBaseStateByName(blkname); // Look up block
/* Now, build box models */
models = new RenderPatch[bs.getStateCount()][];
int[] patchlist = new int[6];
for (int i = 0; i < models.length; i++) {
DynmapBlockState cbs = bs.getState(i);
ArrayList<RenderPatch> list = new ArrayList<RenderPatch>();
String[] states = cbs.stateList;
// Produce patch list
patchlist[0] = Arrays.binarySearch(states, "down=true") >= 0 ? 1 : 0;
patchlist[1] = Arrays.binarySearch(states, "up=true") >= 0 ? 3 : 2;
patchlist[2] = Arrays.binarySearch(states, "west=true") >= 0 ? 5 : 4;
patchlist[3] = Arrays.binarySearch(states, "east=true") >= 0 ? 7 : 6;
patchlist[4] = Arrays.binarySearch(states, "north=true") >= 0 ? 9 : 8;
patchlist[5] = Arrays.binarySearch(states, "south=true") >= 0 ? 11 : 10;
CustomRenderer.addBox(rpf, list, xmin, xmax, ymin, ymax, zmin, zmax, patchlist);
models[i] = list.toArray(new RenderPatch[patchlist.length]);
}
return true;
}
@Override
public int getMaximumTextureCount() {
return 12;
}
@Override
public RenderPatch[] getRenderPatchList(MapDataContext ctx) {
return models[ctx.getBlockType().stateIndex];
}
}

View File

@ -1,54 +0,0 @@
package org.dynmap.hdmap.renderer;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.Map;
import org.dynmap.renderer.CustomRenderer;
import org.dynmap.renderer.MapDataContext;
import org.dynmap.renderer.RenderPatch;
import org.dynmap.renderer.RenderPatchFactory;
/*
* Huge mushroom renderer for v1.13+
*/
public class MushroomStateRenderer extends CustomRenderer {
private static final int TEXTURE_OUTSIDE = 0;
private static final int TEXTURE_INSIDE = 1;
// Meshes, indexed by state index (bit5=down, bit4=east, bit3=north, bit2=south, bit1=up, bit0=west)
protected RenderPatch[][] meshes = new RenderPatch[64][];
@Override
public boolean initializeRenderer(RenderPatchFactory rpf, String blkname, BitSet blockdatamask, Map<String,String> custparm) {
if(!super.initializeRenderer(rpf, blkname, blockdatamask, custparm))
return false;
buildPatches(rpf);
return true;
}
private void buildPatches(RenderPatchFactory rpf) {
int[] faces = new int[6];
ArrayList<RenderPatch> list = new ArrayList<RenderPatch>();
for (int i = 0; i < 64; i++) {
list.clear();
faces[0] = ((i & 0x20) == 0) ? TEXTURE_OUTSIDE : TEXTURE_INSIDE; // Down
faces[1] = ((i & 0x02) == 0) ? TEXTURE_OUTSIDE : TEXTURE_INSIDE; // Up
faces[2] = ((i & 0x01) == 0) ? TEXTURE_OUTSIDE : TEXTURE_INSIDE; // West
faces[3] = ((i & 0x10) == 0) ? TEXTURE_OUTSIDE : TEXTURE_INSIDE; // East
faces[4] = ((i & 0x08) == 0) ? TEXTURE_OUTSIDE : TEXTURE_INSIDE; // North
faces[5] = ((i & 0x04) == 0) ? TEXTURE_OUTSIDE : TEXTURE_INSIDE; // North
CustomRenderer.addBox(rpf, list, 0, 1, 0, 1, 0, 1, faces);
meshes[i] = list.toArray(new RenderPatch[list.size()]);
}
}
@Override
public int getMaximumTextureCount() {
return 2;
}
@Override
public RenderPatch[] getRenderPatchList(MapDataContext ctx) {
return meshes[ctx.getBlockType().stateIndex];
}
}

View File

@ -509,14 +509,14 @@ class AreaMarkerImpl implements AreaMarker, EnterExitMarker {
bb.yp[i] = v2.y;
}
}
//System.out.println("x=" + bb.xmin + " - " + bb.xmax + ", y=" + bb.ymin + " - " + bb.ymax);
//Log.info("x=" + bb.xmin + " - " + bb.xmax + ", y=" + bb.ymin + " - " + bb.ymax);
bbc.put(perspective.getName(), bb);
bb_cache = bbc;
}
final double tile_x2 = tile_x + tile_dim;
final double tile_y2 = tile_y + tile_dim;
if ((bb.xmin > tile_x2) || (bb.xmax < tile_x) || (bb.ymin > tile_y2) || (bb.ymax < tile_y)) {
//System.out.println("tile: " + tile_x + " / " + tile_y + " - miss");
//Log.info("tile: " + tile_x + " / " + tile_y + " - miss");
return false;
}
final int cnt = bb.xp.length;
@ -546,7 +546,7 @@ class AreaMarkerImpl implements AreaMarker, EnterExitMarker {
// // Test for X=tile_x side
// if ((px[i] < tile_x) && (px[j] >= tile_x) && ()
// }
//System.out.println("tile: " + tile_x + " / " + tile_y + " - hit");
//Log.info("tile: " + tile_x + " / " + tile_y + " - hit");
return false;
}
@Override

View File

@ -428,14 +428,14 @@ class CircleMarkerImpl implements CircleMarker, EnterExitMarker {
bb.xp[i] = v2.x;
bb.yp[i] = v2.y;
}
//System.out.println("x=" + bb.xmin + " - " + bb.xmax + ", y=" + bb.ymin + " - " + bb.ymax);
//Log.info("x=" + bb.xmin + " - " + bb.xmax + ", y=" + bb.ymin + " - " + bb.ymax);
bbc.put(perspective.getName(), bb);
bb_cache = bbc;
}
final double tile_x2 = tile_x + tile_dim;
final double tile_y2 = tile_y + tile_dim;
if ((bb.xmin > tile_x2) || (bb.xmax < tile_x) || (bb.ymin > tile_y2) || (bb.ymax < tile_y)) {
//System.out.println("tile: " + tile_x + " / " + tile_y + " - miss");
//Log.info("tile: " + tile_x + " / " + tile_y + " - miss");
return false;
}
final int cnt = bb.xp.length;
@ -465,7 +465,7 @@ class CircleMarkerImpl implements CircleMarker, EnterExitMarker {
// // Test for X=tile_x side
// if ((px[i] < tile_x) && (px[j] >= tile_x) && ()
// }
//System.out.println("tile: " + tile_x + " / " + tile_y + " - hit");
//Log.info("tile: " + tile_x + " / " + tile_y + " - hit");
return false;
}
@Override

View File

@ -1307,7 +1307,8 @@ boxblock:id=conduit,xmin=0.3125,xmax=0.6875,ymin=0.3125,ymax=0.6875,zmin=0.3125,
# Red huge mushroom
# Brown huge mushroom
customblock:id=red_mushroom_block,id=brown_mushroom_block,class=org.dynmap.hdmap.renderer.MushroomStateRenderer
# Mushroom Stem
customblock:id=red_mushroom_block,id=brown_mushroom_block,id=mushroom_stem,class=org.dynmap.hdmap.renderer.BoxStateRenderer
# Banners
customblock:id=white_banner,id=orange_banner,id=magenta_banner,id=light_blue_banner,id=yellow_banner,id=lime_banner,id=pink_banner,id=gray_banner,id=light_gray_banner,id=cyan_banner,id=purple_banner,id=blue_banner,id=brown_banner,id=green_banner,id=red_banner,id=black_banner,data=0-15,class=org.dynmap.hdmap.renderer.CuboidRenderer,cuboid0=0.46:0:0.46/0.54:1.0:0.54/0:0:0:0:0:0,cuboid1=0:0.96:0.46/1.0:1.0:0.54/0:0:0:0:0:0,cuboid2=0:0.25:0.54/1.0:1.0:0.58/1:1:1:1:1:1,rotlist=0:22:45:68:90:112:135:158:180:202:225:248:270:292:315:338

View File

@ -1100,13 +1100,11 @@ block:id=cracked_stone_bricks,allfaces=0:cracked_stone_bricks,stdrot=true
block:id=chiseled_stone_bricks,allfaces=0:chiseled_stone_bricks,stdrot=true
# Brown Mushroom Block
block:id=brown_mushroom_block,patch0=0:brown_mushroom_block,patch1=0:mushroom_block_inside
block:id=brown_mushroom_block,patch1=0:brown_mushroom_block,patch0=0:mushroom_block_inside,patch3=0:brown_mushroom_block,patch2=0:mushroom_block_inside,patch5=0:brown_mushroom_block,patch4=0:mushroom_block_inside,patch7=0:brown_mushroom_block,patch6=0:mushroom_block_inside,patch9=0:brown_mushroom_block,patch8=0:mushroom_block_inside,patch11=0:brown_mushroom_block,patch10=0:mushroom_block_inside
# Red Mushroom Block
block:id=red_mushroom_block,patch0=0:red_mushroom_block,patch1=0:mushroom_block_inside
# Brown Mushroom Block - stem
# Red Mushroom Block - stem
block:id=mushroom_stem,topbottom=0:mushroom_block_inside,allsides=0:mushroom_stem,stdrot=true
block:id=red_mushroom_block,patch1=0:red_mushroom_block,patch0=0:mushroom_block_inside,patch3=0:red_mushroom_block,patch2=0:mushroom_block_inside,patch5=0:red_mushroom_block,patch4=0:mushroom_block_inside,patch7=0:red_mushroom_block,patch6=0:mushroom_block_inside,patch9=0:red_mushroom_block,patch8=0:mushroom_block_inside,patch11=0:red_mushroom_block,patch10=0:mushroom_block_inside
# Mushroom stem
block:id=mushroom_stem,patch1=0:mushroom_stem,patch0=0:mushroom_block_inside,patch3=0:mushroom_stem,patch2=0:mushroom_block_inside,patch5=0:mushroom_stem,patch4=0:mushroom_block_inside,patch7=0:mushroom_stem,patch6=0:mushroom_block_inside,patch9=0:mushroom_stem,patch8=0:mushroom_block_inside,patch11=0:mushroom_stem,patch10=0:mushroom_block_inside
# Iron fence
block:id=iron_bars,patch0-1=0:iron_bars,transparency=TRANSPARENT

View File

@ -27,7 +27,6 @@ public class MapChunkCache114_1 extends GenericMapChunkCache {
*/
public MapChunkCache114_1(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -27,7 +27,6 @@ public class MapChunkCache115 extends GenericMapChunkCache {
*/
public MapChunkCache115(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -27,7 +27,6 @@ public class MapChunkCache116_2 extends GenericMapChunkCache {
*/
public MapChunkCache116_2(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -27,7 +27,6 @@ public class MapChunkCache116_3 extends GenericMapChunkCache {
*/
public MapChunkCache116_3(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -23,7 +23,6 @@ public class MapChunkCache116_4 extends GenericMapChunkCache {
*/
public MapChunkCache116_4(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -27,7 +27,6 @@ public class MapChunkCache116 extends GenericMapChunkCache {
*/
public MapChunkCache116(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -265,21 +265,21 @@ public class BukkitVersionHelperSpigot117 extends BukkitVersionHelper {
@Override
public Object getUnloadQueue(World world) {
System.out.println("getUnloadQueue not implemented yet");
Log.warning("getUnloadQueue not implemented yet");
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isInUnloadQueue(Object unloadqueue, int x, int z) {
System.out.println("isInUnloadQueue not implemented yet");
Log.warning("isInUnloadQueue not implemented yet");
// TODO Auto-generated method stub
return false;
}
@Override
public Object[] getBiomeBaseFromSnapshot(ChunkSnapshot css) {
System.out.println("getBiomeBaseFromSnapshot not implemented yet");
Log.warning("getBiomeBaseFromSnapshot not implemented yet");
// TODO Auto-generated method stub
return new Object[256];
}

View File

@ -27,7 +27,6 @@ public class MapChunkCache117 extends GenericMapChunkCache {
*/
public MapChunkCache117(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -91,7 +91,7 @@ public class BukkitVersionHelperSpigot118 extends BukkitVersionHelper {
String bn = id.toString();
if (bn != null) {
names.add(bn);
System.out.println("block=" + bn);
Log.info("block=" + bn);
}
}
return names.toArray(new String[0]);
@ -294,21 +294,21 @@ public class BukkitVersionHelperSpigot118 extends BukkitVersionHelper {
@Override
public Object getUnloadQueue(World world) {
System.out.println("getUnloadQueue not implemented yet");
Log.warning("getUnloadQueue not implemented yet");
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isInUnloadQueue(Object unloadqueue, int x, int z) {
System.out.println("isInUnloadQueue not implemented yet");
Log.warning("isInUnloadQueue not implemented yet");
// TODO Auto-generated method stub
return false;
}
@Override
public Object[] getBiomeBaseFromSnapshot(ChunkSnapshot css) {
System.out.println("getBiomeBaseFromSnapshot not implemented yet");
Log.warning("getBiomeBaseFromSnapshot not implemented yet");
// TODO Auto-generated method stub
return new Object[256];
}

View File

@ -47,7 +47,6 @@ public class MapChunkCache118 extends GenericMapChunkCache {
*/
public MapChunkCache118(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -273,13 +273,13 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper {
try {
return field.get(obj);
} catch (IllegalArgumentException e) {
System.out.println(String.format("IllegalArgExc(%s,%s)", obj.toString(), field.toString()));
Log.warning(String.format("IllegalArgExc(%s,%s)", obj.toString(), field.toString()));
} catch (IllegalAccessException e) {
System.out.println(String.format("IllegalAccessExc(%s,%s)", obj.toString(), field.toString()));
Log.warning(String.format("IllegalAccessExc(%s,%s)", obj.toString(), field.toString()));
}
}
else {
System.out.println(String.format("NullArg(%s,%s)", (obj != null)?obj.toString():"null", (field != null)?field.toString():"null"));
Log.warning(String.format("NullArg(%s,%s)", (obj != null)?obj.toString():"null", (field != null)?field.toString():"null"));
}
return def;
}

View File

@ -170,7 +170,7 @@ public class ChunkSnapshot {
}
if (secnum < 0)
continue;
//System.out.println("section(" + secnum + ")=" + sec.asString());
//Log.info("section(" + secnum + ")=" + sec.asString());
// Create normal section to initialize
StdSection cursect = new StdSection();
this.section[secnum] = cursect;

View File

@ -170,7 +170,7 @@ public class ChunkSnapshot {
}
if (secnum < 0)
continue;
//System.out.println("section(" + secnum + ")=" + sec.asString());
//Log.info("section(" + secnum + ")=" + sec.asString());
// Create normal section to initialize
StdSection cursect = new StdSection();
this.section[secnum] = cursect;

View File

@ -447,7 +447,6 @@ public class DynmapPlugin {
core.setMinecraftVersion(mcver);
core.setDataFolder(dataDirectory);
core.setServer(fserver);
FabricMapChunkCache.init();
core.setTriggerDefault(TRIGGER_DEFAULTS);
core.setBiomeNames(getBiomeNames());

View File

@ -448,7 +448,6 @@ public class DynmapPlugin {
core.setMinecraftVersion(mcver);
core.setDataFolder(dataDirectory);
core.setServer(fserver);
FabricMapChunkCache.init();
core.setTriggerDefault(TRIGGER_DEFAULTS);
core.setBiomeNames(getBiomeNames());

View File

@ -418,7 +418,6 @@ public class DynmapPlugin {
core.setMinecraftVersion(mcver);
core.setDataFolder(dataDirectory);
core.setServer(fserver);
FabricMapChunkCache.init();
core.setTriggerDefault(TRIGGER_DEFAULTS);
core.setBiomeNames(getBiomeNames());

View File

@ -97,7 +97,7 @@ public class DynmapMod
ForgeChunkManager.setForcedChunkLoadingCallback(DynmapMod.instance, new LoadingCallback());
}
else {
System.out.println("[Dynmap] World loading using forced chunks is disabled");
Log.warning("[Dynmap] World loading using forced chunks is disabled");
}
}

View File

@ -97,7 +97,7 @@ public class DynmapMod
ForgeChunkManager.setForcedChunkLoadingCallback(DynmapMod.instance, new LoadingCallback());
}
else {
System.out.println("[Dynmap] World loading using forced chunks is disabled");
Log.warning("[Dynmap] World loading using forced chunks is disabled");
}
}

View File

@ -148,7 +148,7 @@ public class ChunkSnapshot
}
if (secnum < 0)
continue;
//System.out.println("section(" + secnum + ")=" + sec.asString());
//Log.info("section(" + secnum + ")=" + sec.asString());
// Create normal section to initialize
StdSection cursect = new StdSection();
this.section[secnum] = cursect;

View File

@ -104,7 +104,7 @@ public class DynmapMod
// ForgeChunkManager.setForcedChunkLoadingCallback(DynmapMod.instance, new LoadingCallback());
//}
//else {
// System.out.println("[Dynmap] World loading using forced chunks is disabled");
// Log.warning("[Dynmap] World loading using forced chunks is disabled");
//}
}

View File

@ -1465,7 +1465,7 @@ public class DynmapPlugin
private static int test(CommandSource source) throws CommandSyntaxException
{
System.out.println(source.toString());
Log.warning(source.toString());
return 1;
}

View File

@ -148,7 +148,7 @@ public class ChunkSnapshot
}
if (secnum < 0)
continue;
//System.out.println("section(" + secnum + ")=" + sec.asString());
//Log.info("section(" + secnum + ")=" + sec.asString());
// Create normal section to initialize
StdSection cursect = new StdSection();
this.section[secnum] = cursect;

View File

@ -104,7 +104,7 @@ public class DynmapMod
// ForgeChunkManager.setForcedChunkLoadingCallback(DynmapMod.instance, new LoadingCallback());
//}
//else {
// System.out.println("[Dynmap] World loading using forced chunks is disabled");
// Log.warning("[Dynmap] World loading using forced chunks is disabled");
//}
}

View File

@ -1491,7 +1491,7 @@ public class DynmapPlugin
private static int test(CommandSource source) throws CommandSyntaxException
{
System.out.println(source.toString());
Log.warning(source.toString());
return 1;
}

View File

@ -148,7 +148,7 @@ public class ChunkSnapshot
}
if (secnum < 0)
continue;
//System.out.println("section(" + secnum + ")=" + sec.asString());
//Log.info("section(" + secnum + ")=" + sec.asString());
// Create normal section to initialize
StdSection cursect = new StdSection();
this.section[secnum] = cursect;

View File

@ -105,7 +105,7 @@ public class DynmapMod
// ForgeChunkManager.setForcedChunkLoadingCallback(DynmapMod.instance, new LoadingCallback());
//}
//else {
// System.out.println("[Dynmap] World loading using forced chunks is disabled");
// Log.warning("[Dynmap] World loading using forced chunks is disabled");
//}
}

View File

@ -1491,7 +1491,7 @@ public class DynmapPlugin
private static int test(CommandSource source) throws CommandSyntaxException
{
System.out.println(source.toString());
Log.warning(source.toString());
return 1;
}

View File

@ -104,7 +104,7 @@ public class DynmapMod
// ForgeChunkManager.setForcedChunkLoadingCallback(DynmapMod.instance, new LoadingCallback());
//}
//else {
// System.out.println("[Dynmap] World loading using forced chunks is disabled");
// Log.warning("[Dynmap] World loading using forced chunks is disabled");
//}
}

View File

@ -1486,7 +1486,6 @@ public class DynmapPlugin
core.setMinecraftVersion(mcver);
core.setDataFolder(dataDirectory);
core.setServer(fserver);
ForgeMapChunkCache.init();
core.setTriggerDefault(TRIGGER_DEFAULTS);
core.setBiomeNames(getBiomeNames());
@ -1503,7 +1502,7 @@ public class DynmapPlugin
private static int test(CommandSource source) throws CommandSyntaxException
{
System.out.println(source.toString());
Log.warning(source.toString());
return 1;
}

View File

@ -28,7 +28,6 @@ public class ForgeMapChunkCache extends GenericMapChunkCache {
*/
public ForgeMapChunkCache(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -106,7 +106,7 @@ public class DynmapMod
// ForgeChunkManager.setForcedChunkLoadingCallback(DynmapMod.instance, new LoadingCallback());
//}
//else {
// System.out.println("[Dynmap] World loading using forced chunks is disabled");
// Log.warning("[Dynmap] World loading using forced chunks is disabled");
//}
}

View File

@ -1465,7 +1465,6 @@ public class DynmapPlugin
core.setMinecraftVersion(mcver);
core.setDataFolder(dataDirectory);
core.setServer(fserver);
ForgeMapChunkCache.init();
core.setTriggerDefault(TRIGGER_DEFAULTS);
core.setBiomeNames(getBiomeNames());
@ -1482,7 +1481,7 @@ public class DynmapPlugin
private static int test(CommandSource source) throws CommandSyntaxException
{
System.out.println(source.toString());
Log.warning(source.toString());
return 1;
}

View File

@ -28,7 +28,6 @@ public class ForgeMapChunkCache extends GenericMapChunkCache {
*/
public ForgeMapChunkCache(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk

View File

@ -106,7 +106,7 @@ public class DynmapMod
// ForgeChunkManager.setForcedChunkLoadingCallback(DynmapMod.instance, new LoadingCallback());
//}
//else {
// System.out.println("[Dynmap] World loading using forced chunks is disabled");
// Log.info("[Dynmap] World loading using forced chunks is disabled");
//}
}

View File

@ -1466,7 +1466,6 @@ public class DynmapPlugin
core.setMinecraftVersion(mcver);
core.setDataFolder(dataDirectory);
core.setServer(fserver);
ForgeMapChunkCache.init();
core.setTriggerDefault(TRIGGER_DEFAULTS);
core.setBiomeNames(getBiomeNames());
@ -1483,7 +1482,7 @@ public class DynmapPlugin
private static int test(CommandSource source) throws CommandSyntaxException
{
System.out.println(source.toString());
Log.warning(source.toString());
return 1;
}

View File

@ -28,7 +28,6 @@ public class ForgeMapChunkCache extends GenericMapChunkCache {
*/
public ForgeMapChunkCache(GenericChunkCache cc) {
super(cc);
init();
}
// Load generic chunk from existing and already loaded chunk