mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-23 18:55:14 +01:00
Workaround for mods with broken block state logic...
This commit is contained in:
parent
b85a159bda
commit
effec684b9
@ -271,7 +271,10 @@ public class DynmapPlugin
|
||||
}
|
||||
statename += p.getName() + "=" + bs.get(p).toString();
|
||||
}
|
||||
int lightAtten = bs.isOpaqueCube(EmptyBlockReader.INSTANCE, BlockPos.ZERO) ? 15 : (bs.propagatesSkylightDown(EmptyBlockReader.INSTANCE, BlockPos.ZERO) ? 0 : 1);
|
||||
int lightAtten = 15;
|
||||
try { // Workaround for mods with broken block state logic...
|
||||
lightAtten = bs.isOpaqueCube(EmptyBlockReader.INSTANCE, BlockPos.ZERO) ? 15 : (bs.propagatesSkylightDown(EmptyBlockReader.INSTANCE, BlockPos.ZERO) ? 0 : 1);
|
||||
} catch (Exception x) {}
|
||||
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
|
||||
// Fill in base attributes
|
||||
bld.setBaseState(basebs).setStateIndex(idx - baseidx).setBlockName(bn).setStateName(statename).setMaterial(mat.toString()).setLegacyBlockID(idx).setAttenuatesLight(lightAtten);
|
||||
|
@ -248,7 +248,10 @@ public class DynmapPlugin
|
||||
}
|
||||
statename += p.getName() + "=" + bs.getValue(p).toString();
|
||||
}
|
||||
int lightAtten = bs.isSolidRender(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 15 : (bs.propagatesSkylightDown(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 0 : 1);
|
||||
int lightAtten = 15;
|
||||
try { // Workaround for mods with broken block state logic...
|
||||
lightAtten = bs.isSolidRender(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 15 : (bs.propagatesSkylightDown(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 0 : 1);
|
||||
} catch (Exception x) {}
|
||||
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
|
||||
// Fill in base attributes
|
||||
bld.setBaseState(basebs).setStateIndex(idx - baseidx).setBlockName(bn).setStateName(statename).setMaterial(mat.toString()).setLegacyBlockID(idx).setAttenuatesLight(lightAtten);
|
||||
|
@ -248,7 +248,11 @@ public class DynmapPlugin
|
||||
}
|
||||
statename += p.getName() + "=" + bs.getValue(p).toString();
|
||||
}
|
||||
int lightAtten = bs.isSolidRender(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 15 : (bs.propagatesSkylightDown(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 0 : 1);
|
||||
int lightAtten = 15;
|
||||
try { // Workaround for mods with broken block state logic...
|
||||
lightAtten =bs.isSolidRender(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 15 : (bs.propagatesSkylightDown(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 0 : 1);
|
||||
} catch (Exception x) {
|
||||
}
|
||||
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
|
||||
// Fill in base attributes
|
||||
bld.setBaseState(basebs).setStateIndex(idx - baseidx).setBlockName(bn).setStateName(statename).setMaterial(mat.toString()).setLegacyBlockID(idx).setAttenuatesLight(lightAtten);
|
||||
|
Loading…
Reference in New Issue
Block a user