(hh chatComponent, int id, int currentUpdateCounter, boolean refresh)
| 162 | } |
| 163 | |
| 164 | private void setChatLine(hh chatComponent, int id, int currentUpdateCounter, boolean refresh) { |
| 165 | if (!refresh && MinecraftFactory.getClassProxyCallback().isShowTimeBeforeChatMessage()) { |
| 166 | chatComponent = (hh) MinecraftFactory.getClassProxyCallback().getChatComponentWithTime(chatComponent); |
| 167 | } |
| 168 | if (id != 0) { |
| 169 | this.deleteChatLine(id); |
| 170 | } |
| 171 | |
| 172 | int lineWidth = rk.d((float) this.getChatWidth() / this.getChatScale()); |
| 173 | List<hh> lines = bjc.a(chatComponent, lineWidth, ((Variables) MinecraftFactory.getVars()).getFontrenderer(), false, false); |
| 174 | boolean var6 = this.isChatOpened(); |
| 175 | |
| 176 | hh lineString; |
| 177 | for (Iterator<hh> iterator = lines.iterator(); iterator.hasNext(); this.singleChatLines.add(0, new GuiChatLine(currentUpdateCounter, lineString, id))) { |
| 178 | lineString = iterator.next(); |
| 179 | if (var6 && this.scrollPos > 0) { |
| 180 | this.isScrolled = true; |
| 181 | this.scroll(1); |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | while (this.singleChatLines.size() > MinecraftFactory.getClassProxyCallback().getMaxChatLines()) { |
| 186 | this.singleChatLines.remove(this.singleChatLines.size() - 1); |
| 187 | } |
| 188 | |
| 189 | if (!refresh) { |
| 190 | this.chatLines.add(0, new GuiChatLine(currentUpdateCounter, chatComponent, id)); |
| 191 | |
| 192 | while (this.chatLines.size() > MinecraftFactory.getClassProxyCallback().getMaxChatLines()) { |
| 193 | this.chatLines.remove(this.chatLines.size() - 1); |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | } |
| 198 | |
| 199 | @Override |
| 200 | public void clear() { |
no test coverage detected