package defpackage; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import net.minecraft.client.gui.GuiGraphicsExtractor; import net.minecraft.client.model.geom.builders.UVPair; import net.minecraft.util.Mth; import org.joml.Matrix3x2fStack; import org.lwjgl.glfw.GLFW; public class yc extends api { private static final float CURSOR_ANCHOR_HALF = 6.0F; private static final float STAGGER_STEP = 0.12F; private static final float CONTENT_EDGE_FADE = 30.0F; private static final float CONTENT_FADE_RAMP = 60.0F; private static final int MAX_STAGGER_STEPS = 6; private static final float FOOTER_DOT_SIZE = 3.5F; private static final arq RADIUS_FOOTER_DOT = asj.pill(3.5F); private static final float FOOTER_SEPARATOR_HEIGHT = 7.0F; private static final String FOOTER_ACTIVE_SUFFIX = " active"; private static final String FOOTER_THEME_TOOLTIP_PREFIX = "Active theme: "; private static final String FOOTER_ACTIVE_TOOLTIP_SUFFIX = " modules enabled across every category"; private static final String FOOTER_BUILD_TOOLTIP = "Client name, version and build channel"; private static final String RESIZE_GRIP_TOOLTIP = "Drag to resize the window"; private static final int FOOTER_SLOT_THEME = 0; private static final int FOOTER_SLOT_ACTIVE = 1; private static final int FOOTER_SLOT_BUILD = 2; private static final float CORNER_ARC_INSET_FACTOR = 0.2929F; private static final float RESIZE_GRIP_CORE_RADIUS = 2.4F; private static final float RESIZE_GRIP_GRAB_GROWTH = 1.8F; private static final float RESIZE_GRIP_HALO_OUTER = 2.2F; private static final float RESIZE_GRIP_HALO_INNER = 1.0F; private static final float RESIZE_GRIP_HALO_BASE_ALPHA = 0.35F; private static final float RESIZE_GRIP_HALO_GRAB_ALPHA = 0.35F; private static final float RESIZE_GRIP_HIT_PAD = 5.0F; private static final float RESIZE_GRIP_OVERHANG = 5.0F; private static final float RESIZE_GRIP_MIN_ALPHA = 0.01F; private static final double RESIZE_GRIP_PULSE_PERIOD = 320.0; private static final float RESIZE_GRIP_PULSE_DEPTH = 0.3F; private static final long RESIZE_SOUND_INTERVAL_MS = 120L; private static final String EMPTY_SEARCH_TITLE = "Nothing found"; private static final String EMPTY_SEARCH_HINT = "Try another module name"; private static final String EMPTY_CATEGORY_TITLE = "Nothing here yet"; private static final String EMPTY_CATEGORY_HINT = "This category has no modules"; private final xv layout = new xv(); private rl selectedCategory = rl.COMBAT; private rl realSelectedCategory = rl.COMBAT; private float boxX; private float boxY; private float targetBoxX; private float targetBoxY; private ct boxXAnim; private ct boxYAnim; private int columns = 2; private float boxWidth; private float boxHeight; private boolean dragging; private float dragOffsetX; private float dragOffsetY; private boolean resizing; private float resizeAnchorScreenX; private float resizeAnchorScreenY; private float resizeGrabOffsetX; private float resizeGrabOffsetY; private long lastResizeSoundTime; private final ct resizeGripAnim = asa.spring(); private final ct resizeGrabAnim = ct.transform(ob.FAST, 0.0F); private final ct sidebarAnimation = ct.layout(ob.SLOW, 1.0F); private boolean isSidebarExpanded = (boolean)(((1)) != 0); private final cu openTransition = new cu(yb.DEFAULT.getRole().baseMillis(), yb.DEFAULT.getEasing(), 0.0F); private boolean initialized; private long openTime; private arn searchField; private final arl scrollHandler = new arl(); private final zx pointerIntent = new zx(); private boolean closing = (boolean)(((0)) != 0); private aam sidebarPanel; private aak headerPanel; private final aah cosmeticsPanel = new aah(); private final aaj friendsPanel = new aaj(); private final aat waypointsPanel = new aat(); private final aas ticketsPanel = new aas(); private rl ticketsReturnCategory = rl.COMBAT; private final yk appearancePanel = new yk(); private int knownPoolVersion = -1; private int knownThemeVersion = -1; private float scaledScissorX = 0.0F; private float scaledScissorY = 0.0F; private float scaledScissorEndX = 2000.0F; private float scaledScissorEndY = 2000.0F; private boolean inputScaleFrozen = (boolean)(((0)) != 0); private float frozenInputScale = 1.0F; private final ct animationColums; private final ct blurAnimation = ct.layout(ob.MEDIUM, 0.0F); private final ct animationChangeCategory; private final ark scrollBar = new ark((boolean)((((-1546540504 | 1546540505) + (-1546540504 & 1546540505))) != 0)); private final aau sidePreview = new aau(); private final ct[] footerHover; private String cachedFooterThemeName; private String cachedFooterThemeTooltip; private int cachedFooterActive; private String cachedFooterActiveTooltip; private boolean categoryJustChanged; private float categoryChangeOffset; private Set popupSettings; private aay hoveredSetting; private aay lastFrameHoveredSetting; private long lastManualScrollTime; private static final float WINDOW_ACCENT_GLOW_SOFTNESS = 9.0F; private static final float WINDOW_ACCENT_GLOW_ALPHA = 0.2F; List modules; private List cachedVisibleModules; private String lastSearch; private rl lastCategory; private static arq RADIUS_WINDOW() { return asj.all(oc.WINDOW); } public Set getPopupSettings() { return this.popupSettings; } public void setHoveredSetting(aay var1) { this.lastFrameHoveredSetting = var1; } public yc() { ct[] var10001 = new ct[3]; var10001[0] = asa.spring(); var10001[1] = asa.spring(); var10001[2] = asa.spring(); this.footerHover = var10001; this.cachedFooterThemeName = ""; this.cachedFooterThemeTooltip = ""; this.cachedFooterActive = -1; this.cachedFooterActiveTooltip = ""; this.categoryJustChanged = (boolean)(((0)) != 0); this.categoryChangeOffset = 0.0F; this.popupSettings = new HashSet<>(); this.modules = new ArrayList<>(); this.cachedVisibleModules = new ArrayList<>(); this.lastSearch = null; this.lastCategory = null; this.animationColums = ct.layout(ob.SLOW, this.columns == 3? 1.0F : 0.0F); this.animationChangeCategory = ct.layout(ob.FAST, 1.0F); } public void initialize() { this.modules.addAll(bz.getInstance().getModuleManager().getModules().stream().map(aab::new).toList()); this.refreshThemes(); this.modules.add(new aaa()); this.refreshConfigs(); } private void refreshThemes() { List var1 = null; Iterator var2 = null; mv var3 = null; int var4 = 0; Iterator var5 = null; zu var6 = null; aae var7 = null; int var8 = 1629176927; while (true) { switch (var8) { case -2104596517: if (var2.hasNext()) { var8 = 1711633173; } else { var8 = -282468991; } break; case -1773774181: this.modules.add(new aae(var3)); var8 = -859026804; break; case -1125760842: var7 = (aae)var6; if (var7.getTheme() == var3) { var8 = 123913646; } else { var8 = -1120239588; } break; case -1120239588: var8 = 483525990; break; case -859026804: var8 = -2104596517; break; case -595745510: var6 = (zu)var5.next(); if (var6 instanceof aae) { var8 = -1125760842; } else { var8 = -1120239588; } break; case -282468991: this.knownThemeVersion = bz.getInstance().getThemeManager().version(); this.lastSearch = null; return; case 123913646: var4 = 1; var8 = 1397950867; break; case 483525990: if (var5.hasNext()) { var8 = -595745510; } else { var8 = 1397950867; } break; case 1397950867: if (var4 == 0) { var8 = -1773774181; } else { var8 = -859026804; } break; case 1629176927: default: var1 = bz.getInstance().getThemeManager().getThemes(); final List var1f = var1; this.modules.removeIf(var1x -> { aae var2x = null; int var4x = 0; int var3x = -1985115269; while (true) { switch (var3x) { case -1985115269: default: if (var1x instanceof aae) { var3x = 1874733119; } else { var3x = 1245967796; } break; case 356639278: return (boolean)((var4x) != 0); case 1205756249: var4x = 1; var3x = 356639278; break; case 1245967796: var4x = 0; var3x = 356639278; break; case 1874733119: var2x = (aae)var1x; if (!var1f.contains(var2x.getTheme())) { var3x = 1205756249; } else { var3x = 1245967796; } } } }); var2 = var1.iterator(); var8 = -2104596517; break; case 1711633173: var3 = (mv)var2.next(); var4 = 0; var5 = this.modules.iterator(); var8 = 483525990; } } } public void refreshConfigs() { Iterator var1 = null; String var2 = null; int var3 = 60509920; while (true) { switch (var3) { case -1189150361: amu var5 = (amu)var1.next(); this.modules.add(new aac(var5)); var3 = 1163579104; break; case 60509920: default: this.modules.removeIf(var0 -> { int var2x = 0; int var1x = 969174265; while (true) { switch (var1x) { case -1113605229: return (boolean)((var2x) != 0); case -924248849: var2x = 1; var1x = -1113605229; break; case 969174265: default: if (!(var0 instanceof zz)) { var1x = 1399728244; } else { var1x = -924248849; } break; case 1399728244: if (var0 instanceof aac) { var1x = -924248849; } else { var1x = 1817612441; } break; case 1817612441: var2x = 0; var1x = -1113605229; } } }); var1 = bz.getInstance().getConfigManager().configNames().iterator(); var3 = 271278612; break; case 161632403: var1 = amv.pool().iterator(); var3 = 1163579104; break; case 271278612: if (var1.hasNext()) { var3 = 2001956665; } else { var3 = 161632403; } break; case 442359480: this.knownPoolVersion = amv.poolVersion(); this.lastSearch = null; return; case 1163579104: if (var1.hasNext()) { var3 = -1189150361; } else { var3 = 442359480; } break; case 2001956665: var2 = (String)var1.next(); this.modules .add(new zz(var2.replace("." + "Evolution".toLowerCase(), ""))); var3 = 271278612; } } } protected void init() { this.openTime = System.currentTimeMillis(); this.sidePreview.reset(); this.pointerIntent.reset(); this.categoryJustChanged = (boolean)(((1)) != 0); this.categoryChangeOffset = 300.0F; this.cosmeticsPanel.onCategoryOpened(this.categoryChangeOffset); this.appearancePanel.onCategoryOpened(this.categoryChangeOffset); this.closing = (boolean)(((0)) != 0); if (bz.getInstance().getSoundManager() != null) { bz.getInstance().getSoundManager().playOpen(); } this.animationColums.jumpTo(this.columns == 3? 1.0F : 0.0F); this.layout.resolveSize(this.animationColums.value()); this.boxWidth = this.layout.getWindowWidth(); this.boxHeight = this.layout.getWindowHeight(); if (this.boxXAnim == null) { this.targetBoxX = (this.width - this.boxWidth) / 2.0F; this.targetBoxY = (this.height - this.boxHeight) / 2.0F; this.boxXAnim = ct.transform(ob.SETTLED, this.targetBoxX); this.boxYAnim = ct.transform(ob.SETTLED, this.targetBoxY); this.boxX = this.targetBoxX; this.boxY = this.targetBoxY; } this.layout.resolvePlacement(this.boxX, this.boxY, this.isSidebarExpanded ? 1.0F : 0.0F, this.headerRightReserve()); this.syncOpenTransition(); this.openTransition.jumpTo(0.0F); this.openTransition.update(1.0F); if (!this.initialized) { this.searchField = new arn( new UVPair(this.layout.getHeaderX(), this.layout.getHeaderY()), gl.MEDIUM.getFont(7.0F), "Search", 100.0F ); this.sidebarPanel = new aam(this.sidebarAnimation, this.isSidebarExpanded, this::selectCategory); this.headerPanel = new aak( this.searchField, () -> this.columns = this.columns % 4, () -> bz.getInstance().getThemeManager().switchTheme(), () -> { this.isSidebarExpanded = (boolean)(((!this.isSidebarExpanded ? 1: (-1590966918 | 1590966918) + (-1590966918 & 1590966918))) != 0); this.sidebarAnimation.animateTo(this.isSidebarExpanded ? 1.0F : 0.0F); }, this::toggleTickets ); } this.initialized = (boolean)(((1)) != 0); } public boolean selectCategory(rl var1) { if (this.realSelectedCategory == var1) { return (boolean)(((0)) != 0); } if (this.realSelectedCategory == rl.APPEARANCE && this.appearancePanel.guardLeave(() -> this.selectCategory(var1))) { return (boolean)(((0)) != 0); } this.animationChangeCategory.jumpTo(0.0F); this.headerPanel.resetAnim(this.realSelectedCategory, var1); this.categoryChangeOffset = var1.ordinal() > this.realSelectedCategory.ordinal() ? 300.0F : -300.0F; this.cosmeticsPanel.onCategoryOpened(this.categoryChangeOffset); this.appearancePanel.onCategoryOpened(this.categoryChangeOffset); this.waypointsPanel.onCategoryOpened(this.categoryChangeOffset); if (this.realSelectedCategory == rl.FRIENDS) { this.friendsPanel.onClosed(); } if (this.realSelectedCategory == rl.WAYPOINTS) { this.waypointsPanel.onClosed(); } if (this.realSelectedCategory == rl.TICKETS) { this.ticketsPanel.onClosed(); } if (var1 == rl.TICKETS) { this.ticketsPanel.onCategoryOpened(); } if (var1 == rl.CONFIGS) { amv.refreshPool(null); } this.realSelectedCategory = var1; this.scrollHandler.setTargetValue(0.0); this.searchField.setSelectAll((boolean)((((1625021306 | -1625021305) + (1625021306 & -1625021305))) != 0)); this.searchField.setText(""); return (boolean)(((1)) != 0); } private void toggleTickets() { int var1 = -1045636749; while (true) { switch (var1) { case -1045636749: default: if (this.realSelectedCategory == rl.TICKETS) { var1 = -334591582; } else { var1 = 1645904192; } break; case -334591582: this.selectCategory(this.ticketsReturnCategory); return; case 1645904192: this.ticketsReturnCategory = this.realSelectedCategory; this.selectCategory(rl.TICKETS); return; } } } @Override public void tick() { int var1 = -1158272669; while (true) { switch (var1) { case -1158272669: default: if (this.closing) { var1 = -106772694; } else { var1 = 1252642062; } break; case -106772694: if (this.openTransition.value() == 0.0F) { var1 = 1460321367; } else { var1 = 1252642062; } break; case 1252642062: super.tick(); return; case 1460321367: this.onClose(); var1 = 1252642062; } } } public boolean shouldCloseOnEsc() { return (boolean)(((0)) != 0); } @Override public boolean showsHudOverlays() { return (boolean)(((1)) != 0); } public void removed() { int var1 = -72105470; while (true) { switch (var1) { case -1650910183: bz.getInstance().getSoundManager().playClose(); var1 = -1182143890; break; case -1182143890: super.removed(); return; case -72105470: default: yd.abort(); this.closing = (boolean)(((1)) != 0); if (bz.getInstance().getSoundManager() != null) { var1 = -1650910183; } else { var1 = -1182143890; } } } } public void focusCategory(rl var1) { int var2 = -1383035917; while (true) { switch (var2) { case -1383035917: default: if (var1 == null) { var2 = 1012836773; } else { var2 = 1813767290; } break; case -872245350: return; case 495199402: this.searchField.setSelected((boolean)((((421118970 ^ -421118970) + ((421118970 & -421118970) << 1))) != 0)); this.searchField.setSelectAll((boolean)((((372801110 | -372801110) + (372801110 & -372801110))) != 0)); this.searchField.setText(""); this.searchField.setCursor((1356599310 ^ -1356599310) + ((1356599310 & -1356599310) << 1)); var2 = -872245350; break; case 1012836773: return; case 1813767290: this.selectedCategory = var1; this.realSelectedCategory = var1; this.scrollHandler.setTargetValue(0.0); if (this.searchField != null) { var2 = 495199402; } else { var2 = -872245350; } } } } public void focusModule(rm var1) { int var2 = -1388083603; while (true) { switch (var2) { case -1752119590: this.focusCategory(var1.getCategory()); if (this.searchField == null) { var2 = -556828694; } else { var2 = -494190858; } break; case -1388083603: default: if (var1 == null) { var2 = -623768017; } else { var2 = -1752119590; } break; case -623768017: return; case -556828694: return; case -494190858: this.searchField.setText(var1.getName()); this.searchField.setCursor(var1.getName().length()); this.searchField.setSelectAll((boolean)((((-1942056995 | 1942056996) + (-1942056995 & 1942056996))) != 0)); return; } } } public void openFriendChat(String var1) { this.selectedCategory = rl.FRIENDS; this.realSelectedCategory = rl.FRIENDS; this.scrollHandler.setTargetValue(0.0); this.friendsPanel.openChatWith(var1); } public void extractBackground(GuiGraphicsExtractor var1, int var2, int var3, float var4) { } public boolean isFinish() { int var2 = 0; int var1 = 624562400; while (true) { switch (var1) { case -1709929504: var2 = 0; var1 = 1220749508; break; case -239313518: var2 = 1; var1 = 1220749508; break; case 624562400: default: if (this.openTransition.isDone()) { var1 = 1964710239; } else { var1 = -1709929504; } break; case 1220749508: return (boolean)((var2) != 0); case 1964710239: if (this.closing) { var1 = -239313518; } else { var1 = -1709929504; } } } } private yb syncOpenTransition() { yb var1 = vm.INSTANCE.getMenuOpenEffect(); this.openTransition.retime(var1.durationMillis(), var1.getEasing()); return var1; } public void renderTop(asq var1, float var2, float var3) { if (this.initialized) { this.releaseStaleInputScale(); float var4 = (float)this.toLocalX(var2); float var5 = (float)this.toLocalY(var3); this.pointerIntent.track(var2, var3, var5, System.currentTimeMillis()); zu.beginLayoutFrame(); ass.beginFrame(); this.animationColums.update(this.columns == 3 ? 1.0F : 0.0F); float var6 = this.boxWidth; float var7 = this.boxHeight; this.layout.resolveSize(this.animationColums.value()); this.boxWidth = this.layout.getWindowWidth(); this.boxHeight = this.layout.getWindowHeight(); if (!this.dragging) { this.targetBoxX = this.targetBoxX - (this.boxWidth - var6) / 2.0F; this.targetBoxY = this.targetBoxY - (this.boxHeight - var7) / 2.0F; } this.clampTargetBox(this.menuScale()); this.boxXAnim.animateTo(this.targetBoxX); this.boxYAnim.animateTo(this.targetBoxY); this.boxX = this.boxXAnim.update(); this.boxY = this.boxYAnim.update(); this.sidePreview.update(); this.sidePreview.beginFrame(); yb var8 = this.syncOpenTransition(); float var9 = this.openTransition.update(this.closing ? 0.0F : 1.0F); float var10 = Mth.clamp(var8.alpha(var9), 0.0F, 1.0F); float var11 = this.sidebarAnimation.update(); this.layout.resolvePlacement(this.boxX, this.boxY, var11, this.headerRightReserve()); float var12 = var8.scaleX(var9); float var13 = var8.scaleY(var9); float var14 = var8.offsetY(var9); mv var15 = bz.getInstance().getThemeManager().getCurrentTheme(); Matrix3x2fStack var16 = var1.pose(); var1.pushMatrix(); float var17 = this.menuScale(); float var18 = this.width / 2.0F; float var19 = this.height / 2.0F; var16.translate(var18, var19); var16.scale(var17, var17); var16.translate(-var18, -var19); float var20 = this.boxX + this.boxWidth / 2.0F; float var21 = this.boxY + this.boxHeight / 2.0F; var16.translate(0.0F, var14); var16.translate(var20, var21); var16.scale(var12, var13); var16.translate(-var20, -var21); float var22 = arx.progress(); boolean var23 = vm.INSTANCE.isBlur(); this.blurAnimation.animateTo(var23 ? 1.0F : 0.0F); float var24 = this.blurAnimation.update() * (1.0F - var22); asu var25 = var15.getColor().mulAlpha(var10); asu var26 = var15.getBackgroundColor().mulAlpha(var10 * 4.0F); asu var27 = var15.getBackgroundColor().withAlpha(var10 * 0.72F); asu var28 = var26.mix(var27, var24); asu var29 = var15.getWhite().mulAlpha(var10); asu var30 = var15.getWhite().mulAlpha(var10); if (var24 > 0.0F) { atb.drawBlurHudBooleanCheck( var1.pose(), this.boxX, this.boxY, this.boxWidth, this.boxHeight, 20.0F, asj.all(oc.WINDOW), asu.WHITE.mulAlpha(var10 * var24), true ); atb.drawRoundedRect( var1.pose(), this.boxX, this.boxY, this.boxWidth, this.boxHeight, asj.all(oc.WINDOW), var15.getForegroundLight().mulAlpha(0.2F * var24 * var10) ); } atb.drawShadow( var16, this.boxX, this.boxY, this.boxWidth, this.boxHeight, pk.shadowSoftness(nz.OVERLAY), RADIUS_WINDOW(), asu.BLACK.withAlpha(var10 * pk.shadowAlpha(nz.OVERLAY)) ); boolean var31 = var15.getBackdrop().isActive(); asu var32 = var31 ? var15.getMiddleColor() : var15.getColor(); atb.drawShadow( var16, this.boxX, this.boxY, this.boxWidth, this.boxHeight, 9.0F * pk.shadowSoftScale(), RADIUS_WINDOW(), var32.mulAlpha(var10 * 0.2F * pk.shadowAlphaScale()) ); var1.drawSurface(aso.WINDOW, this.boxX, this.boxY, this.boxWidth, this.boxHeight, RADIUS_WINDOW(), var28.getRGB()); atb.drawThemeBackdrop( var16, this.boxX, this.boxY, this.boxWidth, this.boxHeight, RADIUS_WINDOW(), var15.getBackdrop(), var15.getAccent(), var10 * (1.0F - var22) ); if (var31) { atb.drawRoundedBorder( var16, this.boxX, this.boxY, this.boxWidth, this.boxHeight, pk.borderRim(), RADIUS_WINDOW(), var15.getAccent().corners().mulAlpha(var10) ); } else { atb.drawRoundedBorder(var16, this.boxX, this.boxY, this.boxWidth, this.boxHeight, pk.borderRim(), RADIUS_WINDOW(), var15.getColor().mulAlpha(var10)); } if (vm.INSTANCE.isShimmer()) { atb.drawAnimatedGloss(var16, this.boxX, this.boxY, this.boxWidth, this.boxHeight, RADIUS_WINDOW(), var10); } arx.invalidateScene(); var1.pushClipBounds(this.boxX, this.boxY, this.boxX + this.boxWidth, this.boxY + this.boxHeight); this.sidebarPanel.render(var1, this.layout, var10, var15, this.realSelectedCategory, var25, var30, var29, var4, var5); float var33 = this.layout.getContentX(); float var34 = this.layout.getContentY(); this.refreshVisibleModules(); this.headerPanel .render(var1, this.layout, this.columns, var10, var15, this.realSelectedCategory, this.searchResultCount(), this.isSidebarExpanded, var4, var5); float var35 = this.layout.getContentHeight(); float var36 = this.layout.getContentWidth(); this.scaledScissorX = this.layout.scissorLeft(); this.scaledScissorY = this.layout.scissorTop(); this.scaledScissorEndX = this.layout.scissorRight(); this.scaledScissorEndY = this.layout.scissorBottom(); if (amv.poolVersion() != this.knownPoolVersion) { this.refreshConfigs(); } if (bz.getInstance().getThemeManager().version() != this.knownThemeVersion) { this.refreshThemes(); } float var37 = var10 * this.animationChangeCategory.update(this.selectedCategory == this.realSelectedCategory ? 1.0F : 0.0F); float var38 = (float)Mth.clamp(this.scrollHandler.getValue(), 0.0, this.scrollHandler.getMax()); float var39 = (float)this.scrollHandler.getMax() - var38; float var40 = 30.0F * Math.min(1.0F, var38 / 60.0F); float var41 = 30.0F * Math.min(1.0F, var39 / 60.0F); if (this.selectedCategory == rl.COSMETICS || this.selectedCategory == rl.APPEARANCE) { var40 = 0.0F; } var1.clipScroll(this.scaledScissorX, this.scaledScissorY, this.scaledScissorEndX, this.scaledScissorEndY, var40, var41); boolean var42 = this.dragging || this.scrollBar.isDragging() || this.resizing || this.closing || System.currentTimeMillis() - this.openTime < 500L; float var43 = var42 ? -1000.0F : var4; float var44 = var42 ? -1000.0F : var5; if (this.selectedCategory == rl.COSMETICS) { float var45 = this.cosmeticsPanel .render( var1, var33, var34, var36, var35, (float)Mth.clamp(this.scrollHandler.getValue(), 0.0, this.scrollHandler.getMax()), var37, var15, var43, var44, false, this.columns + 1, this.searchField.getText() ); this.scrollHandler.update(); this.scrollHandler.setMax(Math.max(0.0F, var45 - var35)); } else if (this.selectedCategory == rl.FRIENDS) { gt.beginBatch(); float var54 = this.friendsPanel .render( var1, var33, var34, var36, var35, (float)Mth.clamp(this.scrollHandler.getValue(), 0.0, this.scrollHandler.getMax()), var37, var15, var43, var44 ); gt.endBatch(); this.scrollHandler.update(); this.scrollHandler.setMax(Math.max(0.0F, var54 - var35)); if (this.friendsPanel.consumeScrollToBottom()) { this.scrollHandler.setTargetValue(-this.scrollHandler.getMax()); } } else if (this.selectedCategory == rl.WAYPOINTS) { gt.beginBatch(); float var55 = this.waypointsPanel .render( var1, var33, var34, var36, var35, (float)Mth.clamp(this.scrollHandler.getValue(), 0.0, this.scrollHandler.getMax()), var37, var15, var43, var44 ); gt.endBatch(); this.scrollHandler.update(); this.scrollHandler.setMax(Math.max(0.0F, var55 - var35)); if (this.waypointsPanel.consumeScrollReset()) { this.scrollHandler.setTargetValue(0.0); } } else if (this.selectedCategory == rl.TICKETS) { gt.beginBatch(); float var56 = this.ticketsPanel .render( var1, var33, var34, var36, var35, (float)Mth.clamp(this.scrollHandler.getValue(), 0.0, this.scrollHandler.getMax()), var37, var15, var43, var44 ); gt.endBatch(); this.scrollHandler.update(); this.scrollHandler.setMax(Math.max(0.0F, var56 - var35)); if (this.ticketsPanel.consumeScrollReset()) { this.scrollHandler.setTargetValue(0.0); } if (this.ticketsPanel.consumeScrollToBottom()) { this.scrollHandler.setTargetValue(-this.scrollHandler.getMax()); } } else if (this.selectedCategory == rl.APPEARANCE) { gt.beginBatch(); float var57 = this.appearancePanel .render( var1, var33, var34, var36, var35, (float)Mth.clamp(this.scrollHandler.getValue(), 0.0, this.scrollHandler.getMax()), var37, var15, var43, var44, this.searchField.getText() ); gt.endBatch(); this.scrollHandler.update(); this.scrollHandler.setMax(Math.max(0.0F, var57 - var35)); if (this.appearancePanel.consumeScrollReset()) { this.scrollHandler.setTargetValue(0.0); } } else { gt.beginBatch(); this.renderModules(var1, var43, var44, var37, (int)var33, var36, (int)var34); if (this.cachedVisibleModules.isEmpty()) { this.renderEmptyState(var1, var33, var34, var36, var35, var37, var15); } gt.endBatch(); } float var58 = -5.0F; float var46 = -7.0F; float var47 = 0.0F; float var48 = 0.0F; float var49 = 7.0F; var1.popClip(); if (this.selectedCategory == rl.COSMETICS) { this.cosmeticsPanel .render( var1, var33, var34, var36, var35, (float)Mth.clamp(this.scrollHandler.getValue(), 0.0, this.scrollHandler.getMax()), var37, var15, var43, var44, true, this.columns + 1, this.searchField.getText() ); } else if (this.selectedCategory != rl.FRIENDS && this.selectedCategory != rl.APPEARANCE && this.selectedCategory != rl.WAYPOINTS && this.selectedCategory != rl.TICKETS) { this.renderModulesHover(var1, var43, var44, var37, (int)var33, var36, (int)var34, var58, var46, var47, var48, var49); } if (this.usesModuleGrid()) { this.requestSidePreview(); } var1.popClip(); this.scrollBar .measure( this.layout.getScrollX(), var34, this.layout.getScrollWidth(), var35, (float)this.scrollHandler.getMax(), (float)Mth.clamp(this.scrollHandler.getValue(), 0.0, this.scrollHandler.getMax()) ); this.scrollBar.render(var1, var15, var10, var4, var5, this.scrollHandler.isSettled()); this.renderFooter(var1, var10, var15, var43, var44); this.renderResizeGrip(var1, var10, var4, var5); this.sidePreview.render(var1, var15, var10, this.boxX, this.boxY, var34, this.boxWidth, (float)this.toLocalX(0.0), (float)this.toLocalX(this.width)); arx.invalidateScene(); if (!this.popupSettings.isEmpty()) { ArrayList var50 = null; for (aax var52 : this.popupSettings) { if (var52 instanceof abq var53 && var53.getSetting() != null && !var53.getSetting().isVisible()) { var52.getAnimationScale().animateTo(0.0F); } var52.render(var1, (float)var52.toPopupX(var4), (float)var52.toPopupY(var5), var10, var15); if (var52.getAnimationScale().value() == 0.0F && var52.getAnimationScale().target() == 0.0F) { if (var50 == null) { var50 = new ArrayList(); } var50.add(var52); } } if (var50 != null) { this.popupSettings.removeAll(var50); } } if (this.animationChangeCategory.value() == 0.0F && this.selectedCategory != this.realSelectedCategory) { this.selectedCategory = this.realSelectedCategory; this.categoryJustChanged = true; } if (this.scrollBar.isDragging()) { this.lastManualScrollTime = System.currentTimeMillis(); this.scrollHandler.jumpTo(-this.scrollBar.dragTo(var5)); } if (this.dragging || this.scrollBar.isDragging() || this.resizing || this.closing) { ass.suppress(); } String var59 = this.lastFrameHoveredSetting != null ? this.lastFrameHoveredSetting.getHoverDescription(var4, var5) : null; if (this.lastFrameHoveredSetting != null && var59 != null) { ass.tooltip(this.lastFrameHoveredSetting, var59, var4 - 6.0F, var5 - 6.0F, 12.0F, 12.0F, asr.ABOVE); } this.hoveredSetting = this.lastFrameHoveredSetting; this.lastFrameHoveredSetting = null; ass.render(var1, var10, this.boxX, this.boxY, this.boxWidth, this.boxHeight); float var60 = Math.max(pk.shadowSoftness(nz.OVERLAY), 9.0F * pk.shadowSoftScale()); yd.render( var1, this.boxX - var60, this.boxY - var60, this.boxWidth + var60 * 2.0F, this.boxHeight + var60 * 2.0F, arq.all(asj.of(oc.WINDOW) + var60), var10 ); this.publishPresence(var4, var5); var1.popMatrix(); } } @Override public void onMouseClicked(double var1, double var3, apf var5) { this.frozenInputScale = this.menuScale(); this.inputScaleFrozen = (boolean)(((1)) != 0); var1 = this.toLocalX(var1); var3 = this.toLocalY(var3); if (!this.popupSettings.isEmpty()) { int var6 = 0; for (aax var8 : this.popupSettings) { if (var8.containsCursor(var1, var3)) { var8.onMouseClicked(var8.toPopupX(var1), var8.toPopupY(var3), var5); var6 = 1; } else if (var8.getAnimationScale().target() != 0.0F) { var8.getAnimationScale().animateTo(0.0F); if (bz.getInstance().getSoundManager() != null) { bz.getInstance().getSoundManager().playClick(); } } } if (var6 != 0) { return; } } if (!this.isClosing()) { if (var5.getButtonIndex() == 0 && this.isOverResizeGrip(var1, var3)) { if (this.searchField.isSelected()) { this.searchField.setSelected((boolean)((((1310761062 ^ -1310761062) + ((1310761062 & -1310761062) << 1))) != 0)); } this.beginResize(var1, var3); } else if (this.headerPanel.handleMouseClicked(var1, var3)) { if (this.headerPanel.isOverSearchBar(var1, var3)) { this.searchField.setSelected((boolean)((((-1961481645 ^ 1961481646) + ((-1961481645 & 1961481646) << 1))) != 0)); } } else if (!this.sidebarPanel.handleMouseClicked(var1, var3)) { if (this.searchField.isSelected()) { this.searchField.setSelected((boolean)((((1898693101 | -1898693101) + (1898693101 & -1898693101))) != 0)); } if (var5.getButtonIndex() == 0 && aqj.isHovered(var1, var3, this.boxX, this.boxY, this.boxWidth, this.layout.dragBandHeight())) { this.dragging = (boolean)(((1)) != 0); this.dragOffsetX = (float)var1 - this.boxX; this.dragOffsetY = (float)var3 - this.boxY; } else if (this.openTransition.isDone()) { if (var5.getButtonIndex() != 0 || !this.scrollBar.press(var1, var3)) { if (this.selectedCategory == rl.COSMETICS) { this.cosmeticsPanel.handleMouseClicked(var1, var3, this.searchField.getText()); super.onMouseClicked(var1, var3, var5); } else if (this.selectedCategory == rl.FRIENDS) { this.friendsPanel.handleMouseClicked(var1, var3, var5); super.onMouseClicked(var1, var3, var5); } else if (this.selectedCategory == rl.APPEARANCE) { this.appearancePanel.handleMouseClicked(var1, var3, var5); super.onMouseClicked(var1, var3, var5); } else if (this.selectedCategory == rl.WAYPOINTS) { this.waypointsPanel.handleMouseClicked(var1, var3, var5); super.onMouseClicked(var1, var3, var5); } else if (this.selectedCategory == rl.TICKETS) { this.ticketsPanel.handleMouseClicked(var1, var3, var5); super.onMouseClicked(var1, var3, var5); } else if (!(var1 < this.layout.scissorLeft()) && !(var1 > this.layout.scissorRight()) && !(var3 < this.layout.scissorTop()) && !(var3 > this.layout.scissorBottom())) { double var12 = var1; double var13 = var3; this.modules.stream().filter(var1x -> { int var3x = 0; int var2 = 89276247; while (true) { switch (var2) { case -1724281718: var3x = 0; var2 = 1186344397; break; case -745076628: var3x = (var1x.getName().toLowerCase().contains(this.searchField.getText().toLowerCase())) ? 1 : 0; var2 = 1186344397; break; case 89276247: default: if (this.searchField.isEmpty()) { var2 = 1201124090; } else { var2 = -745076628; } break; case 625421787: var3x = 1; var2 = 1186344397; break; case 1186344397: return (boolean)((var3x) != 0); case 1201124090: if (var1x.getCategory() == this.selectedCategory) { var2 = 625421787; } else { var2 = -1724281718; } } } }).forEach(var5x -> var5x.onMouseClicked(var12, var13, var5)); super.onMouseClicked(var1, var3, var5); } } } } } } @Override public boolean charTyped(char var1, int var2) { if (this.searchField.isSelected()) { return this.searchField.charTyped(var1, var2); } if (this.realSelectedCategory == rl.FRIENDS && this.friendsPanel.charTyped(var1, var2)) { return (boolean)(((1)) != 0); } if (this.realSelectedCategory == rl.APPEARANCE && this.appearancePanel.charTyped(var1, var2)) { return (boolean)(((1)) != 0); } if (this.realSelectedCategory == rl.WAYPOINTS && this.waypointsPanel.charTyped(var1, var2)) { return (boolean)(((1)) != 0); } if (this.realSelectedCategory == rl.TICKETS && this.ticketsPanel.charTyped(var1, var2)) { return (boolean)(((1)) != 0); } for (aax var4 : this.popupSettings) { var4.charTyped(var1, var2); } int var6 = 0; for (zu var5 : this.cachedVisibleModules) { if (var5.charTyped(var1, var2)) { var6 = 1; } } return (boolean)(var6 != 0 ? 1: super.charTyped(var1, var2)); } @Override public void onMouseReleased(double var1, double var3, apf var5) { Iterator var6 = null; zu var7 = null; int var8 = 934057480; while (true) { switch (var8) { case -1781079791: aax var10 = (aax)var6.next(); var10.onMouseReleased(var10.toPopupX(var1), var10.toPopupY(var3), var5); var8 = -411069947; break; case -1601605914: if (var6.hasNext()) { var8 = -726496411; } else { var8 = 1409934692; } break; case -1520399233: if (this.selectedCategory == rl.APPEARANCE) { var8 = 808883238; } else { var8 = 3489232; } break; case -1361089345: this.dragging = (boolean)(((0)) != 0); this.scrollBar.release(); this.endResize(); var8 = -1520399233; break; case -1073422385: var6 = this.cachedVisibleModules.iterator(); var8 = -1601605914; break; case -857161913: if (var5.getButtonIndex() == 0) { var8 = -1361089345; } else { var8 = -1520399233; } break; case -726496411: var7 = (zu)var6.next(); var7.onMouseReleased(var1, var3, var5); var8 = -1601605914; break; case -411069947: if (var6.hasNext()) { var8 = -1781079791; } else { var8 = -857161913; } break; case 3489232: if (this.selectedCategory == rl.WAYPOINTS) { var8 = 2111299750; } else { var8 = -1073422385; } break; case 808883238: this.appearancePanel.handleMouseReleased(var1, var3, var5); var8 = 3489232; break; case 934057480: default: var1 = this.toLocalX(var1); var3 = this.toLocalY(var3); var6 = this.popupSettings.iterator(); var8 = -411069947; break; case 1409934692: super.onMouseReleased(var1, var3, var5); this.inputScaleFrozen = (boolean)(((0)) != 0); return; case 2111299750: this.waypointsPanel.handleMouseReleased(var1, var3, var5); var8 = -1073422385; } } } @Override public boolean keyPressed(int var1, int var2, int var3) { int var4 = 0; for (aax var6 : this.popupSettings) { if (var6.keyPressed(var1, var2, var3)) { this.searchField.setSelected((boolean)((((-1285437254 | 1285437254) + (-1285437254 & 1285437254))) != 0)); var4 = 1; } } if (var4 != 0) { return (boolean)(((1)) != 0); } if (this.searchField.isSelected()) { if (var1 == (-484722595 | 484722851) + (-484722595 & 484722851)) { this.searchField.setSelected((boolean)((((-2031013360 | 2031013360) + (-2031013360 & 2031013360))) != 0)); return (boolean)(((1)) != 0); } else { return this.searchField.keyPressed(var1, var2, var3); } } else { if (this.realSelectedCategory == rl.FRIENDS && this.friendsPanel.keyPressed(var1, var2, var3)) { return (boolean)(((1)) != 0); } if (this.realSelectedCategory == rl.COSMETICS && this.cosmeticsPanel.keyPressed(var1, var2, var3)) { return (boolean)(((1)) != 0); } if (this.realSelectedCategory == rl.APPEARANCE && this.appearancePanel.keyPressed(var1, var2, var3)) { return (boolean)(((1)) != 0); } if (this.realSelectedCategory == rl.WAYPOINTS && this.waypointsPanel.keyPressed(var1, var2, var3)) { return (boolean)(((1)) != 0); } if (this.realSelectedCategory == rl.TICKETS && this.ticketsPanel.keyPressed(var1, var2, var3)) { return (boolean)(((1)) != 0); } int var8 = 0; for (zu var7 : this.cachedVisibleModules) { if (var7.keyPressed(var1, var2, var3)) { var8 = 1; } } if (var8 != 0) { return (boolean)(((1)) != 0); } if ((var1 == (-1259084297 | 1259084553) + (-1259084297 & 1259084553) || var1 == vq.INSTANCE.getKeyCode()) && !this.closing && System.currentTimeMillis() - this.openTime > (-324797475723476474L | 324797475723476674L) + (-324797475723476474L & 324797475723476674L)) { if (this.realSelectedCategory == rl.APPEARANCE && this.appearancePanel.guardLeave(this::requestClose)) { return (boolean)(((1)) != 0); } this.requestClose(); return (boolean)(((1)) != 0); } else { return super.keyPressed(var1, var2, var3); } } } private void requestClose() { Iterator var1 = null; aax var2 = null; int var3 = 1962439025; while (true) { switch (var3) { case -1921984876: this.closing = (boolean)(((1)) != 0); this.onClose(); return; case -778758115: if (var1.hasNext()) { var3 = 1668452241; } else { var3 = -1921984876; } break; case -644253978: this.onMouseReleased(0.0, 0.0, apf.LEFT); this.onMouseReleased(0.0, 0.0, apf.RIGHT); this.onMouseReleased(0.0, 0.0, apf.MIDDLE); var1 = this.popupSettings.iterator(); var3 = -778758115; break; case 1668452241: var2 = (aax)var1.next(); var2.getAnimationScale().animateTo(0.0F); var3 = -778758115; break; case 1789960929: return; case 1962439025: default: if (this.closing) { var3 = 1789960929; } else { var3 = -644253978; } } } } public boolean mouseScrolled(double var1, double var3, double var5, double var7) { this.lastManualScrollTime = System.currentTimeMillis(); this.scrollBar.notifyScrolled(); var1 = this.toLocalX(var1); var3 = this.toLocalY(var3); if (!this.popupSettings.isEmpty()) { int var9 = 0; int var10 = 0; for (aax var12 : this.popupSettings) { if (var12.containsCursor(var1, var3) && var12.getAnimationScale().value() > 0.0F) { var10 = 1; if (var12.mouseScrolled(var12.toPopupX(var1), var12.toPopupY(var3), var5, var7)) { var9 = 1; } } else if (var12.getAnimationScale().target() != 0.0F) { var12.getAnimationScale().animateTo(0.0F); if (bz.getInstance().getSoundManager() != null) { bz.getInstance().getSoundManager().playClick(); } } } if (var9 != 0 || var10 != 0) { return (boolean)(((1)) != 0); } } if (this.selectedCategory == rl.APPEARANCE && this.appearancePanel.mouseScrolled(var1, var3, var5, var7)) { return (boolean)(((1)) != 0); } if (this.selectedCategory == rl.WAYPOINTS && this.waypointsPanel.mouseScrolled(var1, var3, var5, var7)) { return (boolean)(((1)) != 0); } if (this.selectedCategory != rl.COSMETICS && this.selectedCategory != rl.FRIENDS && this.selectedCategory != rl.APPEARANCE && this.selectedCategory != rl.WAYPOINTS && this.selectedCategory != rl.TICKETS && this.cachedVisibleModules != null) { for (zu var17 : this.cachedVisibleModules) { if (var17.mouseScrolled(var1, var3, var5, var7)) { return (boolean)(((1)) != 0); } } } float var16 = this.getContentVisibleHeight(); float var18 = (float)Math.max(20.0, Math.min(60.0, this.scrollHandler.getMax() / var16 * 10.0)); this.scrollHandler.scroll(var7 * var18 / 8.0); return super.mouseScrolled(var1, var3, var5, var7); } @Override public void onMouseDragged(double var1, double var3, apf var5, double var6, double var8) { var1 = this.toLocalX(var1); var3 = this.toLocalY(var3); var6 /= this.inputScale(); var8 /= this.inputScale(); if (var5.getButtonIndex() == 0) { if (this.resizing) { this.applyResize(var1, var3); return; } if (this.dragging) { this.targetBoxX = (float)var1 - this.dragOffsetX; this.targetBoxY = (float)var3 - this.dragOffsetY; float var18 = (float)this.toLocalX(0.0); float var19 = (float)this.toLocalY(0.0); float var12 = (float)this.toLocalX(this.width); float var13 = (float)this.toLocalY(this.height); if (this.targetBoxX < var18) { this.targetBoxX = var18; } if (this.targetBoxY < var19) { this.targetBoxY = var19; } if (this.targetBoxX + this.boxWidth > var12) { this.targetBoxX = var12 - this.boxWidth; } if (this.targetBoxY + this.boxHeight > var13) { this.targetBoxY = var13 - this.boxHeight; } return; } } if (this.selectedCategory == rl.APPEARANCE) { this.appearancePanel.handleMouseDragged(var1, var3, var5, var6, var8); super.onMouseDragged(var1, var3, var5, var6, var8); } else if (this.selectedCategory == rl.WAYPOINTS) { this.waypointsPanel.handleMouseDragged(var1, var3, var5, var6, var8); super.onMouseDragged(var1, var3, var5, var6, var8); } else if (this.selectedCategory == rl.TICKETS) { super.onMouseDragged(var1, var3, var5, var6, var8); } else { for (zu var11 : this.cachedVisibleModules) { var11.onMouseDragged(var1, var3, var5, var6, var8); } super.onMouseDragged(var1, var3, var5, var6, var8); } } public void onClose() { super.onClose(); } private void publishPresence(float var1, float var2) { if (!this.closing && !(this.boxWidth <= 0.0F) && !(this.boxHeight <= 0.0F)) { double var3 = this.scrollHandler.getMax(); float var5 = var3 <= 0.0 ? 0.0F : (float)(Mth.clamp(this.scrollHandler.getValue(), 0.0, var3) / var3); int var6 = GLFW.glfwGetMouseButton(mc.getWindow().handle(), (-1215448944 | 1215448944) + (-1215448944 & 1215448944)) == 1? 1: 0; anh.capture( this.realSelectedCategory, this.cachedVisibleModules.size(), this.columns, this.isSidebarExpanded, (boolean)(((!this.searchField.isEmpty() ? 1: (-2092201408 | 2092201408) + (-2092201408 & 2092201408))) != 0), (var1 - this.boxX) / this.boxWidth, (var2 - this.boxY) / this.boxHeight, var5, (boolean)((var6 ) != 0)); } } private void refreshVisibleModules() { String var1 = null; rl var2 = null; Comparator var3 = null; int var4 = 1401502317; while (true) { switch (var4) { case -2023713571: if (this.lastCategory == var2) { var4 = -1910877110; } else { var4 = 2121200736; } break; case -1910877110: return; case -1705195063: if (this.lastSearch.equals(var1)) { var4 = -2023713571; } else { var4 = 2121200736; } break; case 1401502317: default: var1 = this.searchField.getText().toLowerCase(); var2 = this.selectedCategory; if (this.lastSearch != null) { var4 = -1705195063; } else { var4 = 2121200736; } break; case 2121200736: final String var1f = var1; final rl var2f = var2; var3 = this.resolveOrder(var2); this.cachedVisibleModules = this.modules.stream().filter(var3x -> { int var5x = 0; int var4x = 818919891; while (true) { switch (var4x) { case -1994053734: var5x = (var3x.getName().toLowerCase().contains(var1f)) ? 1 : 0; var4x = 841569715; break; case -1559034135: var5x = 0; var4x = 841569715; break; case -68546177: if (var3x.getCategory() == var2f) { var4x = 1684260877; } else { var4x = -1559034135; } break; case 818919891: default: if (this.searchField.isEmpty()) { var4x = -68546177; } else { var4x = -1994053734; } break; case 841569715: return (boolean)((var5x) != 0); case 1684260877: var5x = 1; var4x = 841569715; } } }).sorted(var3).toList(); this.lastSearch = var1; this.lastCategory = var2; return; } } } private Comparator resolveOrder(rl var1) { Comparator var2 = null; int var3 = 1578949205; while (true) { switch (var3) { case -1873695920: if (var1 == rl.CONFIGS) { var3 = -917862217; } else { var3 = -32186807; } break; case -1146374492: return Comparator.comparingInt(zu::getSortGroup).thenComparing(var2); case -917862217: return Comparator.comparingInt(zu::getSortGroup).thenComparing(Comparator.comparingDouble(zu::getSortRank).reversed()).thenComparing(var2); case -32186807: return var2; case 306688165: if (var1 == rl.THEMES) { var3 = -1146374492; } else { var3 = -1873695920; } break; case 956586254: return var2; case 1578949205: default: var2 = Comparator.comparing(zu::getName, String.CASE_INSENSITIVE_ORDER); if (!this.searchField.isEmpty()) { var3 = 956586254; } else { var3 = 306688165; } } } } private boolean usesModuleGrid() { int var2 = 0; int var1 = -705396840; while (true) { switch (var1) { case -1656684151: if (this.selectedCategory != rl.APPEARANCE) { var1 = -1656371270; } else { var1 = 892620490; } break; case -1656371270: if (this.selectedCategory != rl.WAYPOINTS) { var1 = -1420317440; } else { var1 = 892620490; } break; case -1420317440: if (this.selectedCategory != rl.TICKETS) { var1 = 1609456950; } else { var1 = 892620490; } break; case -705396840: default: if (this.selectedCategory != rl.COSMETICS) { var1 = 242573451; } else { var1 = 892620490; } break; case 242573451: if (this.selectedCategory != rl.FRIENDS) { var1 = -1656684151; } else { var1 = 892620490; } break; case 892620490: var2 = 0; var1 = 1744925527; break; case 1609456950: var2 = 1; var1 = 1744925527; break; case 1744925527: return (boolean)((var2) != 0); } } } private void requestSidePreview() { int var1 = 0; zu var2 = null; aab var3 = null; aav var4 = null; rm var5 = null; int var6 = 1488525813; while (true) { switch (var6) { case -660601776: var2 = this.cachedVisibleModules.get(var1); if (var2.isHovered()) { var6 = 799837724; } else { var6 = 1123601884; } break; case 324036968: if (var1 < this.cachedVisibleModules.size()) { var6 = -660601776; } else { var6 = 881157641; } break; case 799837724: if (var2 instanceof aab) { var6 = 1874453625; } else { var6 = 1123601884; } break; case 881157641: return; case 1123601884: var1++; var6 = 324036968; break; case 1488525813: default: var1 = 0; var6 = 324036968; break; case 1872812349: var4 = (aav)var5; this.sidePreview.request(var4, var3.getName()); return; case 1874453625: var3 = (aab)var2; var5 = var3.getModule(); if (var5 instanceof aav) { var6 = 1872812349; } else { var6 = 1123601884; } } } } private int searchResultCount() { int var1 = -1594874857; while (true) { switch (var1) { case -1594874857: default: if (!this.searchField.isEmpty()) { var1 = -65521264; } else { var1 = 1710933713; } break; case -1187356626: if (this.selectedCategory != rl.APPEARANCE) { var1 = 143370693; } else { var1 = 1710933713; } break; case -892964921: if (this.selectedCategory != rl.TICKETS) { var1 = -192691887; } else { var1 = 1710933713; } break; case -192691887: if (this.selectedCategory == rl.FRIENDS) { var1 = 1710933713; } else { var1 = 259114645; } break; case -65521264: if (this.selectedCategory != rl.COSMETICS) { var1 = -1187356626; } else { var1 = 1710933713; } break; case 143370693: if (this.selectedCategory != rl.WAYPOINTS) { var1 = -892964921; } else { var1 = 1710933713; } break; case 259114645: return this.cachedVisibleModules.size(); case 1710933713: return -1; } } } private void renderModules(asq var1, float var2, float var3, float var4, float var5, float var6, float var7) { this.refreshVisibleModules(); List var8 = this.cachedVisibleModules; int var9 = this.columns; float var10 = this.layout.getColumnGap(); float var11 = this.layout.moduleWidth(var9); ge var12 = asp.font(oe.HEADING); double[] var13 = new double[var9]; float[] var14 = new float[var9]; for (int var15 = 0; var15 < var9; var15++) { var14[var15] = -99999.0F; } float[] var31 = new float[var9]; int[] var16 = new int[var8.size()]; for (int var17 = 0; var17 < var8.size(); var17++) { zu var18 = (zu)var8.get(var17); int var19 = 0; for (int var20 = 1; var20 < var9; var20++) { if (var13[var20] < var13[var19]) { var19 = var20; } } var16[var17] = var19; float var39 = var11 * asa.cardAmount(var11) * var18.getToyHover(); if (var39 > var31[var19]) { var31[var19] = var39; } var13[var19] += var18.getHeight() + var10; } float[] var32 = new float[var9]; for (int var33 = 0; var33 < var9; var33++) { for (int var36 = 0; var36 < var9; var36++) { if (var33 != var36) { if (var36 < var33) { var32[var33] += var31[var36] / 2.0F; } else { var32[var33] -= var31[var36] / 2.0F; } } } } for (int var34 = 0; var34 < var9; var34++) { var13[var34] = 0.0; } float[] var35 = new float[var9]; for (int var37 = 0; var37 < var8.size(); var37++) { zu var40 = (zu)var8.get(var37); int var21 = var16[var37]; float var22 = var40.getHeight() * asa.cardAmount(var11) * var40.getToyHover(); float var23 = var5 + var21 * (var11 + var10) + var32[var21]; float var24 = (float)(var7 + var13[var21] - this.scrollHandler.getValue()) + var22 / 2.0F; var40.settledLayoutY = (float)(var7 + var35[var21] - this.scrollHandler.getValue()); var35[var21] += var40.getHeight() + var10; float var25 = this.getContentStartY(); float var26 = var25 + this.getContentVisibleHeight(); float var27 = -99999.0F; float var28 = Float.MAX_VALUE; float var29 = Float.MAX_VALUE; var40.updatePhysics(var23, var24, var27, var28, var14[var21], var29, var11); if (this.categoryJustChanged) { float var30 = 1.0F + Math.min(var37, (-695204962 | 695204968) + (-695204962 & 695204968)) * 0.12F; var40.resetPhysics(var40.currentX, var24 + this.categoryChangeOffset * var30); } var14[var21] = var40.currentY + var40.getHeight() + var22 / 2.0F; if (var40.getHoverValue() <= 0.001F) { var40.render(var1, var2, var3, var12, var40.currentX, var40.currentY, var11, var4, var21, var25 - 10.0F, var26 + 7.0F); } var13[var21] += var40.getHeight() + var22 + var10; } if (this.categoryJustChanged) { this.categoryJustChanged = (boolean)(((0)) != 0); } this.scrollHandler.update(); double var38 = Arrays.stream(var13).max().orElse(0.0); float var41 = this.getContentVisibleHeight(); this.scrollHandler .setMax( Math.max(0.0, var38 - var41) + (var38 > var41 ? 4: (359978227 | -359978227) + (359978227 & -359978227)) ); } private void renderModulesHover( asq var1, float var2, float var3, float var4, float var5, float var6, float var7, float var8, float var9, float var10, float var11, float var12 ) { float var13 = 0.0F; float var14 = 0.0F; float var15 = 0.0F; float var16 = 0.0F; float var17 = 0.0F; ge var18 = null; float var19 = 0.0F; float var20 = 0.0F; Iterator var21 = null; zu var22 = null; float var23 = 0.0F; float var24 = 0.0F; float var25 = 0.0F; int var26 = -276648001; while (true) { switch (var26) { case -1257758453: return; case -823821700: if (var21.hasNext()) { var26 = 74966340; } else { var26 = 1498457840; } break; case -276648001: default: if (this.cachedVisibleModules == null) { var26 = -1257758453; } else { var26 = 684017465; } break; case 74966340: var22 = (zu)var21.next(); if (var22.getHoverValue() <= 0.001F) { var26 = 1272383308; } else { var26 = 777563913; } break; case 684017465: var13 = (float)Mth.clamp(this.scrollHandler.getValue(), 0.0, this.scrollHandler.getMax()); var14 = (float)this.scrollHandler.getMax() - var13; var15 = 30.0F * Math.min(1.0F, var13 / 60.0F); var16 = 30.0F * Math.min(1.0F, var14 / 60.0F); var17 = this.layout.moduleWidth(this.columns); var18 = asp.font(oe.HEADING); var19 = this.getContentStartY(); var20 = var19 + this.getContentVisibleHeight(); var21 = this.cachedVisibleModules.iterator(); var26 = -823821700; break; case 777563913: var23 = var22.getHoverValue(); var1.clipScroll( this.scaledScissorX + var8 * var23, this.scaledScissorY + var10 * var23, this.scaledScissorEndX - var9 * var23, this.scaledScissorEndY + var11 * var23, var15, var16 ); gt.beginBatch(); var24 = 10.0F + var10 * var23; var25 = 7.0F + var11 * var23; var22.render( var1, var2, var3, var18, var22.currentX, var22.currentY, var17, var4, 0, var19 - var24, var20 + var25 ); gt.endBatch(); var1.popClip(); var26 = -823821700; break; case 1272383308: var26 = -823821700; break; case 1498457840: return; } } } private void renderFooter(asq var1, float var2, mv var3, float var4, float var5) { float var6 = 0.0F; float var7 = 0.0F; float var8 = 0.0F; float var9 = 0.0F; oq var10 = null; ge var11 = null; ge var12 = null; float var13 = 0.0F; float var14 = 0.0F; float var15 = 0.0F; asu var16 = null; asu var17 = null; asu var18 = null; float var19 = 0.0F; String var20 = null; float var21 = 0.0F; int var22 = 0; String var23 = null; float var24 = 0.0F; float var25 = 0.0F; String var26 = null; float var27 = 0.0F; int var28 = -987318417; while (true) { switch (var28) { case -1725571751: var10 = oq.current(); ast.divider(var1, var7, var6 - this.layout.getFooterGap() * 0.5F, var8, var2); var11 = asp.font(oe.CAPTION); var12 = asp.font(oe.MICRO); var13 = var6 + (var9 - var11.height()) * 0.5F; var14 = var6 + (var9 - var12.height()) * 0.5F; var15 = pk.space(od.SM); var16 = var10.color(nx.ON_SURFACE_MUTED).mulAlpha(var2); var17 = var10.color(nx.ON_SURFACE_FAINT).mulAlpha(var2); var18 = var10.color(nx.ACCENT).mulAlpha(var2); gt.beginBatch(); var19 = var7; var1.drawSurface(aso.ACCENT, var19, var6 + (var9 - 3.5F) * 0.5F, 3.5F, 3.5F, RADIUS_FOOTER_DOT, var18); var19 += 3.5F + var15; var20 = var3.getName(); var1.drawText(var11, var20, var19, var13, var16); var21 = var19 + var11.width(var20); var19 = var21 + var15; var1.drawRect(var19, var6 + (var9 - 7.0F) * 0.5F, mx.current().borderThickness(), 7.0F, var17); var19 += var15 * 2.0F; var22 = this.countActiveModules(); var23 = String.valueOf(var22); var24 = var19; var1.drawText(var11, var23, var19, var13, var18); var19 += var11.width(var23); var1.drawText(var11, " active", var19, var13, var16); var25 = var19 + var11.width(" active"); var26 = "Evolution 2.0 DEV"; asp.drawRight(var1, oe.MICRO, var26, var7 + var8, var14, var17); var27 = var12.width(var26); gt.endBatch(); this.requestFooterTooltip( 0, var7, var6, var21 - var7, var9, var4, var5, this.footerThemeTooltip(var20) ); this.requestFooterTooltip( 1, var24, var6, var25 - var24, var9, var4, var5, this.footerActiveTooltip(var22) ); this.requestFooterTooltip( 2, var7 + var8 - var27, var6, var27, var9, var4, var5, "Client name, version and build channel" ); return; case -987318417: default: var6 = this.layout.getFooterY(); var7 = this.layout.getFooterX(); var8 = this.layout.getFooterWidth(); var9 = this.layout.getFooterHeight(); if (!(var8 <= 0.0F)) { var28 = 1818341832; } else { var28 = 874295652; } break; case 874295652: return; case 1818341832: if (var9 <= 0.0F) { var28 = 874295652; } else { var28 = -1725571751; } } } } private void requestFooterTooltip(int var1, float var2, float var3, float var4, float var5, float var6, float var7, String var8) { int var9 = var4 > 0.0F && aqj.isHovered(var6, var7, var2, var3, var4, var5) ? 1: 0; if (!(this.footerHover[var1].update(var9 != 0 ? 1.0F : 0.0F) <= 0.5F)) { ass.tooltip(var8, var8, var2, var3, var4, var5, asr.ABOVE); } } private String footerThemeTooltip(String var1) { int var2 = 456047503; while (true) { switch (var2) { case -222985738: this.cachedFooterThemeName = var1; this.cachedFooterThemeTooltip = "Active theme: " + var1; var2 = 1631977176; break; case 456047503: default: if (!var1.equals(this.cachedFooterThemeName)) { var2 = -222985738; } else { var2 = 1631977176; } break; case 1631977176: return this.cachedFooterThemeTooltip; } } } private String footerActiveTooltip(int var1) { int var2 = 1299732955; while (true) { switch (var2) { case 111871363: this.cachedFooterActive = var1; this.cachedFooterActiveTooltip = var1 + " modules enabled across every category"; var2 = 1280779446; break; case 1280779446: return this.cachedFooterActiveTooltip; case 1299732955: default: if (var1 != this.cachedFooterActive) { var2 = 111871363; } else { var2 = 1280779446; } } } } private int countActiveModules() { List var1 = null; int var2 = 0; int var3 = 0; int var4 = -830439191; while (true) { switch (var4) { case -1256657028: return var2; case -1024389342: var3++; var4 = 819905581; break; case -830439191: default: var1 = bz.getInstance().getModuleManager().getModules(); var2 = 0; var3 = 0; var4 = 819905581; break; case -657524428: var2++; var4 = -1024389342; break; case 819905581: if (var3 < var1.size()) { var4 = 1052120780; } else { var4 = -1256657028; } break; case 1052120780: if (((rm)var1.get(var3)).isEnabled()) { var4 = -657524428; } else { var4 = -1024389342; } } } } private void renderEmptyState(asq var1, float var2, float var3, float var4, float var5, float var6, mv var7) { int var8 = !this.searchField.isEmpty() ? 1: 0; arw.draw( var1, var7, this.realSelectedCategory.getIcon(), var8 != 0 ? "Nothing found" : "Nothing here yet", var8 != 0 ? "Try another module name" : "This category has no modules", var2, var3, var4, var5, var6 ); } private float getContentStartY() { return this.layout.getContentY(); } private float getContentVisibleHeight() { return this.layout.getContentHeight(); } private float menuScale() { return Math.min(xm.userScale(), this.maxMenuScale()); } private float inputScale() { float var2 = 0.0F; int var1 = 827865769; while (true) { switch (var1) { case 162734226: var2 = this.menuScale(); var1 = 1543853150; break; case 827865769: default: if (this.inputScaleFrozen) { var1 = 959907926; } else { var1 = 162734226; } break; case 959907926: var2 = this.frozenInputScale; var1 = 1543853150; break; case 1543853150: return var2; } } } private void releaseStaleInputScale() { long var1 = (-5291000527963736288L | 5291000527963736288L) + (-5291000527963736288L & 5291000527963736288L); int var3 = 176115074; while (true) { switch (var3) { case -1709126825: var1 = mc.getWindow().handle(); if (GLFW.glfwGetMouseButton(var1, (887336536 ^ -887336536) + ((887336536 & -887336536) << 1)) == 0) { var3 = -1183950456; } else { var3 = 571273653; } break; case -1413006901: this.inputScaleFrozen = (boolean)(((0)) != 0); var3 = 571273653; break; case -1183950456: if (GLFW.glfwGetMouseButton(var1, (1317988486 ^ -1317988485) + ((1317988486 & -1317988485) << 1)) == 0) { var3 = -1413006901; } else { var3 = 571273653; } break; case -417508645: if (!this.dragging) { var3 = -214217379; } else { var3 = -234537827; } break; case -234537827: return; case -214217379: if (!this.scrollBar.isDragging()) { var3 = 818553787; } else { var3 = -234537827; } break; case 176115074: default: if (this.inputScaleFrozen) { var3 = -417508645; } else { var3 = -234537827; } break; case 571273653: return; case 818553787: if (this.resizing) { var3 = -234537827; } else { var3 = -1709126825; } } } } private double toLocalX(double var1) { return this.toLocalX(var1, this.inputScale()); } private double toLocalY(double var1) { return this.toLocalY(var1, this.inputScale()); } private double toLocalX(double var1, float var3) { float var4 = this.width / 2.0F; return var4 + (var1 - var4) / var3; } private double toLocalY(double var1, float var3) { float var4 = this.height / 2.0F; return var4 + (var1 - var4) / var3; } private float toScreenX(double var1) { float var3 = this.width / 2.0F; return var3 + ((float)var1 - var3) * this.inputScale(); } private float toScreenY(double var1) { float var3 = this.height / 2.0F; return var3 + ((float)var1 - var3) * this.inputScale(); } private void clampTargetBox(float var1) { float var2 = 0.0F; float var3 = 0.0F; float var4 = 0.0F; float var5 = 0.0F; int var6 = 1435846243; while (true) { switch (var6) { case -1980728250: this.targetBoxX = var2; var6 = 941950198; break; case -1458118585: this.targetBoxY = var5 - this.boxHeight; var6 = 693753053; break; case -1424618383: this.targetBoxY = var3; var6 = -1388356155; break; case -1388356155: if (this.targetBoxX + this.boxWidth > var4) { var6 = -1190736931; } else { var6 = 1255794605; } break; case -1190736931: this.targetBoxX = var4 - this.boxWidth; var6 = 1255794605; break; case 693753053: return; case 941950198: if (this.targetBoxY < var3) { var6 = -1424618383; } else { var6 = -1388356155; } break; case 1255794605: if (this.targetBoxY + this.boxHeight > var5) { var6 = -1458118585; } else { var6 = 693753053; } break; case 1435846243: default: var2 = (float)this.toLocalX(0.0, var1); var3 = (float)this.toLocalY(0.0, var1); var4 = (float)this.toLocalX(this.width, var1); var5 = (float)this.toLocalY(this.height, var1); if (this.targetBoxX < var2) { var6 = -1980728250; } else { var6 = 941950198; } } } } private float minMenuScale() { return xm.minUserScale(); } private float maxMenuScale() { float var1 = 0.0F; int var2 = 1923905162; while (true) { switch (var2) { case -1521050962: var1 = Math.min(var1, this.height / this.boxHeight); var2 = 1745994133; break; case -1423188159: if (this.boxHeight > 0.0F) { var2 = -1521050962; } else { var2 = 1745994133; } break; case -621618821: var1 = Math.min(var1, this.width / this.boxWidth); var2 = -1423188159; break; case 1745994133: return Math.max(this.minMenuScale(), var1); case 1923905162: default: var1 = xm.maxUserScale(); if (this.boxWidth > 0.0F) { var2 = -621618821; } else { var2 = -1423188159; } } } } private float resizeGripInset() { return asj.of(oc.WINDOW) * 0.2929F; } private float resizeGripSpan() { return this.resizeGripInset() + 2.4F + 1.8F + 2.2F; } private float headerRightReserve() { return Math.max(0.0F, this.resizeGripSpan() - this.layout.getOuterPad()); } private boolean isOverResizeGrip(double var1, double var3) { float var5 = 0.0F; float var6 = 0.0F; float var7 = 0.0F; int var9 = 0; int var8 = -1167581531; while (true) { switch (var8) { case -1899152917: return (boolean)((var9) != 0); case -1892803811: if (var1 <= var5 + 5.0F) { var8 = -139550913; } else { var8 = 1599097780; } break; case -1272574022: var9 = 1; var8 = -1899152917; break; case -1167581531: default: var5 = this.boxX + this.boxWidth; var6 = this.boxY; var7 = this.resizeGripSpan() + 5.0F; if (var1 >= var5 - var7) { var8 = -1892803811; } else { var8 = 1599097780; } break; case -139550913: if (var3 >= var6 - 5.0F) { var8 = 1994521727; } else { var8 = 1599097780; } break; case 1599097780: var9 = 0; var8 = -1899152917; break; case 1994521727: if (var3 <= var6 + var7) { var8 = -1272574022; } else { var8 = 1599097780; } } } } private void beginResize(double var1, double var3) { this.resizing = (boolean)(((1)) != 0); this.resizeAnchorScreenX = this.toScreenX(this.boxX); this.resizeAnchorScreenY = this.toScreenY(this.boxY + this.boxHeight); this.resizeGrabOffsetX = this.toScreenX(this.boxX + this.boxWidth) - this.toScreenX(var1); this.resizeGrabOffsetY = this.toScreenY(this.boxY) - this.toScreenY(var3); this.lastResizeSoundTime = (-1334250527852039034L | 1334250527852039034L) + (-1334250527852039034L & 1334250527852039034L); } private void applyResize(double var1, double var3) { float var5 = 0.0F; float var6 = 0.0F; float var7 = 0.0F; float var8 = 0.0F; long var9 = (8978125682473654777L ^ -8978125682473654777L) + ((8978125682473654777L & -8978125682473654777L) << 1); int var11 = -1013387881; while (true) { switch (var11) { case -1585042044: if (this.boxHeight <= 0.0F) { var11 = -558240999; } else { var11 = 1647318526; } break; case -1013387881: default: if (!(this.boxWidth <= 0.0F)) { var11 = -1585042044; } else { var11 = -558240999; } break; case -989052224: bz.getInstance().getSoundManager().playResize(var8); var11 = 1094741555; break; case -965524240: this.lastResizeSoundTime = var9; if (bz.getInstance().getSoundManager() != null) { var11 = -989052224; } else { var11 = 1094741555; } break; case -558240999: return; case 1094741555: return; case 1647318526: var5 = this.toScreenX(var1) + this.resizeGrabOffsetX - this.resizeAnchorScreenX; var6 = this.resizeAnchorScreenY - (this.toScreenY(var3) + this.resizeGrabOffsetY); var7 = this.boxWidth * this.boxWidth + this.boxHeight * this.boxHeight; var8 = Mth.clamp((var5 * this.boxWidth + var6 * this.boxHeight) / var7, this.minMenuScale(), this.maxMenuScale()); xm.applyUserScale(var8); this.targetBoxX = (float)this.toLocalX(this.resizeAnchorScreenX, var8); this.targetBoxY = (float)this.toLocalY(this.resizeAnchorScreenY, var8) - this.boxHeight; this.clampTargetBox(var8); this.boxXAnim.jumpTo(this.targetBoxX); this.boxYAnim.jumpTo(this.targetBoxY); var9 = System.currentTimeMillis(); if (var9 - this.lastResizeSoundTime >= (5493285411734935822L | -5493285411734935702L) + (5493285411734935822L & -5493285411734935702L)) { var11 = -965524240; } else { var11 = 1094741555; } } } } private void endResize() { int var1 = -154647529; while (true) { switch (var1) { case -1655218010: return; case -1234723215: bz.getInstance().getSoundManager().stopDragAndResize(); var1 = -454441432; break; case -454441432: return; case -363336422: this.resizing = (boolean)(((0)) != 0); if (bz.getInstance().getSoundManager() != null) { var1 = -1234723215; } else { var1 = -454441432; } break; case -154647529: default: if (!this.resizing) { var1 = -1655218010; } else { var1 = -363336422; } } } } private void renderResizeGrip(asq var1, float var2, float var3, float var4) { int var5 = !this.resizing && (this.dragging || this.scrollBar.isDragging() || this.closing || !this.isOverResizeGrip(var3, var4)) ? 0: 1; float var6 = this.resizeGripAnim.update(var5 != 0 ? 1.0F : 0.0F); float var7 = this.resizeGrabAnim.update(this.resizing ? 1.0F : 0.0F); float var8 = var2 * var6; if (!(var8 <= 0.01F)) { oq var9 = oq.current(); asu var10 = var9.color(nx.ACCENT); float var11 = this.resizeGripInset(); float var12 = this.boxX + this.boxWidth - var11; float var13 = this.boxY + var11; float var14 = (2.4F + 1.8F * var7) * var6; float var15 = var8 * (0.35F + 0.35F * var7); if (var7 > 0.0F) { float var16 = 0.5F + 0.5F * (float)Math.sin(cs.elapsedMillis() / 320.0); var15 *= 1.0F - 0.3F * var7 * (1.0F - var16); } drawGripDot(var1, var12, var13, var14 + 2.2F, var10.mulAlpha(var15)); drawGripDot(var1, var12, var13, var14 + 1.0F, var10.mulAlpha(var8)); drawGripDot(var1, var12, var13, var14, asu.WHITE.mulAlpha(var8)); if (var5 != 0 && !this.resizing && var6 > 0.5F) { float var17 = var14 + 2.2F; ass.tooltip( "Drag to resize the window", "Drag to resize the window", var12 - var17, var13 - var17, var17 * 2.0F, var17 * 2.0F, asr.BELOW ); } } } private static void drawGripDot(asq var0, float var1, float var2, float var3, asu var4) { var0.drawRoundedRect(var1 - var3, var2 - var3, var3 * 2.0F, var3 * 2.0F, asj.uniform(var3), var4); } public void addPopupMenuSetting(aax var1) { this.popupSettings.add(var1); } public void removePopupMenuSetting(aax var1) { this.popupSettings.remove(var1); } @Override public void render(asq var1, float var2, float var3) { this.renderTop(var1, var2, var3); } public xv getLayout() { return this.layout; } public int getColumns() { return this.columns; } public void setColumns(int var1) { this.columns = var1; } public arl getScrollHandler() { return this.scrollHandler; } public zx getPointerIntent() { return this.pointerIntent; } public boolean isClosing() { return this.closing; } public void setClosing(boolean var1) { this.closing = var1; } public aak getHeaderPanel() { return this.headerPanel; } public yk getAppearancePanel() { return this.appearancePanel; } public aay getHoveredSetting() { return this.hoveredSetting; } public long getLastManualScrollTime() { return this.lastManualScrollTime; } }