MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / scroll

Method scroll

Minecraft-Utils/1.13/src/Gui2ndChat.java:235–248  ·  view source on GitHub ↗
(int scroll)

Source from the content-addressed store, hash-verified

233 }
234
235 @Override
236 public void scroll(int scroll) {
237 this.scrollPos += scroll;
238 int chatLines = this.singleChatLines.size();
239 if (this.scrollPos > chatLines - this.getLineCount()) {
240 this.scrollPos = chatLines - this.getLineCount();
241 }
242
243 if (this.scrollPos <= 0) {
244 this.scrollPos = 0;
245 this.isScrolled = false;
246 }
247
248 }
249
250 @Override
251 public void drawComponentHover(int mouseX, int mouseY) {

Callers 2

setChatLineMethod · 0.95
keyTypedMethod · 0.95

Calls 2

getLineCountMethod · 0.95
sizeMethod · 0.80

Tested by

no test coverage detected