CptSpaceToaster / CptsModdingLight

Do What The F*ck You Want To Public License
38 stars 15 forks source link

Check casting to ChunkCache #30

Closed planetguy32 closed 9 years ago

planetguy32 commented 9 years ago

This code assumed that every IBlockAccess is either a World or a ChunkCache. StarMiner has a "DummyRotatedBlockAccess" that's a separate implementation of IBlockAccess, and when this code tries to run on it it crashes. This returns a default value of 0 when neither known IBlockAccess type is applicable, presumably causing minor visual weirdness with mods that have custom IBlockAccesses, but not crashing the game.

CptSpaceToaster commented 9 years ago

Thank you for the PR

Have a nice day!