diff --git a/models.txt b/models.txt index 7047f174..6f1c3b44 100644 --- a/models.txt +++ b/models.txt @@ -820,4 +820,197 @@ rotate:id=63,data=15,rot=180 # Signpost - facing south-southeast block:id=63,data=11,scale=16 rotate:id=63,data=15,rot=270 - +# Rose +block:id=38,data=*,scale=8 +layer:0,2 +-------- +-------- +-------- +---*---- +-------- +-------- +-------- +-------- +layer:1,3 +-------- +-------- +-------- +-------- +----*--- +-------- +-------- +-------- +layer:4,5 +-------- +-------- +-------- +---**--- +---**--- +-------- +-------- +-------- +# Dandelion +block:id=37,data=*,scale=8 +layer:0,2 +-------- +-------- +---*---- +---*---- +--*-*--- +-------- +-------- +-------- +layer:1,3 +-------- +-------- +-------- +-------- +----*--- +-------- +-------- +-------- +layer:4,5 +-------- +-------- +--*-*--- +---*---- +--*-*--- +-------- +-------- +-------- +# Brown Mushroom +# Red Mushroom +block:id=39,id=40,data=*,scale=8 +layer:0,1,2 +-------- +-------- +-------- +---**--- +---**--- +-------- +-------- +-------- +layer:3 +-------- +-------- +---**--- +--****-- +--****-- +---**--- +-------- +-------- +layer:4 +-------- +-------- +-------- +---**--- +---**--- +-------- +-------- +-------- +# Dead shrubs +block:id=32,data=*,scale=8 +layer:0 +-------- +-------- +-------- +---**--- +---**--- +-------- +-------- +-------- +layer:1 +-------- +-------- +---*---- +---**--- +---***-- +--*----- +-------- +-------- +layer:2 +-------- +---*---- +-------- +--***--- +---**-*- +----*--- +-*------ +-------- +layer:3 +-------- +---*---- +-------- +-*-**--- +---**-*- +-------- +-*---*-- +-------- +layer:4 +-------- +-------- +---*---- +----*--- +---*---- +----*--- +-------- +-------- +# Dead schrub (tall grass) +block:id=31,data=0,scale=8 +rotate:id=32,data=0,rot=0 +# Fire +block:id=51,data=*,scale=8 +layer:0 +******** +******** +******** +******** +******** +******** +******** +******** +layer:1 +-**--**- +******** +******** +-**--**- +-**--**- +******** +******** +-**--**- +layer:2 +-------- +-**--**- +-**--**- +-------- +-------- +-**--**- +-**--**- +-------- +layer:3 +-------- +----**-- +-**-**-- +-**----- +-----**- +--**-**- +--**---- +-------- +layer:4 +-------- +--*----- +--*--**- +-------- +-------- +-**--*-- +-----*-- +-------- +layer:5 +-------- +-------- +--*--*-- +-------- +-------- +--*--*-- +-------- +-------- diff --git a/src/main/java/org/dynmap/ColorScheme.java b/src/main/java/org/dynmap/ColorScheme.java index 2e94c280..0216560e 100644 --- a/src/main/java/org/dynmap/ColorScheme.java +++ b/src/main/java/org/dynmap/ColorScheme.java @@ -132,7 +132,7 @@ public class ColorScheme { c[1] = new Color(Integer.parseInt(split[9]), Integer.parseInt(split[10]), Integer.parseInt(split[11]), Integer.parseInt(split[12])); c[2] = new Color(Integer.parseInt(split[13]), Integer.parseInt(split[14]), Integer.parseInt(split[15]), Integer.parseInt(split[16])); /* Blended color - for 'smooth' option on flat map */ - c[4] = new Color((c[0].getRed()+c[2].getRed())/2, (c[0].getGreen()+c[2].getGreen())/2, (c[0].getBlue()+c[2].getBlue())/2, (c[0].getAlpha()+c[2].getAlpha())/2); + c[4] = new Color((c[1].getRed()+c[3].getRed())/2, (c[1].getGreen()+c[3].getGreen())/2, (c[1].getBlue()+c[3].getBlue())/2, (c[1].getAlpha()+c[3].getAlpha())/2); if(isbiome) { if(istemp) { diff --git a/src/main/java/org/dynmap/hdmap/DefaultHDShader.java b/src/main/java/org/dynmap/hdmap/DefaultHDShader.java index 690fad02..784b3ad8 100644 --- a/src/main/java/org/dynmap/hdmap/DefaultHDShader.java +++ b/src/main/java/org/dynmap/hdmap/DefaultHDShader.java @@ -142,18 +142,21 @@ public class DefaultHDShader implements HDShader { if (colors != null) { int seq; + int subalpha = ps.getSubmodelAlpha(); /* Figure out which color to use */ switch(ps.getLastBlockStep()) { case X_PLUS: case X_MINUS: - seq = 0; + seq = 2; break; case Z_PLUS: case Z_MINUS: - seq = 2; + seq = 0; break; default: - if(((pixelodd + mapiter.getY()) & 0x03) == 0) + if(subalpha >= 0) /* We hit a block in a model */ + seq = 4; /* Use smooth top */ + else if(((pixelodd + mapiter.getY()) & 0x03) == 0) seq = 3; else seq = 1; @@ -164,10 +167,9 @@ public class DefaultHDShader implements HDShader { /* Handle light level, if needed */ lighting.applyLighting(ps, this, c, tmpcolor); /* If we got alpha from subblock model, use it instead */ - int subalpha = ps.getSubmodelAlpha(); if(subalpha >= 0) { for(Color clr : tmpcolor) - clr.setAlpha(subalpha); + clr.setAlpha(Math.max(subalpha,clr.getAlpha())); } /* Blend color with accumulated color (weighted by alpha) */ if(!transparency) { /* No transparency support */