mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-09 23:38:04 -04:00
the y value passed to render methods changed in 1.10 to ref feet instead of eyes
this breaks our screen render check when the player is standing just below the y value of text on the screen, but should still be able to see the text. closes #3252
This commit is contained in:
parent
2e33be4b5a
commit
21c67ce31d
@ -51,10 +51,14 @@ object ScreenRenderer extends TileEntitySpecialRenderer[Screen] {
|
||||
return
|
||||
}
|
||||
|
||||
// y = block.bottom - player.feet
|
||||
// eye is higher, so the y delta should be more negative
|
||||
val eye_delta: Double = y - Minecraft.getMinecraft.thePlayer.getEyeHeight
|
||||
|
||||
// Crude check whether screen text can be seen by the local player based
|
||||
// on the player's position -> angle relative to screen.
|
||||
val screenFacing = screen.facing.getOpposite
|
||||
if (screenFacing.getFrontOffsetX * (x + 0.5) + screenFacing.getFrontOffsetY * (y + 0.5) + screenFacing.getFrontOffsetZ * (z + 0.5) < 0) {
|
||||
if (screenFacing.getFrontOffsetX * (x + 0.5) + screenFacing.getFrontOffsetY * (eye_delta + 0.5) + screenFacing.getFrontOffsetZ * (z + 0.5) < 0) {
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user