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