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