owmii / Lollipop

A library mod for Owmii's mods.
GNU Lesser General Public License v3.0
3 stars 11 forks source link

Fix sky check always true at or above sea level and ignoring liquids #12

Closed BlueAgent closed 3 years ago

BlueAgent commented 3 years ago

Because when the starting blockpos was sea level, if the y pos was at or above sea level, the check was always succeeding. Also it seemed to be ignoring liquids.

I think this was because the check was based off IWorldReader#canBlockSeeSky which is used for guardian spawn checking when the one intended is IBlockDisplayReader#canSeeSky so switched to using that and added some documentation for how to use the method.

Feel free to close this and switch to using canSeeSky directly. I think this utility method is only used in Powah's Solars atm. Let me know if this is desired and I can update the related PR in Powah too.

owmii commented 3 years ago

Thanks!!