diff --git a/src/main/resources/assets/opencomputers/robot.names b/src/main/resources/assets/opencomputers/robot.names index e58b7df0a..df50afa62 100644 --- a/src/main/resources/assets/opencomputers/robot.names +++ b/src/main/resources/assets/opencomputers/robot.names @@ -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 diff --git a/src/main/resources/reference.conf b/src/main/resources/reference.conf index 06994c155..817aec199 100644 --- a/src/main/resources/reference.conf +++ b/src/main/resources/reference.conf @@ -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. diff --git a/src/main/scala/li/cil/oc/Settings.scala b/src/main/scala/li/cil/oc/Settings.scala index 65f946d73..c3a9da1dd 100644 --- a/src/main/scala/li/cil/oc/Settings.scala +++ b/src/main/scala/li/cil/oc/Settings.scala @@ -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. // ----------------------------------------------------------------------- // diff --git a/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala b/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala index e605bceaf..f1ebb2a6b 100644 --- a/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala +++ b/src/main/scala/li/cil/oc/client/renderer/tileentity/RobotRenderer.scala @@ -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.