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