diff --git a/DynmapCore/src/main/java/org/dynmap/DynmapCore.java b/DynmapCore/src/main/java/org/dynmap/DynmapCore.java index dd127c6f..a7026aec 100644 --- a/DynmapCore/src/main/java/org/dynmap/DynmapCore.java +++ b/DynmapCore/src/main/java/org/dynmap/DynmapCore.java @@ -433,9 +433,6 @@ public class DynmapCore implements DynmapCommonAPI { defaultStorage.setLoginEnabled(this); } - /* Add options to avoid 0.29 re-render (fixes very inconsistent with previous maps) */ - HDMapManager.waterlightingfix = configuration.getBoolean("correct-water-lighting", false); - HDMapManager.biomeshadingfix = configuration.getBoolean("correct-biome-shading", false); /* Load control for leaf transparency (spout lighting bug workaround) */ transparentLeaves = configuration.getBoolean("transparent-leaves", true); /* Get default image format */ diff --git a/DynmapCore/src/main/java/org/dynmap/hdmap/HDBlockStateTextureMap.java b/DynmapCore/src/main/java/org/dynmap/hdmap/HDBlockStateTextureMap.java index 6f81e81b..f154ce32 100644 --- a/DynmapCore/src/main/java/org/dynmap/hdmap/HDBlockStateTextureMap.java +++ b/DynmapCore/src/main/java/org/dynmap/hdmap/HDBlockStateTextureMap.java @@ -51,7 +51,7 @@ public class HDBlockStateTextureMap { } // Shallow copy state from another state map - public HDBlockStateTextureMap(HDBlockStateTextureMap map) { + public HDBlockStateTextureMap(HDBlockStateTextureMap map, BlockTransparency bt) { this.faces = map.faces; this.layers = map.layers; this.blockset = map.blockset; @@ -59,7 +59,10 @@ public class HDBlockStateTextureMap { this.custColorMult = map.custColorMult; this.stdrotate = map.stdrotate; this.colorMapping = map.colorMapping; - this.trans = map.trans; + if (bt != null) + this.trans = bt; + else + this.trans = map.trans; } // Get texture index for given face @@ -143,7 +146,12 @@ public class HDBlockStateTextureMap { // Copy given block state to given state index public static void copyToStateIndex(DynmapBlockState blk, HDBlockStateTextureMap map) { resize(blk.globalStateIndex); - texmaps[blk.globalStateIndex] = new HDBlockStateTextureMap(map); + TexturePack.BlockTransparency trans = map.trans; + // Force waterloogged blocks to use SEMITRANSPARENT (same as water) + if ((trans == TexturePack.BlockTransparency.TRANSPARENT) && blk.isWaterlogged()) { + trans = TexturePack.BlockTransparency.SEMITRANSPARENT; + } + texmaps[blk.globalStateIndex] = new HDBlockStateTextureMap(map, trans); } // Copy textures from source block ID to destination public static void remapTexture(String dest, String src) { @@ -153,7 +161,7 @@ public class HDBlockStateTextureMap { for (int i = 0; i < mincnt; i++) { int didx = dblk.getState(i).globalStateIndex; int sidx = sblk.getState(i).globalStateIndex; - texmaps[didx] = new HDBlockStateTextureMap(texmaps[sidx]); + texmaps[didx] = new HDBlockStateTextureMap(texmaps[sidx], null); } } // Get by global state index diff --git a/DynmapCore/src/main/java/org/dynmap/hdmap/HDMapManager.java b/DynmapCore/src/main/java/org/dynmap/hdmap/HDMapManager.java index e51cdf35..d573871f 100644 --- a/DynmapCore/src/main/java/org/dynmap/hdmap/HDMapManager.java +++ b/DynmapCore/src/main/java/org/dynmap/hdmap/HDMapManager.java @@ -21,9 +21,6 @@ public class HDMapManager { public HashSet maps = new HashSet(); public HashMap> maps_by_world_perspective = new HashMap>(); - public static boolean waterlightingfix; - public static boolean biomeshadingfix; - public void loadHDShaders(DynmapCore core) { Log.verboseinfo("Loading shaders..."); /* Update mappings, if needed */ diff --git a/DynmapCore/src/main/java/org/dynmap/hdmap/TexturePack.java b/DynmapCore/src/main/java/org/dynmap/hdmap/TexturePack.java index 8ef6b0b6..f13433c4 100644 --- a/DynmapCore/src/main/java/org/dynmap/hdmap/TexturePack.java +++ b/DynmapCore/src/main/java/org/dynmap/hdmap/TexturePack.java @@ -188,24 +188,24 @@ public class TexturePack { private static final int TILEINDEX_SHULKER_COUNT = 6; /* Indexes of faces in the BED format tile file */ - private static final int TILEINDEX_BED_HEAD_TOP = 0; - private static final int TILEINDEX_BED_HEAD_BOTTOM = 1; - private static final int TILEINDEX_BED_HEAD_LEFT = 2; - private static final int TILEINDEX_BED_HEAD_RIGHT = 3; - private static final int TILEINDEX_BED_HEAD_END = 4; - private static final int TILEINDEX_BED_FOOT_TOP = 5; - private static final int TILEINDEX_BED_FOOT_BOTTOM = 6; - private static final int TILEINDEX_BED_FOOT_LEFT = 7; - private static final int TILEINDEX_BED_FOOT_RIGHT = 8; - private static final int TILEINDEX_BED_FOOT_END = 9; - private static final int TILEINDEX_BED_HEAD_LEFTLEG_1 = 10; - private static final int TILEINDEX_BED_HEAD_LEFTLEG_2 = 11; - private static final int TILEINDEX_BED_HEAD_RIGHTLEG_1 = 12; - private static final int TILEINDEX_BED_HEAD_RIGHTLEG_2 = 13; - private static final int TILEINDEX_BED_FOOT_LEFTLEG_1 = 14; - private static final int TILEINDEX_BED_FOOT_LEFTLEG_2 = 15; - private static final int TILEINDEX_BED_FOOT_RIGHTLEG_1 = 16; - private static final int TILEINDEX_BED_FOOT_RIGHTLEG_2 = 17; + //private static final int TILEINDEX_BED_HEAD_TOP = 0; + //private static final int TILEINDEX_BED_HEAD_BOTTOM = 1; + //private static final int TILEINDEX_BED_HEAD_LEFT = 2; + //private static final int TILEINDEX_BED_HEAD_RIGHT = 3; + //private static final int TILEINDEX_BED_HEAD_END = 4; + //private static final int TILEINDEX_BED_FOOT_TOP = 5; + //private static final int TILEINDEX_BED_FOOT_BOTTOM = 6; + //private static final int TILEINDEX_BED_FOOT_LEFT = 7; + //private static final int TILEINDEX_BED_FOOT_RIGHT = 8; + //private static final int TILEINDEX_BED_FOOT_END = 9; + //private static final int TILEINDEX_BED_HEAD_LEFTLEG_1 = 10; + //private static final int TILEINDEX_BED_HEAD_LEFTLEG_2 = 11; + //private static final int TILEINDEX_BED_HEAD_RIGHTLEG_1 = 12; + //private static final int TILEINDEX_BED_HEAD_RIGHTLEG_2 = 13; + //private static final int TILEINDEX_BED_FOOT_LEFTLEG_1 = 14; + //private static final int TILEINDEX_BED_FOOT_LEFTLEG_2 = 15; + //private static final int TILEINDEX_BED_FOOT_RIGHTLEG_1 = 16; + //private static final int TILEINDEX_BED_FOOT_RIGHTLEG_2 = 17; private static final int TILEINDEX_BED_COUNT = 18; public static enum TileFileFormat { @@ -421,7 +421,6 @@ public class TexturePack { private int colorMultBirch = 0x80a755; /* From ColorizerFoliage.java in MCP */ private int colorMultPine = 0x619961; /* From ColorizerFoliage.java in MCP */ private int colorMultLily = 0x208030; /* from BlockLilyPad.java in MCP */ - private int colorMultWater = 0xFFFFFF; private static final int IMG_GRASSCOLOR = 0; private static final int IMG_FOLIAGECOLOR = 1; @@ -2103,10 +2102,6 @@ public class TexturePack { else trans = BlockTransparency.OPAQUE; } - /* If no water lighting fix */ - if((blknames.contains(DynmapBlockState.WATER_BLOCK) || blknames.contains(DynmapBlockState.FLOWING_WATER_BLOCK)) && (HDMapManager.waterlightingfix == false)) { - trans = BlockTransparency.TRANSPARENT; /* Treat water as transparent if no fix */ - } } else if(av[0].equals("colorMult")) { colorMult = (int)Long.parseLong(av[1], 16); @@ -2211,10 +2206,6 @@ public class TexturePack { else trans = BlockTransparency.OPAQUE; } - /* If no water lighting fix */ - if((blknames.contains(DynmapBlockState.WATER_BLOCK) || blknames.contains(DynmapBlockState.FLOWING_WATER_BLOCK)) && (HDMapManager.waterlightingfix == false)) { - trans = BlockTransparency.TRANSPARENT; /* Treat water as transparent if no fix */ - } } } /* If we have everything, build block */ @@ -2336,10 +2327,6 @@ public class TexturePack { else trans = BlockTransparency.OPAQUE; } - /* If no water lighting fix */ - if((blknames.contains(DynmapBlockState.WATER_BLOCK) || blknames.contains(DynmapBlockState.FLOWING_WATER_BLOCK)) && (HDMapManager.waterlightingfix == false)) { - trans = BlockTransparency.TRANSPARENT; /* Treat water as transparent if no fix */ - } } else if(av[0].equals("colorMult")) { colorMult = Integer.valueOf(av[1], 16); diff --git a/DynmapCore/src/main/java/org/dynmap/hdmap/renderer/FenceWallBlockStateRenderer.java b/DynmapCore/src/main/java/org/dynmap/hdmap/renderer/FenceWallBlockStateRenderer.java index d718b52b..7d9bd188 100644 --- a/DynmapCore/src/main/java/org/dynmap/hdmap/renderer/FenceWallBlockStateRenderer.java +++ b/DynmapCore/src/main/java/org/dynmap/hdmap/renderer/FenceWallBlockStateRenderer.java @@ -5,10 +5,7 @@ import java.util.BitSet; import java.util.List; import java.util.Map; -import org.dynmap.hdmap.HDBlockStateTextureMap; -import org.dynmap.hdmap.TexturePack.BlockTransparency; 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; diff --git a/DynmapCore/src/main/resources/texture_1.txt b/DynmapCore/src/main/resources/texture_1.txt index dd4ad715..6731b2d0 100644 --- a/DynmapCore/src/main/resources/texture_1.txt +++ b/DynmapCore/src/main/resources/texture_1.txt @@ -1997,10 +1997,10 @@ texture:id=sea_pickle texture:id=conduit # Kelp -block:id=kelp,patch0-1=1000:kelp,stdrot=true,transparency=TRANSPARENT +block:id=kelp,patch0-1=1000:kelp,transparency=TRANSPARENT # Kelp plant -block:id=kelp_plant,patch0-1=1000:kelp_plant,stdrot=true,transparency=TRANSPARENT +block:id=kelp_plant,patch0-1=1000:kelp_plant,transparency=TRANSPARENT # Dried kelp block block:id=dried_kelp_block,allsides=0:dried_kelp_side,top=0:dried_kelp_top,bottom=0:dried_kelp_bottom,stdrot=true