Getting sundamage below Extra Utilities Glass
Twisted-Code opened this issue ยท 7 comments
Versions
- Minecraft: 1.10.2
- Forge: build 2185
- SPONGEFORGE: spongeforge-1.10.2-2281-5.2.0-BETA-2353.jar
- Vampirism: 1.1.2
Issue Description
specifically, when blocks are arranged as shown in the screenshots below, I take sun damage but neither the yellow overlay shows nor am I touching anywhere that's receiving direct sunlight. I would think my player was touching the direct sunlight landing on the wall with one corner of his head, but I know for a fact the player isn't even 2 blocks high, so the top of his head is below the level the sunlight is reaching. what the buck...?
Reproduce Steps
Additional Information
This issue was moved by @maxanier to TeamLapen/VampirismIntegrations/issues/8.
update after a little more testing: it appears the culprit here is the darkened ineffable glass you see in the ceiling (most visibly so in the first screenshot). I haven't tested the exact reason yet, but I hypothesize that it might be allowing direct sunlight through, which would make this a bug that is PARTIALLY on Extra Utilities 2's side of the fence. I say partially because I am taking sun damage without the yellow "sun glare" overlay showing, which is a bug on your side regardless of all else
okay at least found a temporary solution. It seems it was in fact the darkened glass. light level from sky is 15 under the darkened glass, according to the F3 debug overlay. I'll open an issue on EU2's repository and cross-link it with this one. Feel free to help explain in more technical terms why this should be fixed. In layman's terms (or as close to such as I can get), see-through material that blocks some light should block all types of light and not just light from certain sources.
My temporary solution:
Vampirism is using (above block level 63) World#canSeeSky to detect if an entity can receive sundamage. [I don't want to write a custom one, because the vanilla one is cached and calculated anyway]
Problem is, this check decides based on Block#getLightOpacity==0 if a block is see-through. Apparently EU glass as well as vanillas stained glass has a light opacity of 0 so it is treated as completely see-through.
Maybe @rwtema could consider setting the opacity to 3 (like water or ice), this would solve this problem. Not sure if it would cause any new ones.
@macks2008 The sundamage position calculation was a little bit off, that probably caused your first issue. Is fixed bc60c15
@maxanier you mean the overlay not showing? Well if that was fixed, at least people won't suddenly start taking damage out of nowhere. Surely there is at least a duct tape solution here, like maybe explicitly excluding the offending blocks from the set of blocks that allow sun damage. I don't know. Might cause more harm than good, especially if you forget to remove the "duct tape" after the underlying problem is solved