mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-12 02:40:56 +01:00
Fix incorrect transparency handling on copyblock: texture handling
This commit is contained in:
parent
1be9f663c7
commit
24bb87d635
@ -97,7 +97,7 @@ public class HDBlockStateTextureMap {
|
||||
if ((this.blockset != null) && (this.blockset.equals("core") == false)) {
|
||||
HDBlockModels.resetIfNotBlockSet(bs, this.blockset);
|
||||
}
|
||||
copyToStateIndex(bs, this);
|
||||
copyToStateIndex(bs, this, null);
|
||||
}
|
||||
}
|
||||
else { // Else, loop over all state IDs for given block
|
||||
@ -110,7 +110,7 @@ public class HDBlockStateTextureMap {
|
||||
if ((this.blockset != null) && (this.blockset.equals("core") == false)) {
|
||||
HDBlockModels.resetIfNotBlockSet(bs, this.blockset);
|
||||
}
|
||||
copyToStateIndex(bs, this);
|
||||
copyToStateIndex(bs, this, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -144,9 +144,11 @@ public class HDBlockStateTextureMap {
|
||||
return m;
|
||||
}
|
||||
// Copy given block state to given state index
|
||||
public static void copyToStateIndex(DynmapBlockState blk, HDBlockStateTextureMap map) {
|
||||
public static void copyToStateIndex(DynmapBlockState blk, HDBlockStateTextureMap map, TexturePack.BlockTransparency trans) {
|
||||
resize(blk.globalStateIndex);
|
||||
TexturePack.BlockTransparency trans = map.trans;
|
||||
if (trans == null) {
|
||||
trans = map.trans;
|
||||
}
|
||||
// Force waterloogged blocks to use SEMITRANSPARENT (same as water)
|
||||
if ((trans == TexturePack.BlockTransparency.TRANSPARENT) && blk.isWaterlogged()) {
|
||||
trans = TexturePack.BlockTransparency.SEMITRANSPARENT;
|
||||
|
@ -2222,13 +2222,13 @@ public class TexturePack {
|
||||
if (stateids == null) {
|
||||
for (int sid = 0; sid < dblk.getStateCount(); sid++) {
|
||||
DynmapBlockState dblk2 = dblk.getState(sid);
|
||||
HDBlockStateTextureMap.copyToStateIndex(dblk2, map);
|
||||
HDBlockStateTextureMap.copyToStateIndex(dblk2, map, trans);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (int stateid = stateids.nextSetBit(0); stateid >= 0; stateid = stateids.nextSetBit(stateid+1)) {
|
||||
DynmapBlockState dblk2 = dblk.getState(stateid);
|
||||
HDBlockStateTextureMap.copyToStateIndex(dblk2, map);
|
||||
HDBlockStateTextureMap.copyToStateIndex(dblk2, map, trans);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user