mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-25 01:57:53 +01:00
Fix redstone in hideores=true
This commit is contained in:
parent
df43618354
commit
b741bb522d
@ -84,19 +84,19 @@ public class HDBlockModels {
|
||||
private static void remapModel(String bn, String newbn) {
|
||||
DynmapBlockState frombs = DynmapBlockState.getBaseStateByName(bn);
|
||||
DynmapBlockState tobs = DynmapBlockState.getBaseStateByName(bn);
|
||||
int minstate = Math.min(frombs.getStateCount(), tobs.getStateCount());
|
||||
for (int bs = 0; bs < minstate; bs++) {
|
||||
DynmapBlockState fb = frombs.getState(bs);
|
||||
int fcnt = frombs.getStateCount();
|
||||
for (int bs = 0; bs < tobs.getStateCount(); bs++) {
|
||||
DynmapBlockState tb = tobs.getState(bs);
|
||||
HDBlockModel m = models_by_id_data.get(fb.globalStateIndex);
|
||||
DynmapBlockState fs = tobs.getState(bs % fcnt);
|
||||
HDBlockModel m = models_by_id_data.get(fs.globalStateIndex);
|
||||
if (m != null) {
|
||||
models_by_id_data.put(tb.globalStateIndex, m);
|
||||
}
|
||||
else {
|
||||
models_by_id_data.remove(tb.globalStateIndex);
|
||||
}
|
||||
customModelsRequestingTileData.set(tb.globalStateIndex, customModelsRequestingTileData.get(fb.globalStateIndex));
|
||||
changeIgnoredBlocks.set(tb.globalStateIndex, changeIgnoredBlocks.get(fb.globalStateIndex));
|
||||
customModelsRequestingTileData.set(tb.globalStateIndex, customModelsRequestingTileData.get(fs.globalStateIndex));
|
||||
changeIgnoredBlocks.set(tb.globalStateIndex, changeIgnoredBlocks.get(fs.globalStateIndex));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,10 +157,10 @@ public class HDBlockStateTextureMap {
|
||||
public static void remapTexture(String dest, String src) {
|
||||
DynmapBlockState dblk = DynmapBlockState.getBaseStateByName(dest);
|
||||
DynmapBlockState sblk = DynmapBlockState.getBaseStateByName(src);
|
||||
int mincnt = Math.min(dblk.getStateCount(), sblk.getStateCount());
|
||||
for (int i = 0; i < mincnt; i++) {
|
||||
int scnt = sblk.getStateCount();
|
||||
for (int i = 0; i < dblk.getStateCount(); i++) {
|
||||
int didx = dblk.getState(i).globalStateIndex;
|
||||
int sidx = sblk.getState(i).globalStateIndex;
|
||||
int sidx = sblk.getState(i % scnt).globalStateIndex;
|
||||
texmaps[didx] = new HDBlockStateTextureMap(texmaps[sidx], null);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user