mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 03:05:28 +01:00
Log warning for block states with lighting lookup error
This commit is contained in:
parent
1f1b5ab09f
commit
7df857e7f3
@ -274,7 +274,9 @@ public class DynmapPlugin
|
|||||||
int lightAtten = 15;
|
int lightAtten = 15;
|
||||||
try { // Workaround for mods with broken block state logic...
|
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);
|
lightAtten = bs.isOpaqueCube(EmptyBlockReader.INSTANCE, BlockPos.ZERO) ? 15 : (bs.propagatesSkylightDown(EmptyBlockReader.INSTANCE, BlockPos.ZERO) ? 0 : 1);
|
||||||
} catch (Exception x) {}
|
} catch (Exception x) {
|
||||||
|
Log.warning(String.format("Exception while checking lighting data for block state: %s[%s]", bn, statename));
|
||||||
|
}
|
||||||
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
|
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
|
||||||
// Fill in base attributes
|
// Fill in base attributes
|
||||||
bld.setBaseState(basebs).setStateIndex(idx - baseidx).setBlockName(bn).setStateName(statename).setMaterial(mat.toString()).setLegacyBlockID(idx).setAttenuatesLight(lightAtten);
|
bld.setBaseState(basebs).setStateIndex(idx - baseidx).setBlockName(bn).setStateName(statename).setMaterial(mat.toString()).setLegacyBlockID(idx).setAttenuatesLight(lightAtten);
|
||||||
|
@ -251,7 +251,9 @@ public class DynmapPlugin
|
|||||||
int lightAtten = 15;
|
int lightAtten = 15;
|
||||||
try { // Workaround for mods with broken block state logic...
|
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);
|
lightAtten = bs.isSolidRender(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 15 : (bs.propagatesSkylightDown(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 0 : 1);
|
||||||
} catch (Exception x) {}
|
} catch (Exception x) {
|
||||||
|
Log.warning(String.format("Exception while checking lighting data for block state: %s[%s]", bn, statename));
|
||||||
|
}
|
||||||
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
|
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
|
||||||
// Fill in base attributes
|
// Fill in base attributes
|
||||||
bld.setBaseState(basebs).setStateIndex(idx - baseidx).setBlockName(bn).setStateName(statename).setMaterial(mat.toString()).setLegacyBlockID(idx).setAttenuatesLight(lightAtten);
|
bld.setBaseState(basebs).setStateIndex(idx - baseidx).setBlockName(bn).setStateName(statename).setMaterial(mat.toString()).setLegacyBlockID(idx).setAttenuatesLight(lightAtten);
|
||||||
|
@ -252,6 +252,7 @@ public class DynmapPlugin
|
|||||||
try { // Workaround for mods with broken block state logic...
|
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);
|
lightAtten =bs.isSolidRender(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 15 : (bs.propagatesSkylightDown(EmptyBlockGetter.INSTANCE, BlockPos.ZERO) ? 0 : 1);
|
||||||
} catch (Exception x) {
|
} catch (Exception x) {
|
||||||
|
Log.warning(String.format("Exception while checking lighting data for block state: %s[%s]", bn, statename));
|
||||||
}
|
}
|
||||||
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
|
//Log.info("statename=" + bn + "[" + statename + "], lightAtten=" + lightAtten);
|
||||||
// Fill in base attributes
|
// Fill in base attributes
|
||||||
|
Loading…
Reference in New Issue
Block a user