{"action":"created","issue":{"url":"https://api.github.com/repos/squeek502/TiC-Tooltips/issues/47","labels_url":"https://api.github.com/repos/squeek502/TiC-Tooltips/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/squeek502/TiC-Tooltips/issues/47/comments","events_url":"https://api.github.com/repos/squeek502/TiC-Tooltips/issues/47/events","html_url":"https://github.com/squeek502/TiC-Tooltips/issues/47","id":93468355,"number":47,"title":"Support ExtraTiC custom names (-_-)","user":{"login":"Adaptivity","id":1560181,"avatar_url":"https://avatars.githubusercontent.com/u/1560181?v=3","gravatar_id":"","url":"https://api.github.com/users/Adaptivity","html_url":"https://github.com/Adaptivity","followers_url":"https://api.github.com/users/Adaptivity/followers","following_url":"https://api.github.com/users/Adaptivity/following{/other_user}","gists_url":"https://api.github.com/users/Adaptivity/gists{/gist_id}","starred_url":"https://api.github.com/users/Adaptivity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adaptivity/subscriptions","organizations_url":"https://api.github.com/users/Adaptivity/orgs","repos_url":"https://api.github.com/users/Adaptivity/repos","events_url":"https://api.github.com/users/Adaptivity/events{/privacy}","received_events_url":"https://api.github.com/users/Adaptivity/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-07T08:14:32Z","updated_at":"2015-07-07T17:25:26Z","closed_at":"2015-07-07T17:25:26Z","body":"And again I with my localization problems. @squeek502 ExtraTiC uses [part.partname.materialname template](https://github.com/Glassmaker/ExtraTiC-Localization/blob/master/en_US.lang#L443) for its localization but that seems TiC Tooltips looking for [toolpart.partname.materialname template](https://github.com/SlimeKnights/TinkersConstruct/blob/master/resources/assets/tinker/lang/en_US.lang#L637) from Tinkers Construct and can't find ExtaTiC's one because they are different. Is it a thing that you can fix on your side or I'm again wasting your time?"},"comment":{"url":"https://api.github.com/repos/squeek502/TiC-Tooltips/issues/comments/119275379","html_url":"https://github.com/squeek502/TiC-Tooltips/issues/47#issuecomment-119275379","issue_url":"https://api.github.com/repos/squeek502/TiC-Tooltips/issues/47","id":119275379,"user":{"login":"squeek502","id":2389051,"avatar_url":"https://avatars.githubusercontent.com/u/2389051?v=3","gravatar_id":"","url":"https://api.github.com/users/squeek502","html_url":"https://github.com/squeek502","followers_url":"https://api.github.com/users/squeek502/followers","following_url":"https://api.github.com/users/squeek502/following{/other_user}","gists_url":"https://api.github.com/users/squeek502/gists{/gist_id}","starred_url":"https://api.github.com/users/squeek502/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squeek502/subscriptions","organizations_url":"https://api.github.com/users/squeek502/orgs","repos_url":"https://api.github.com/users/squeek502/repos","events_url":"https://api.github.com/users/squeek502/events{/privacy}","received_events_url":"https://api.github.com/users/squeek502/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T17:25:26Z","updated_at":"2015-07-07T17:25:26Z","body":"Okay, yeah that's on ExtraTiC's side. All I do is [call itemStack.getDisplayName()](https://github.com/squeek502/TiC-Tooltips/blob/1.7.10/java/squeek/tictooltips/TooltipHandler.java#L883).\r\n\r\nExtraTiC implements its own part class with its own getItemStackDisplayName/getUnlocalizedName methods. From decompiling ExtraTiC:\r\n```\r\n  // this is getUnlocalizedName\r\n  public String func_77667_c(ItemStack itemStack)\r\n  {\r\n    int damageValue = itemStack.func_77960_j();\r\n    if (this.unlocalizedMaterialNames.containsKey(Integer.valueOf(damageValue))) {\r\n      return \"item.\" + (String)this.unlocalizedMaterialNames.get(Integer.valueOf(damageValue)) + \".\" + this.unlocalizedPartName;\r\n    }\r\n    return func_77658_a();\r\n  }\r\n\r\n  // this is getItemStackDisplayName\r\n  public String func_77653_i(ItemStack itemStack)\r\n  {\r\n    int damageValue = itemStack.func_77960_j();\r\n    String displayName;\r\n    String displayName;\r\n    if (this.unlocalizedMaterialNames.containsKey(Integer.valueOf(damageValue)))\r\n    {\r\n      String unlocalizedMaterialName = (String)this.unlocalizedMaterialNames.get(Integer.valueOf(damageValue));\r\n      \r\n      String unlocalizedSpecific = \"part.\" + this.unlocalizedPartName + \".\" + unlocalizedMaterialName;\r\n      if (StatCollector.func_94522_b(unlocalizedSpecific))\r\n      {\r\n        String localizedSpecific = StatCollector.func_74838_a(unlocalizedSpecific);\r\n        return localizedSpecific;\r\n      }\r\n      String unlocalizedGeneral = \"part.material.\" + unlocalizedMaterialName;\r\n      if ((StatCollector.func_94522_b(\"part.\" + this.unlocalizedPartName)) && (StatCollector.func_94522_b(unlocalizedGeneral)))\r\n      {\r\n        String localizedPartName = StatCollector.func_74838_a(\"part.\" + this.unlocalizedPartName);\r\n        \r\n\r\n        String localizedGeneralMaterial = StatCollector.func_74838_a(unlocalizedGeneral);\r\n        \r\n        return localizedPartName.replaceAll(\"@material@\", localizedGeneralMaterial);\r\n      }\r\n      String displayName;\r\n      if ((StatCollector.func_94522_b(\"part.\" + this.unlocalizedPartName)) && (StatCollector.func_94522_b(\"material.\" + unlocalizedMaterialName)))\r\n      {\r\n        String localizedPartName = StatCollector.func_74838_a(\"part.\" + this.unlocalizedPartName);\r\n        \r\n\r\n        String localizedMaterialName = StatCollector.func_74838_a(\"material.\" + unlocalizedMaterialName);\r\n        \r\n\r\n        displayName = localizedPartName.replaceAll(\"@material@\", localizedMaterialName);\r\n      }\r\n      else\r\n      {\r\n        displayName = func_77667_c(itemStack) + \".name\";\r\n      }\r\n    }\r\n    else\r\n    {\r\n      displayName = func_77658_a() + \".name\";\r\n    }\r\n    return displayName;\r\n  }\r\n```"}}