added setting to disable robot label rendering, in case it annoys people

This commit is contained in:
Florian Nücke 2014-03-09 20:48:29 +01:00
parent cbdb4f19ad
commit 09342e9f08
4 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,7 @@
# explicitly named using an anvil.
# If your name is on this list and you'd rather it not be, or you'd like a
# different alias, sorry! Please make a pull request with the changed list.
asie
crafteverywhere
LordFokas
Michiyo

View File

@ -54,6 +54,9 @@ opencomputers {
# attached to it). For valid key names, please see the following list:
# https://github.com/LWJGL/lwjgl/blob/master/src/java/org/lwjgl/input/Keyboard.java#L73
pasteShortcut: [LSHIFT, INSERT]
# Render robots' names as a label above them when near them
robotLabels: true
}
# Computer related settings, concerns server performance and security.

View File

@ -25,6 +25,7 @@ class Settings(config: Config) {
val textLinearFiltering = config.getBoolean("client.textLinearFiltering")
val textAntiAlias = config.getBoolean("client.textAntiAlias")
val pasteShortcut = config.getStringList("client.pasteShortcut").toSet
val robotLabels = config.getBoolean("client.robotLabels")
val rTreeDebugRenderer = false // *Not* to be configurable via config file.
// ----------------------------------------------------------------------- //

View File

@ -1,7 +1,7 @@
package li.cil.oc.client.renderer.tileentity
import java.util.logging.Level
import li.cil.oc.OpenComputers
import li.cil.oc.{Settings, OpenComputers}
import li.cil.oc.client.TexturePreloader
import li.cil.oc.common.tileentity
import li.cil.oc.util.RenderState
@ -176,7 +176,7 @@ object RobotRenderer extends TileEntitySpecialRenderer {
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5)
val name = robot.name
if (name != null && x * x + y * y + z * z < RendererLivingEntity.NAME_TAG_RANGE) {
if (Settings.get.robotLabels && name != null && x * x + y * y + z * z < RendererLivingEntity.NAME_TAG_RANGE) {
GL11.glPushMatrix()
// This is pretty much copy-pasta from the entity's label renderer.