mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 11:15:21 +01:00
More fluid model fixes
This commit is contained in:
parent
ff54f1abe0
commit
ae35d5b6aa
@ -2717,8 +2717,9 @@ public class TexturePack {
|
|||||||
|
|
||||||
/* If clear-inside op, get out early */
|
/* If clear-inside op, get out early */
|
||||||
if((textop == COLORMOD_CLEARINSIDE) || (textop == COLORMOD_MULTTONED_CLEARINSIDE)) {
|
if((textop == COLORMOD_CLEARINSIDE) || (textop == COLORMOD_MULTTONED_CLEARINSIDE)) {
|
||||||
|
DynmapBlockState lasthit = ss.getLastBlockHit(); // Last surface hit, vs last visited
|
||||||
/* Check if previous block is same block type as we are: surface is transparent if it is */
|
/* Check if previous block is same block type as we are: surface is transparent if it is */
|
||||||
if ((blk.matchingBaseState(lastblocktype) || (blk.isWaterFilled() && lastblocktype.isWaterFilled())) && ps.isOnFace()) {
|
if (blk.matchingBaseState(lasthit) || ((blk.isWaterFilled() && lasthit.isWaterFilled()) && ps.isOnFace())) {
|
||||||
rslt.setTransparent();
|
rslt.setTransparent();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,7 @@ public class TexturePackHDShader implements HDShader {
|
|||||||
final private TexturePack scaledtp;
|
final private TexturePack scaledtp;
|
||||||
final private HDLighting lighting;
|
final private HDLighting lighting;
|
||||||
protected DynmapBlockState lastblk;
|
protected DynmapBlockState lastblk;
|
||||||
|
protected DynmapBlockState lastblkhit;
|
||||||
final boolean do_biome_shading;
|
final boolean do_biome_shading;
|
||||||
final boolean do_better_grass;
|
final boolean do_better_grass;
|
||||||
DynLongHashMap ctm_cache;
|
DynLongHashMap ctm_cache;
|
||||||
@ -173,6 +174,7 @@ public class TexturePackHDShader implements HDShader {
|
|||||||
for(int i = 0; i < color.length; i++)
|
for(int i = 0; i < color.length; i++)
|
||||||
color[i].setTransparent();
|
color[i].setTransparent();
|
||||||
setLastBlockState(DynmapBlockState.AIR);
|
setLastBlockState(DynmapBlockState.AIR);
|
||||||
|
lastblkhit = DynmapBlockState.AIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -186,6 +188,7 @@ public class TexturePackHDShader implements HDShader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (blocktype.isAir()) {
|
if (blocktype.isAir()) {
|
||||||
|
lastblkhit = blocktype;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,6 +198,7 @@ public class TexturePackHDShader implements HDShader {
|
|||||||
if (scaledtp != null) {
|
if (scaledtp != null) {
|
||||||
scaledtp.readColor(ps, mapiter, c, blocktype, lastblocktype, ShaderState.this);
|
scaledtp.readColor(ps, mapiter, c, blocktype, lastblocktype, ShaderState.this);
|
||||||
}
|
}
|
||||||
|
lastblkhit = blocktype;
|
||||||
|
|
||||||
if (c.getAlpha() > 0) {
|
if (c.getAlpha() > 0) {
|
||||||
/* Scale brightness depending upon face */
|
/* Scale brightness depending upon face */
|
||||||
@ -318,6 +322,10 @@ public class TexturePackHDShader implements HDShader {
|
|||||||
public void setLastBlockState(DynmapBlockState new_lastbs) {
|
public void setLastBlockState(DynmapBlockState new_lastbs) {
|
||||||
lastblk = new_lastbs;
|
lastblk = new_lastbs;
|
||||||
}
|
}
|
||||||
|
// Return last blockc with surface hit
|
||||||
|
public DynmapBlockState getLastBlockHit() {
|
||||||
|
return lastblkhit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user