package mapped;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.primitives.Doubles;
import com.google.common.primitives.Ints;
import com.jagex.oldscape.pub.OAuthApi;
import com.jagex.oldscape.pub.OtlTokenRequester;
import com.jagex.oldscape.pub.OtlTokenResponse;
import com.jagex.oldscape.pub.RefreshAccessTokenRequester;
import com.jagex.oldscape.pub.RefreshAccessTokenResponse;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Rectangle;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.net.Socket;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.OpenOption;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.Future;
import java.util.function.Consumer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.inject.Inject;
import javax.inject.Named;

import mapped.util.RSPSConstants;
import net.runelite.api.ChatMessageType;
import net.runelite.api.Constants;
import net.runelite.api.Deque;
import net.runelite.api.FriendContainer;
import net.runelite.api.GameState;
import net.runelite.api.IndexDataBase;
import net.runelite.api.InventoryID;
import net.runelite.api.MenuEntry;
import net.runelite.api.MessageNode;
import net.runelite.api.NameableContainer;
import net.runelite.api.NodeCache;
import net.runelite.api.Perspective;
import net.runelite.api.Point;
import net.runelite.api.Prayer;
import net.runelite.api.Rasterizer;
import net.runelite.api.RenderOverview;
import net.runelite.api.Skill;
import net.runelite.api.VarPlayer;
import net.runelite.api.WidgetNode;
import net.runelite.api.WorldType;
import net.runelite.api.clan.ClanRank;
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.dbtable.DBRowConfig;
import net.runelite.api.events.AccountHashChanged;
import net.runelite.api.events.AmbientSoundEffectCreated;
import net.runelite.api.events.AreaSoundEffectPlayed;
import net.runelite.api.events.BeforeMenuRender;
import net.runelite.api.events.CanvasSizeChanged;
import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.ClanChannelChanged;
import net.runelite.api.events.ClientTick;
import net.runelite.api.events.DraggingWidgetChanged;
import net.runelite.api.events.FriendsChatChanged;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.GrandExchangeOfferChanged;
import net.runelite.api.events.ItemSpawned;
import net.runelite.api.events.MenuEntryAdded;
import net.runelite.api.events.MenuOpened;
import net.runelite.api.events.MenuShouldLeftClick;
import net.runelite.api.events.NpcSpawned;
import net.runelite.api.events.PlayerDespawned;
import net.runelite.api.events.PlayerMenuOptionsChanged;
import net.runelite.api.events.PlayerSpawned;
import net.runelite.api.events.PostMenuSort;
import net.runelite.api.events.ResizeableChanged;
import net.runelite.api.events.ScriptCallbackEvent;
import net.runelite.api.events.ScriptPostFired;
import net.runelite.api.events.ScriptPreFired;
import net.runelite.api.events.SoundEffectPlayed;
import net.runelite.api.events.StatChanged;
import net.runelite.api.events.UsernameChanged;
import net.runelite.api.events.VarbitChanged;
import net.runelite.api.events.WidgetClosed;
import net.runelite.api.events.WidgetPressed;
import net.runelite.api.events.WorldChanged;
import net.runelite.api.hooks.Callbacks;
import net.runelite.api.hooks.DrawCallbacks;
import net.runelite.api.overlay.OverlayIndex;
import net.runelite.api.vars.AccountType;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.api.widgets.WidgetItem;
import net.runelite.api.widgets.WidgetUtil;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
import net.runelite.rs.api.RSAbstractArchive;
import net.runelite.rs.api.RSAbstractRasterProvider;
import net.runelite.rs.api.RSActor;
import net.runelite.rs.api.RSArchive;
import net.runelite.rs.api.RSBuffer;
import net.runelite.rs.api.RSChatChannel;
import net.runelite.rs.api.RSClanChannel;
import net.runelite.rs.api.RSClanSettings;
import net.runelite.rs.api.RSClient;
import net.runelite.rs.api.RSClientPreferences;
import net.runelite.rs.api.RSClips;
import net.runelite.rs.api.RSCollisionMap;
import net.runelite.rs.api.RSDbRowType;
import net.runelite.rs.api.RSDbTable;
import net.runelite.rs.api.RSDbTableType;
import net.runelite.rs.api.RSDecimator;
import net.runelite.rs.api.RSDualNode;
import net.runelite.rs.api.RSEnumComposition;
import net.runelite.rs.api.RSEvictingDualNodeHashTable;
import net.runelite.rs.api.RSFloorOverlayDefinition;
import net.runelite.rs.api.RSFont;
import net.runelite.rs.api.RSFrames;
import net.runelite.rs.api.RSFriendSystem;
import net.runelite.rs.api.RSFriendsChat;
import net.runelite.rs.api.RSGameEngine;
import net.runelite.rs.api.RSGrandExchangeOffer;
import net.runelite.rs.api.RSIndexedSprite;
import net.runelite.rs.api.RSIntegerNode;
import net.runelite.rs.api.RSInterfaceParent;
import net.runelite.rs.api.RSItemComposition;
import net.runelite.rs.api.RSItemContainer;
import net.runelite.rs.api.RSIterableNodeHashTable;
import net.runelite.rs.api.RSKeyHandler;
import net.runelite.rs.api.RSLoginType;
import net.runelite.rs.api.RSMenuAction;
import net.runelite.rs.api.RSMessage;
import net.runelite.rs.api.RSModel;
import net.runelite.rs.api.RSModelData;
import net.runelite.rs.api.RSMouseRecorder;
import net.runelite.rs.api.RSMusicSong;
import net.runelite.rs.api.RSNPC;
import net.runelite.rs.api.RSNPCComposition;
import net.runelite.rs.api.RSNode;
import net.runelite.rs.api.RSNodeDeque;
import net.runelite.rs.api.RSNodeHashTable;
import net.runelite.rs.api.RSObjectComposition;
import net.runelite.rs.api.RSObjectNode;
import net.runelite.rs.api.RSObjectSound;
import net.runelite.rs.api.RSPacketBuffer;
import net.runelite.rs.api.RSParamComposition;
import net.runelite.rs.api.RSPcmStream;
import net.runelite.rs.api.RSPcmStreamMixer;
import net.runelite.rs.api.RSPlayer;
import net.runelite.rs.api.RSProjectile;
import net.runelite.rs.api.RSRawPcmStream;
import net.runelite.rs.api.RSRawSound;
import net.runelite.rs.api.RSRuneLiteClanMember;
import net.runelite.rs.api.RSRuneLiteMenuEntry;
import net.runelite.rs.api.RSScene;
import net.runelite.rs.api.RSSceneTilePaint;
import net.runelite.rs.api.RSScript;
import net.runelite.rs.api.RSScriptEvent;
import net.runelite.rs.api.RSSequenceDefinition;
import net.runelite.rs.api.RSSoundEffect;
import net.runelite.rs.api.RSSpotAnimationDefinition;
import net.runelite.rs.api.RSSpritePixels;
import net.runelite.rs.api.RSStructComposition;
import net.runelite.rs.api.RSTextureProvider;
import net.runelite.rs.api.RSTile;
import net.runelite.rs.api.RSTileItem;
import net.runelite.rs.api.RSUsername;
import net.runelite.rs.api.RSVarbitComposition;
import net.runelite.rs.api.RSVarcs;
import net.runelite.rs.api.RSVarpDefinition;
import net.runelite.rs.api.RSWidget;
import net.runelite.rs.api.RSWidgetDefinition;
import net.runelite.rs.api.RSWorld;
import net.runelite.rs.api.RSWorldMap;
import net.runelite.rs.api.RSWorldMapElement;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.sentry.Sentry;

public final class Client extends GameEngine implements Usernamed, OAuthApi, class322, RSClient {
   @ObfuscatedName("wb")
   @ObfuscatedSignature(
      descriptor = "Llk;"
   )
   static EvictingDualNodeHashTable archive11;
   @ObfuscatedName("wm")
   @ObfuscatedSignature(
      descriptor = "Llk;"
   )
   static EvictingDualNodeHashTable DBTableIndex_cache;
   @ObfuscatedName("vg")
   @ObfuscatedGetter(
      intValue = -1269216115
   )
   static int viewportOffsetX;
   @ObfuscatedName("vr")
   @ObfuscatedGetter(
      intValue = 1225799997
   )
   static int viewportOffsetY;
   @ObfuscatedName("vm")
   @ObfuscatedGetter(
      intValue = -1652855937
   )
   static int viewportHeight;
   @ObfuscatedName("wk")
   @ObfuscatedSignature(
      descriptor = "[Low;"
   )
   static GrandExchangeOffer[] grandExchangeOffers;
   @ObfuscatedName("vn")
   @ObfuscatedGetter(
      intValue = -655369499
   )
   static int viewportZoom;
   @ObfuscatedName("vu")
   @ObfuscatedGetter(
      intValue = -1682958733
   )
   static int viewportWidth;
   @ObfuscatedName("wi")
   @ObfuscatedGetter(
      intValue = -1604975679
   )
   public static int field783;
   @ObfuscatedName("wo")
   @ObfuscatedSignature(
      descriptor = "Lqc;"
   )
   static class435 field779;
   @ObfuscatedName("wv")
   @ObfuscatedSignature(
      descriptor = "Liy;"
   )
   static final class229 field673;
   @ObfuscatedName("xl")
   @ObfuscatedSignature(
      descriptor = "Lcm;"
   )
   static final ApproximateRouteStrategy field750;
   @ObfuscatedName("xn")
   static int[] field790;
   @ObfuscatedName("xf")
   static int[] field718;
   @ObfuscatedName("wl")
   @ObfuscatedGetter(
      intValue = 1907598029
   )
   static int field774;
   @ObfuscatedName("wq")
   @ObfuscatedSignature(
      descriptor = "Lnb;"
   )
   static PlayerComposition playerAppearance;
   @ObfuscatedName("ww")
   @ObfuscatedGetter(
      intValue = -1508952755
   )
   static int field720;
   @ObfuscatedName("xe")
   static ArrayList archiveLoaders;
   @ObfuscatedName("xd")
   @ObfuscatedGetter(
      intValue = 480920095
   )
   static int archiveLoadersDone;
   @ObfuscatedName("xi")
   @ObfuscatedGetter(
      intValue = 910334529
   )
   static int field645;
   @ObfuscatedName("wr")
   @ObfuscatedSignature(
      descriptor = "Lsz;"
   )
   static class487 field776;
   @ObfuscatedName("vt")
   static short field760;
   @ObfuscatedName("vd")
   static short field761;
   @ObfuscatedName("vp")
   static short field531;
   @ObfuscatedName("vb")
   static short field722;
   @ObfuscatedName("vk")
   static short field765;
   @ObfuscatedName("vs")
   static short field764;
   @ObfuscatedName("vi")
   static boolean[] field755;
   @ObfuscatedName("vo")
   static int[] field756;
   @ObfuscatedName("va")
   static int[] field704;
   @ObfuscatedName("vy")
   static int[] field758;
   @ObfuscatedName("vw")
   static int[] field728;
   @ObfuscatedName("vc")
   static short zoomHeight;
   @ObfuscatedName("vx")
   static short zoomWidth;
   @ObfuscatedName("wf")
   static List field500;
   @ObfuscatedName("wc")
   @ObfuscatedSignature(
      descriptor = "Lcn;"
   )
   static GrandExchangeOfferOwnWorldComparator GrandExchangeEvents_worldComparator;
   @ObfuscatedName("wh")
   @ObfuscatedGetter(
      intValue = 2077097019
   )
   static int field636;
   @ObfuscatedName("br")
   static boolean field729;
   @ObfuscatedName("bq")
   @ObfuscatedGetter(
      intValue = -1578693191
   )
   public static int worldId;
   @ObfuscatedName("cf")
   @ObfuscatedGetter(
      intValue = -863214713
   )
   static int worldProperties;
   @ObfuscatedName("cv")
   @ObfuscatedGetter(
      intValue = -1196057225
   )
   static int gameBuild;
   @ObfuscatedName("ce")
   public static boolean isMembersWorld;
   @ObfuscatedName("ci")
   static boolean isLowDetail;
   @ObfuscatedName("cs")
   @ObfuscatedGetter(
      intValue = 1519857313
   )
   static int field488;
   @ObfuscatedName("co")
   @ObfuscatedGetter(
      intValue = 243947283
   )
   static int clientType;
   @ObfuscatedName("cm")
   @ObfuscatedGetter(
      intValue = 1862855915
   )
   static int field490;
   @ObfuscatedName("cn")
   static boolean onMobile;
   @ObfuscatedName("cr")
   @ObfuscatedGetter(
      intValue = -2139283279
   )
   public static int revision;
   @ObfuscatedName("di")
   @ObfuscatedGetter(
      intValue = -1549345675
   )
   static int gameState;
   @ObfuscatedName("dk")
   static boolean field494;
   @ObfuscatedName("ec")
   static boolean isLoading;
   @ObfuscatedName("ew")
   @ObfuscatedGetter(
      intValue = 962758423
   )
   static int cycle;
   @ObfuscatedName("ex")
   @ObfuscatedGetter(
      longValue = -8142216681054424443L
   )
   static long mouseLastLastPressedTimeMillis;
   @ObfuscatedName("ek")
   @ObfuscatedGetter(
      intValue = 2093024465
   )
   static int field501;
   @ObfuscatedName("em")
   @ObfuscatedGetter(
      intValue = 22566591
   )
   static int field502;
   @ObfuscatedName("eo")
   @ObfuscatedGetter(
      longValue = 9058783913221914729L
   )
   static long field503;
   @ObfuscatedName("ef")
   static boolean hadFocus;
   @ObfuscatedName("el")
   @ObfuscatedGetter(
      intValue = 1125128507
   )
   static int rebootTimer;
   @ObfuscatedName("es")
   @ObfuscatedGetter(
      intValue = -289097033
   )
   static int hintArrowType;
   @ObfuscatedName("ea")
   @ObfuscatedGetter(
      intValue = -2096187297
   )
   static int hintArrowNpcIndex;
   @ObfuscatedName("en")
   @ObfuscatedGetter(
      intValue = 2023720801
   )
   static int hintArrowPlayerIndex;
   @ObfuscatedName("eh")
   @ObfuscatedGetter(
      intValue = -1822706211
   )
   static int hintArrowX;
   @ObfuscatedName("ei")
   @ObfuscatedGetter(
      intValue = -1244039727
   )
   static int hintArrowY;
   @ObfuscatedName("et")
   @ObfuscatedGetter(
      intValue = 1937960921
   )
   static int hintArrowHeight;
   @ObfuscatedName("er")
   @ObfuscatedGetter(
      intValue = -2021083795
   )
   static int hintArrowSubX;
   @ObfuscatedName("ez")
   static int hintArrowSubY;
   @ObfuscatedName("eg")
   @ObfuscatedSignature(
      descriptor = "Ldy;"
   )
   static AttackOption playerAttackOption;
   @ObfuscatedName("ey")
   @ObfuscatedSignature(
      descriptor = "Ldy;"
   )
   static AttackOption npcAttackOption;
   @ObfuscatedName("ed")
   static boolean renderSelf;
   @ObfuscatedName("fe")
   @ObfuscatedSignature(
      descriptor = "Lda;"
   )
   static class92 field517;
   @ObfuscatedName("fr")
   @ObfuscatedGetter(
      intValue = -588032653
   )
   static int js5ConnectState;
   @ObfuscatedName("fi")
   @ObfuscatedGetter(
      intValue = -1477360267
   )
   static int field791;
   @ObfuscatedName("gp")
   @ObfuscatedGetter(
      intValue = -1100594471
   )
   static int js5Errors;
   @ObfuscatedName("gn")
   @ObfuscatedGetter(
      intValue = -1129030311
   )
   static int loginState;
   @ObfuscatedName("gb")
   @ObfuscatedGetter(
      intValue = -761293713
   )
   static int field522;
   @ObfuscatedName("gu")
   @ObfuscatedGetter(
      intValue = 1521786269
   )
   static int field614;
   @ObfuscatedName("ga")
   @ObfuscatedGetter(
      intValue = 1849205089
   )
   static int field675;
   @ObfuscatedName("gf")
   @ObfuscatedSignature(
      descriptor = "Leb;"
   )
   static class124 field525;
   @ObfuscatedName("gx")
   @ObfuscatedSignature(
      descriptor = "Lus;"
   )
   static class531 field526;
   @ObfuscatedName("hc")
   static final String field537;
   @ObfuscatedName("ha")
   static final String field538;
   @ObfuscatedName("hn")
   static boolean Login_isUsernameRemembered;
   @ObfuscatedName("ic")
   @ObfuscatedSignature(
      descriptor = "Lcd;"
   )
   static SecureRandomFuture secureRandomFuture;
   @ObfuscatedName("ib")
   static byte[] randomDatData;
   @ObfuscatedName("iq")
   @ObfuscatedSignature(
      descriptor = "[Ldn;"
   )
   static NPC[] npcs;
   @ObfuscatedName("ia")
   @ObfuscatedGetter(
      intValue = -906746739
   )
   static int npcCount;
   @ObfuscatedName("iu")
   static int[] npcIndices;
   @ObfuscatedName("ij")
   @ObfuscatedGetter(
      intValue = -984446247
   )
   static int field637;
   @ObfuscatedName("il")
   static int[] field549;
   @ObfuscatedName("it")
   static String field767;
   @ObfuscatedName("ig")
   @ObfuscatedSignature(
      descriptor = "Lef;"
   )
   public static final PacketWriter packetWriter;
   @ObfuscatedName("ip")
   @ObfuscatedGetter(
      intValue = 355075581
   )
   static int logoutTimer;
   @ObfuscatedName("ii")
   static boolean hadNetworkError;
   @ObfuscatedName("ik")
   @ObfuscatedSignature(
      descriptor = "Lqn;"
   )
   static Timer timer;
   @ObfuscatedName("jf")
   static HashMap fontsMap;
   @ObfuscatedName("jm")
   @ObfuscatedGetter(
      intValue = 1992662775
   )
   static int field555;
   @ObfuscatedName("jy")
   @ObfuscatedGetter(
      intValue = 2146509421
   )
   static int field678;
   @ObfuscatedName("js")
   @ObfuscatedGetter(
      intValue = 2062057009
   )
   static int field521;
   @ObfuscatedName("ju")
   @ObfuscatedGetter(
      intValue = 1974863003
   )
   static int field558;
   @ObfuscatedName("jk")
   @ObfuscatedGetter(
      intValue = 666285399
   )
   static int field559;
   @ObfuscatedName("jx")
   @ObfuscatedSignature(
      descriptor = "[Liw;"
   )
   static CollisionMap[] collisionMaps;
   @ObfuscatedName("ja")
   static boolean isInInstance;
   @ObfuscatedName("jt")
   static int[][][] instanceChunkTemplates;
   @ObfuscatedName("kj")
   static final int[] field563;
   @ObfuscatedName("ks")
   @ObfuscatedGetter(
      intValue = -1774127427
   )
   static int graphicsCycle;
   @ObfuscatedName("kw")
   @ObfuscatedGetter(
      intValue = -1776115789
   )
   static int field565;
   @ObfuscatedName("kg")
   @ObfuscatedGetter(
      intValue = -570178499
   )
   static int field670;
   @ObfuscatedName("kl")
   @ObfuscatedGetter(
      intValue = 540973989
   )
   static int field567;
   @ObfuscatedName("kc")
   @ObfuscatedGetter(
      intValue = -785299787
   )
   static int field568;
   @ObfuscatedName("ka")
   static boolean field569;
   @ObfuscatedName("kb")
   @ObfuscatedGetter(
      intValue = -650496269
   )
   static int alternativeScrollbarWidth;
   @ObfuscatedName("lw")
   @ObfuscatedGetter(
      intValue = 1248624645
   )
   static int camAngleX;
   @ObfuscatedName("lj")
   @ObfuscatedGetter(
      intValue = -455128087
   )
   static int camAngleY;
   @ObfuscatedName("le")
   @ObfuscatedGetter(
      intValue = 1352056963
   )
   static int camAngleDY;
   @ObfuscatedName("lm")
   @ObfuscatedGetter(
      intValue = 299500625
   )
   static int camAngleDX;
   @ObfuscatedName("lz")
   @ObfuscatedGetter(
      intValue = -915258713
   )
   static int field548;
   @ObfuscatedName("lc")
   @ObfuscatedGetter(
      intValue = -1998128165
   )
   static int mouseCamClickedY;
   @ObfuscatedName("lb")
   @ObfuscatedGetter(
      intValue = -1814827049
   )
   static int oculusOrbState;
   @ObfuscatedName("lr")
   @ObfuscatedGetter(
      intValue = -469827945
   )
   static int camFollowHeight;
   @ObfuscatedName("ll")
   @ObfuscatedGetter(
      intValue = -2117744859
   )
   static int field579;
   @ObfuscatedName("la")
   @ObfuscatedGetter(
      intValue = -1967585531
   )
   static int field529;
   @ObfuscatedName("lx")
   @ObfuscatedGetter(
      intValue = -747448447
   )
   static int field763;
   @ObfuscatedName("lh")
   @ObfuscatedGetter(
      intValue = -203139789
   )
   static int oculusOrbNormalSpeed;
   @ObfuscatedName("li")
   @ObfuscatedGetter(
      intValue = 1910388411
   )
   static int oculusOrbSlowedSpeed;
   @ObfuscatedName("lq")
   @ObfuscatedGetter(
      intValue = 1574301625
   )
   public static int field584;
   @ObfuscatedName("ly")
   static boolean field585;
   @ObfuscatedName("ld")
   @ObfuscatedGetter(
      intValue = -1479145315
   )
   static int field523;
   @ObfuscatedName("lu")
   static boolean field587;
   @ObfuscatedName("lo")
   @ObfuscatedGetter(
      intValue = -909114115
   )
   static int field759;
   @ObfuscatedName("lg")
   @ObfuscatedGetter(
      intValue = -447515851
   )
   static int overheadTextCount;
   @ObfuscatedName("lt")
   @ObfuscatedGetter(
      intValue = 1790424759
   )
   static int overheadTextLimit;
   @ObfuscatedName("mb")
   static int[] overheadTextXs;
   @ObfuscatedName("md")
   static int[] overheadTextYs;
   @ObfuscatedName("my")
   static int[] overheadTextAscents;
   @ObfuscatedName("mk")
   static int[] overheadTextXOffsets;
   @ObfuscatedName("mi")
   static int[] overheadTextColors;
   @ObfuscatedName("mn")
   static int[] overheadTextEffects;
   @ObfuscatedName("mx")
   static int[][] field597;
   @ObfuscatedName("mv")
   static int[] overheadTextCyclesRemaining;
   @ObfuscatedName("mm")
   static String[] overheadText;
   @ObfuscatedName("mq")
   static int[][] tileLastDrawnActor;
   @ObfuscatedName("mf")
   @ObfuscatedGetter(
      intValue = -212258435
   )
   static int viewportDrawCount;
   @ObfuscatedName("mo")
   @ObfuscatedGetter(
      intValue = 2138989585
   )
   static int viewportTempX;
   @ObfuscatedName("mj")
   @ObfuscatedGetter(
      intValue = -190656905
   )
   static int viewportTempY;
   @ObfuscatedName("ms")
   @ObfuscatedGetter(
      intValue = -1690442785
   )
   static int mouseCrossX;
   @ObfuscatedName("mw")
   @ObfuscatedGetter(
      intValue = 1378067361
   )
   static int mouseCrossY;
   @ObfuscatedName("mu")
   @ObfuscatedGetter(
      intValue = -61447401
   )
   static int mouseCrossState;
   @ObfuscatedName("mt")
   @ObfuscatedGetter(
      intValue = 263783731
   )
   static int mouseCrossColor;
   @ObfuscatedName("ml")
   static boolean showMouseCross;
   @ObfuscatedName("ma")
   @ObfuscatedGetter(
      intValue = 1977190337
   )
   static int field736;
   @ObfuscatedName("mg")
   static boolean showLoadingMessages;
   @ObfuscatedName("mc")
   @ObfuscatedSignature(
      descriptor = "[Lds;"
   )
   static Player[] players;
   @ObfuscatedName("mp")
   @ObfuscatedGetter(
      intValue = 724172563
   )
   static int localPlayerIndex;
   @ObfuscatedName("mz")
   @ObfuscatedGetter(
      intValue = -1501940983
   )
   static int field754;
   @ObfuscatedName("nd")
   @ObfuscatedGetter(
      longValue = -2389555093516551195L
   )
   static long userId;
   @ObfuscatedName("nb")
   static boolean field615;
   @ObfuscatedName("np")
   @ObfuscatedGetter(
      intValue = -1022035151
   )
   static int drawPlayerNames;
   @ObfuscatedName("nc")
   @ObfuscatedGetter(
      intValue = -539073287
   )
   static int field617;
   @ObfuscatedName("na")
   static int[] field618;
   @ObfuscatedName("nh")
   static final int[] playerMenuOpcodes;
   @ObfuscatedName("ny")
   static String[] playerMenuActions;
   @ObfuscatedName("nu")
   static boolean[] playerOptionsPriorities;
   @ObfuscatedName("nx")
   static int[] defaultRotations;
   @ObfuscatedName("nj")
   @ObfuscatedGetter(
      intValue = -1508153399
   )
   static int combatTargetPlayerIndex;
   @ObfuscatedName("nf")
   @ObfuscatedSignature(
      descriptor = "[[[Lon;"
   )
   static NodeDeque[][][] groundItems;
   @ObfuscatedName("nk")
   @ObfuscatedSignature(
      descriptor = "Lon;"
   )
   static NodeDeque pendingSpawns;
   @ObfuscatedName("ns")
   @ObfuscatedSignature(
      descriptor = "Lon;"
   )
   static NodeDeque projectiles;
   @ObfuscatedName("nm")
   @ObfuscatedSignature(
      descriptor = "Lon;"
   )
   static NodeDeque graphicsObjects;
   @ObfuscatedName("nv")
   static int[] currentLevels;
   @ObfuscatedName("nt")
   static int[] levels;
   @ObfuscatedName("ne")
   static int[] experience;
   @ObfuscatedName("nz")
   static int[] field540;
   @ObfuscatedName("nl")
   static boolean leftClickOpensMenu;
   @ObfuscatedName("nr")
   static boolean isMenuOpen;
   @ObfuscatedName("oy")
   @ObfuscatedGetter(
      intValue = 1368885637
   )
   static int menuOptionsCount;
   @ObfuscatedName("ol")
   static int[] menuArguments1;
   @ObfuscatedName("oz")
   static int[] menuArguments2;
   @ObfuscatedName("ov")
   static int[] menuOpcodes;
   @ObfuscatedName("oq")
   static int[] menuIdentifiers;
   @ObfuscatedName("oo")
   static int[] menuItemIds;
   @ObfuscatedName("oa")
   static String[] menuActions;
   @ObfuscatedName("ou")
   static String[] menuTargets;
   @ObfuscatedName("om")
   static boolean[] menuShiftClick;
   @ObfuscatedName("og")
   static boolean followerOpsLowPriority;
   @ObfuscatedName("ob")
   static boolean tapToDrop;
   @ObfuscatedName("os")
   static boolean showMouseOverText;
   @ObfuscatedName("ot")
   @ObfuscatedGetter(
      intValue = 481752741
   )
   static int viewportX;
   @ObfuscatedName("oj")
   @ObfuscatedGetter(
      intValue = 1626319321
   )
   static int viewportY;
   @ObfuscatedName("oe")
   @ObfuscatedGetter(
      intValue = 757921443
   )
   static int field648;
   @ObfuscatedName("od")
   @ObfuscatedGetter(
      intValue = -1812084391
   )
   static int field768;
   @ObfuscatedName("on")
   @ObfuscatedGetter(
      intValue = -1413140383
   )
   static int isItemSelected;
   @ObfuscatedName("pm")
   static boolean isSpellSelected;
   @ObfuscatedName("ph")
   @ObfuscatedGetter(
      intValue = 1265673147
   )
   static int selectedSpellChildIndex;
   @ObfuscatedName("po")
   @ObfuscatedGetter(
      intValue = -565449129
   )
   static int selectedSpellItemId;
   @ObfuscatedName("pp")
   static String selectedSpellActionName;
   @ObfuscatedName("pb")
   static String selectedSpellName;
   @ObfuscatedName("pl")
   @ObfuscatedGetter(
      intValue = 1658925683
   )
   static int rootInterface;
   @ObfuscatedName("pz")
   @ObfuscatedSignature(
      descriptor = "Ltw;"
   )
   static NodeHashTable interfaceParents;
   @ObfuscatedName("ps")
   @ObfuscatedGetter(
      intValue = -1742450303
   )
   static int field659;
   @ObfuscatedName("pf")
   @ObfuscatedGetter(
      intValue = 982091517
   )
   static int field660;
   @ObfuscatedName("pv")
   @ObfuscatedGetter(
      intValue = -1324071041
   )
   static int chatEffects;
   @ObfuscatedName("px")
   @ObfuscatedSignature(
      descriptor = "Lnn;"
   )
   static Widget meslayerContinueWidget;
   @ObfuscatedName("pn")
   @ObfuscatedGetter(
      intValue = 213622459
   )
   static int runEnergy;
   @ObfuscatedName("pa")
   @ObfuscatedGetter(
      intValue = 1814135357
   )
   static int weight;
   @ObfuscatedName("pd")
   @ObfuscatedGetter(
      intValue = -896347093
   )
   public static int staffModLevel;
   @ObfuscatedName("pj")
   @ObfuscatedGetter(
      intValue = 1369038927
   )
   static int followerIndex;
   @ObfuscatedName("pi")
   static boolean playerMod;
   @ObfuscatedName("pq")
   @ObfuscatedSignature(
      descriptor = "Lnn;"
   )
   static Widget viewportWidget;
   @ObfuscatedName("pt")
   @ObfuscatedSignature(
      descriptor = "Lnn;"
   )
   static Widget clickedWidget;
   @ObfuscatedName("py")
   @ObfuscatedSignature(
      descriptor = "Lnn;"
   )
   static Widget clickedWidgetParent;
   @ObfuscatedName("qb")
   @ObfuscatedGetter(
      intValue = -1053586819
   )
   static int widgetClickX;
   @ObfuscatedName("qt")
   @ObfuscatedGetter(
      intValue = 568507323
   )
   static int widgetClickY;
   @ObfuscatedName("ql")
   @ObfuscatedSignature(
      descriptor = "Lnn;"
   )
   static Widget draggedOnWidget;
   @ObfuscatedName("qu")
   static boolean field674;
   @ObfuscatedName("qo")
   @ObfuscatedGetter(
      intValue = 1350248817
   )
   static int field554;
   @ObfuscatedName("qp")
   @ObfuscatedGetter(
      intValue = 950659321
   )
   static int field676;
   @ObfuscatedName("qy")
   static boolean field516;
   @ObfuscatedName("qq")
   @ObfuscatedGetter(
      intValue = 653531587
   )
   static int field533;
   @ObfuscatedName("qd")
   @ObfuscatedGetter(
      intValue = 483934473
   )
   static int field679;
   @ObfuscatedName("qn")
   static boolean isDraggingWidget;
   @ObfuscatedName("qr")
   @ObfuscatedGetter(
      intValue = -796191257
   )
   static int cycleCntr;
   @ObfuscatedName("qm")
   static int[] changedVarps;
   @ObfuscatedName("qv")
   @ObfuscatedGetter(
      intValue = -1725531237
   )
   static int changedVarpCount;
   @ObfuscatedName("qc")
   static int[] changedItemContainers;
   @ObfuscatedName("qe")
   @ObfuscatedGetter(
      intValue = -532017517
   )
   static int field685;
   @ObfuscatedName("qs")
   static int[] changedSkills;
   @ObfuscatedName("qz")
   @ObfuscatedGetter(
      intValue = -2093121121
   )
   static int changedSkillsCount;
   @ObfuscatedName("qh")
   static int[] field688;
   @ObfuscatedName("qi")
   @ObfuscatedGetter(
      intValue = 1767752687
   )
   static int field689;
   @ObfuscatedName("qk")
   @ObfuscatedGetter(
      intValue = -343622715
   )
   static int chatCycle;
   @ObfuscatedName("rm")
   @ObfuscatedGetter(
      intValue = 366761651
   )
   static int field747;
   @ObfuscatedName("rp")
   @ObfuscatedGetter(
      intValue = 1639645287
   )
   static int field692;
   @ObfuscatedName("rf")
   @ObfuscatedGetter(
      intValue = 654262707
   )
   static int field693;
   @ObfuscatedName("rn")
   @ObfuscatedGetter(
      intValue = -389268847
   )
   static int field588;
   @ObfuscatedName("rc")
   @ObfuscatedGetter(
      intValue = -1924930575
   )
   static int field551;
   @ObfuscatedName("rr")
   @ObfuscatedGetter(
      intValue = 892305799
   )
   static int field782;
   @ObfuscatedName("rh")
   @ObfuscatedGetter(
      intValue = -159332949
   )
   static int field697;
   @ObfuscatedName("ra")
   @ObfuscatedSignature(
      descriptor = "Lrx;"
   )
   static class466 field677;
   @ObfuscatedName("rg")
   @ObfuscatedGetter(
      intValue = -488483027
   )
   static int mouseWheelRotation;
   @ObfuscatedName("rk")
   @ObfuscatedSignature(
      descriptor = "Lut;"
   )
   static class544 field573;
   @ObfuscatedName("rl")
   @ObfuscatedSignature(
      descriptor = "Lon;"
   )
   static NodeDeque scriptEvents;
   @ObfuscatedName("rv")
   @ObfuscatedSignature(
      descriptor = "Lon;"
   )
   static NodeDeque scriptEvents2;
   @ObfuscatedName("ry")
   @ObfuscatedSignature(
      descriptor = "Lon;"
   )
   static NodeDeque scriptEvents3;
   @ObfuscatedName("rd")
   @ObfuscatedSignature(
      descriptor = "Lon;"
   )
   static NodeDeque field682;
   @ObfuscatedName("rb")
   @ObfuscatedSignature(
      descriptor = "Ltw;"
   )
   static NodeHashTable widgetFlags;
   @ObfuscatedName("rz")
   @ObfuscatedGetter(
      intValue = 1270662475
   )
   static int rootWidgetCount;
   @ObfuscatedName("rj")
   @ObfuscatedGetter(
      intValue = -193277661
   )
   static int field557;
   @ObfuscatedName("ri")
   static boolean[] validRootWidgets;
   @ObfuscatedName("ru")
   static boolean[] field785;
   @ObfuscatedName("rx")
   static boolean[] field515;
   @ObfuscatedName("rt")
   static int[] rootWidgetXs;
   @ObfuscatedName("sg")
   static int[] rootWidgetYs;
   @ObfuscatedName("sj")
   static int[] rootWidgetWidths;
   @ObfuscatedName("sr")
   static int[] rootWidgetHeights;
   @ObfuscatedName("sa")
   @ObfuscatedGetter(
      intValue = 1676430659
   )
   static int gameDrawingMode;
   @ObfuscatedName("si")
   @ObfuscatedGetter(
      longValue = -5976517433399259521L
   )
   static long field716;
   @ObfuscatedName("sd")
   static boolean isResizable;
   @ObfuscatedName("sn")
   static int[] field483;
   @ObfuscatedName("sw")
   @ObfuscatedGetter(
      intValue = 1686012707
   )
   static int publicChatMode;
   @ObfuscatedName("sy")
   @ObfuscatedGetter(
      intValue = 1585421373
   )
   static int tradeChatMode;
   @ObfuscatedName("sh")
   static String field694;
   @ObfuscatedName("sb")
   static long[] crossWorldMessageIds;
   @ObfuscatedName("sz")
   @ObfuscatedGetter(
      intValue = -738645525
   )
   static int crossWorldMessageIdsIndex;
   @ObfuscatedName("sp")
   @ObfuscatedSignature(
      descriptor = "Lil;"
   )
   public static class223 field724;
   @ObfuscatedName("sf")
   @ObfuscatedSignature(
      descriptor = "Lij;"
   )
   static class221 field725;
   @ObfuscatedName("sq")
   @ObfuscatedGetter(
      intValue = 1219207087
   )
   static int field726;
   @ObfuscatedName("so")
   static int[] field586;
   @ObfuscatedName("sl")
   static int[] field518;
   @ObfuscatedName("tn")
   @ObfuscatedGetter(
      longValue = -2398500741580166883L
   )
   static long field638;
   @ObfuscatedName("tp")
   @ObfuscatedSignature(
      descriptor = "[Lfc;"
   )
   static ClanSettings[] currentClanSettings;
   @ObfuscatedName("tw")
   @ObfuscatedSignature(
      descriptor = "[Lgn;"
   )
   static ClanChannel[] currentClanChannels;
   @ObfuscatedName("tq")
   @ObfuscatedGetter(
      intValue = 1069400751
   )
   static int field601;
   @ObfuscatedName("ts")
   @ObfuscatedGetter(
      intValue = 819467357
   )
   static int mapIconCount;
   @ObfuscatedName("tt")
   static int[] mapIconXs;
   @ObfuscatedName("tg")
   static int[] mapIconYs;
   @ObfuscatedName("to")
   @ObfuscatedSignature(
      descriptor = "[Luz;"
   )
   static SpritePixels[] mapIcons;
   @ObfuscatedName("tr")
   @ObfuscatedGetter(
      intValue = 1769781979
   )
   static int destinationX;
   @ObfuscatedName("tx")
   @ObfuscatedGetter(
      intValue = -313105013
   )
   static int destinationY;
   @ObfuscatedName("ta")
   @ObfuscatedGetter(
      intValue = -1359162591
   )
   static int minimapState;
   @ObfuscatedName("tj")
   static boolean playingJingle;
   @ObfuscatedName("ue")
   @ObfuscatedGetter(
      intValue = -128069645
   )
   static int soundEffectCount;
   @ObfuscatedName("ug")
   static int[] soundEffectIds;
   @ObfuscatedName("ui")
   static int[] queuedSoundEffectLoops;
   @ObfuscatedName("uv")
   static int[] queuedSoundEffectDelays;
   @ObfuscatedName("uo")
   static int[] soundLocations;
   @ObfuscatedName("uj")
   @ObfuscatedSignature(
      descriptor = "[Lbo;"
   )
   static SoundEffect[] soundEffects;
   @ObfuscatedName("uq")
   static boolean isCameraLocked;
   @ObfuscatedName("ur")
   static boolean field748;
   @ObfuscatedName("ux")
   static boolean field749;
   @ObfuscatedName("uw")
   static boolean field661;
   @ObfuscatedName("ub")
   @ObfuscatedSignature(
      descriptor = "Lsq;"
   )
   static class491 field751;
   @ObfuscatedName("uy")
   @ObfuscatedSignature(
      descriptor = "Lsm;"
   )
   static class490 field752;
   @ObfuscatedName("ut")
   @ObfuscatedSignature(
      descriptor = "Lsm;"
   )
   static class490 field672;
   @ObfuscatedName("un")
   static boolean field482;
   public static int inventoryDragDelay;
   public static boolean rl$minimapZoom;
   public static int tickCount;
   public static boolean interpolatePlayerAnimations;
   public static boolean interpolateNpcAnimations;
   public static boolean interpolateObjectAnimations;
   public static boolean interpolateWidgetAnimations;
   public static RSTileItem lastItemDespawn;
   public static boolean stretchedFast;
   public static boolean stretchedKeepAspectRatio;
   public static boolean stretchedEnabled;
   public static boolean rl$minimapReceivesClicks;
   public static double rl$minimapZoomValue;
   public static boolean unlockedFps;
   public static boolean stretchedIntegerScaling;
   public static boolean hideFriendCastOptions;
   public static boolean hideClanmateCastOptions;
   public static Set unhiddenCasts;
   public static boolean musicVolumeDesync;
   public static boolean shouldRenderLoginScreenFire;
   public static double scalingFactor;
   public static boolean invertPitch;
   public static boolean hdMinimapEnabled;
   public static boolean invertYaw;
   public static boolean hideDisconnect;
   public static final int[] rl$modelViewportXs;
   public static RSArchive[] archives;
   public static Dimension cachedStretchedDimensions;
   public static int skyboxColor;
   public static boolean hideFriendAttackOptions;
   public static double tmpCamAngleY;
   public static final Map widgetSpriteOverrides;
   public static net.runelite.api.SpritePixels loginScreenBackground;
   public static boolean printMenuActions;
   public static int tmpMenuOptionsCount;
   public static final Map spriteOverrides;
   public static Logger rl$logger;
   public static boolean hideClanmateAttackOptions;
   public static Dimension cachedRealDimensions;
   public static RSScriptEvent rootScriptEvent;
   public static int idleTimeout;
   public static Map varbitsMap;
   public static boolean allWidgetsAreOpTargetable;
   public static boolean pitchRelaxEnabled;
   public static BigInteger modulus;
   public static RSScript currentScript;
   public static final boolean $assertionsDisabled;
   public static final RSRuneLiteMenuEntry[] rl$menuEntries;
   public static Map complianceMap;
   public static boolean oldIsResized;
   public static final int[] rl$modelViewportYs;
   public static double tmpCamAngleX;
   public static ArrayList widgetItems;
   public static int currentScriptPC;
   public static int lastSoundEffectCount;
   public static int lastPitch;
   public static int viewportColor;
   public static volatile int idleCycles;
   public static volatile long lastActivityNanos;
   public static int lastPitchTarget;
   public static RSPlayer[] oldPlayers;
   public static int[] oldVarps;
   public static RSActor lastSoundEffectSourceActor;
   public static final Map customClientScripts;
   public static ArrayList hiddenWidgets;
   @ObfuscatedName("hb")
   String field527;
   @ObfuscatedName("hp")
   @ObfuscatedSignature(
      descriptor = "Lay;"
   )
   class14 field528;
   @ObfuscatedName("hl")
   @ObfuscatedSignature(
      descriptor = "Laq;"
   )
   class18 field657;
   @ObfuscatedName("hi")
   OtlTokenRequester field530;
   @ObfuscatedName("hq")
   Future field605;
   @ObfuscatedName("hf")
   boolean field532;
   @ObfuscatedName("hw")
   @ObfuscatedGetter(
      intValue = -1106066733
   )
   int field545;
   @ObfuscatedName("hj")
   @ObfuscatedSignature(
      descriptor = "Laq;"
   )
   class18 field611;
   @ObfuscatedName("hg")
   RefreshAccessTokenRequester field535;
   @ObfuscatedName("hk")
   Future field536;
   @ObfuscatedName("if")
   @ObfuscatedSignature(
      descriptor = "Luj;"
   )
   Buffer field702;
   @ObfuscatedName("is")
   @ObfuscatedSignature(
      descriptor = "Lac;"
   )
   class7 field542;
   @ObfuscatedName("im")
   @ObfuscatedGetter(
      longValue = -3042549022967002225L
   )
   long accountHash;
   public DrawCallbacks drawCallbacks;
   public int expandedMapLoadingChunks;
   public int gpuFlags;
   public boolean isMirrored;
   public long delayNanoTime;
   public List outdatedScripts;
   public Integer comparingAppearance;
   public RSEvictingDualNodeHashTable tmpModelDataCache;
   public File credentialsFile;
   public boolean storeCredentials;
   @Inject
   public Callbacks callbacks;
   public Properties credentialsProperties;
   @Inject
   @Named("runeLiteDir")
   public File runeLiteDir;
   public final Cache enumCache;
   public Cache varbitCache;
   public long lastNanoTime;
   @Inject
   @Named("insecureWriteCredentials")
   public boolean insecureWriteCredentials;

   static {
      field729 = true;
      worldId = 1;
      worldProperties = 0;
      gameBuild = 0;
      isMembersWorld = false;
      isLowDetail = false;
      field488 = -1;
      clientType = -1;
      field490 = -1;
      onMobile = false;
      revision = 218;
      gameState = 0;
      field494 = false;
      isLoading = true;
      cycle = 0;
      mouseLastLastPressedTimeMillis = 1L;
      field501 = -1;
      field502 = -1;
      field503 = -1L;
      hadFocus = true;
      rebootTimer = 0;
      hintArrowType = 0;
      hintArrowNpcIndex = 0;
      hintArrowPlayerIndex = 0;
      hintArrowX = 0;
      hintArrowY = 0;
      hintArrowHeight = 0;
      hintArrowSubX = 0;
      hintArrowSubY = 0;
      playerAttackOption = AttackOption.AttackOption_hidden;
      npcAttackOption = AttackOption.AttackOption_hidden;
      renderSelf = false;
      field517 = class92.field1136;
      js5ConnectState = 0;
      field791 = 0;
      js5Errors = 0;
      loginState = 0;
      field522 = 0;
      field614 = 0;
      field675 = 0;
      field525 = class124.field1470;
      field526 = class531.field5197;
      int var1 = "com_jagex_auth_desktop_osrs:public".length();
      byte[] var2 = new byte[var1];

      int var3;
      char var4;
      for(var3 = 0; var3 < var1; ++var3) {
         var4 = "com_jagex_auth_desktop_osrs:public".charAt(var3);
         if(var4 > 127) {
            var2[var3] = 63;
         } else {
            var2[var3] = (byte)var4;
         }
      }

      field537 = class415.method7821_base(var2);
      var1 = "com_jagex_auth_desktop_runelite:public".length();
      var2 = new byte[var1];

      for(var3 = 0; var3 < var1; ++var3) {
         var4 = "com_jagex_auth_desktop_runelite:public".charAt(var3);
         if(var4 > 127) {
            var2[var3] = 63;
         } else {
            var2[var3] = (byte)var4;
         }
      }

      field538 = class415.method7821_base(var2);
      Login_isUsernameRemembered = false;
      secureRandomFuture = new SecureRandomFuture();
      randomDatData = null;
      npcs = new NPC[65536];
      npcCount = 0;
      npcIndices = new int[65536];
      field637 = 0;
      field549 = new int[250];
      packetWriter = new PacketWriter();
      logoutTimer = 0;
      hadNetworkError = false;
      timer = new Timer();
      fontsMap = new HashMap();
      field555 = 0;
      field678 = 1;
      field521 = 0;
      field558 = 1;
      field559 = 0;
      collisionMaps = new CollisionMap[4];
      isInInstance = false;
      instanceChunkTemplates = new int[4][13][13];
      field563 = new int[]{0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3};
      graphicsCycle = 0;
      field565 = 2301979;
      field670 = 5063219;
      field567 = 3353893;
      field568 = 7759444;
      field569 = false;
      alternativeScrollbarWidth = 0;
      camAngleX = 128;
      camAngleY = 0;
      camAngleDY = 0;
      camAngleDX = 0;
      field548 = 0;
      mouseCamClickedY = 0;
      oculusOrbState = 0;
      camFollowHeight = 50;
      field579 = 0;
      field529 = 0;
      field763 = 0;
      oculusOrbNormalSpeed = 12;
      oculusOrbSlowedSpeed = 6;
      field584 = 0;
      field585 = false;
      field523 = 0;
      field587 = false;
      field759 = 0;
      overheadTextCount = 0;
      overheadTextLimit = 50;
      overheadTextXs = new int[overheadTextLimit];
      overheadTextYs = new int[overheadTextLimit];
      overheadTextAscents = new int[overheadTextLimit];
      overheadTextXOffsets = new int[overheadTextLimit];
      overheadTextColors = new int[overheadTextLimit];
      overheadTextEffects = new int[overheadTextLimit];
      field597 = new int[overheadTextLimit][];
      overheadTextCyclesRemaining = new int[overheadTextLimit];
      overheadText = new String[overheadTextLimit];
      tileLastDrawnActor = new int[104][104];
      viewportDrawCount = 0;
      viewportTempX = -1;
      viewportTempY = -1;
      mouseCrossX = 0;
      mouseCrossY = 0;
      mouseCrossState = 0;
      mouseCrossColor = 0;
      showMouseCross = true;
      field736 = 0;
      showLoadingMessages = true;
      players = new Player[2048];
      localPlayerIndex = -1;
      field754 = 0;
      userId = -1L;
      field615 = true;
      drawPlayerNames = 0;
      field617 = 0;
      field618 = new int[1000];
      playerMenuOpcodes = new int[]{44, 45, 46, 47, 48, 49, 50, 51};
      playerMenuActions = new String[8];
      playerOptionsPriorities = new boolean[8];
      defaultRotations = new int[]{768, 1024, 1280, 512, 1536, 256, 0, 1792};
      combatTargetPlayerIndex = -1;
      groundItems = new NodeDeque[4][104][104];
      pendingSpawns = new NodeDeque();
      projectiles = new NodeDeque();
      graphicsObjects = new NodeDeque();
      currentLevels = new int[25];
      levels = new int[25];
      experience = new int[25];
      field540 = new int[25];
      leftClickOpensMenu = false;
      isMenuOpen = false;
      menuOptionsCount = 0;
      menuArguments1 = new int[500];
      menuArguments2 = new int[500];
      menuOpcodes = new int[500];
      menuIdentifiers = new int[500];
      menuItemIds = new int[500];
      menuActions = new String[500];
      menuTargets = new String[500];
      menuShiftClick = new boolean[500];
      followerOpsLowPriority = false;
      tapToDrop = false;
      showMouseOverText = true;
      viewportX = -1;
      viewportY = -1;
      field648 = 0;
      field768 = 50;
      isItemSelected = 0;
      field767 = null;
      isSpellSelected = false;
      selectedSpellChildIndex = -1;
      selectedSpellItemId = -1;
      selectedSpellActionName = null;
      selectedSpellName = null;
      rootInterface = -1;
      interfaceParents = new NodeHashTable(8);
      field659 = 0;
      field660 = -1;
      chatEffects = 0;
      meslayerContinueWidget = null;
      runEnergy = 0;
      weight = 0;
      staffModLevel = 0;
      followerIndex = -1;
      playerMod = false;
      viewportWidget = null;
      clickedWidget = null;
      clickedWidgetParent = null;
      widgetClickX = 0;
      widgetClickY = 0;
      draggedOnWidget = null;
      field674 = false;
      field554 = -1;
      field676 = -1;
      field516 = false;
      field533 = -1;
      field679 = -1;
      isDraggingWidget = false;
      cycleCntr = 1;
      changedVarps = new int[32];
      changedVarpCount = 0;
      changedItemContainers = new int[32];
      field685 = 0;
      changedSkills = new int[32];
      changedSkillsCount = 0;
      field688 = new int[32];
      field689 = 0;
      chatCycle = 0;
      field747 = 0;
      field692 = 0;
      field693 = 0;
      field588 = 0;
      field551 = 0;
      field782 = 0;
      field697 = 0;
      mouseWheelRotation = 0;
      field573 = new class544();
      scriptEvents = new NodeDeque();
      scriptEvents2 = new NodeDeque();
      scriptEvents3 = new NodeDeque();
      field682 = new NodeDeque();
      widgetFlags = new NodeHashTable(512);
      rootWidgetCount = 0;
      field557 = -2;
      validRootWidgets = new boolean[100];
      field785 = new boolean[100];
      field515 = new boolean[100];
      rootWidgetXs = new int[100];
      rootWidgetYs = new int[100];
      rootWidgetWidths = new int[100];
      rootWidgetHeights = new int[100];
      gameDrawingMode = 0;
      gameDrawingMode = -942105978;
      field716 = 0L;
      isResizable = true;
      field483 = new int[]{16776960, 16711680, 65280, 65535, 16711935, 16777215};
      publicChatMode = 0;
      tradeChatMode = 0;
      field694 = "";
      crossWorldMessageIds = new long[100];
      crossWorldMessageIdsIndex = 0;
      field724 = new class223();
      field725 = new class221();
      field726 = 0;
      field586 = new int[128];
      field518 = new int[128];
      field638 = -1L;
      currentClanSettings = new ClanSettings[4];
      currentClanChannels = new ClanChannel[4];
      field601 = -1;
      mapIconCount = 0;
      mapIconXs = new int[1000];
      mapIconYs = new int[1000];
      mapIcons = new SpritePixels[1000];
      destinationX = 0;
      destinationY = 0;
      minimapState = 0;
      playingJingle = false;
      soundEffectCount = 0;
      soundEffectIds = new int[50];
      queuedSoundEffectLoops = new int[50];
      queuedSoundEffectDelays = new int[50];
      soundLocations = new int[50];
      soundEffects = new SoundEffect[50];
      isCameraLocked = false;
      field748 = false;
      field749 = false;
      field661 = false;
      field751 = null;
      field752 = null;
      field672 = null;
      field482 = false;
      field755 = new boolean[5];
      field756 = new int[5];
      field704 = new int[5];
      field758 = new int[5];
      field728 = new int[5];
      field760 = 256;
      field761 = 205;
      zoomHeight = 256;
      zoomWidth = 320;
      field764 = 1;
      field765 = 32767;
      field531 = 1;
      field722 = 32767;
      viewportOffsetX = 0;
      viewportOffsetY = 0;
      viewportWidth = 0;
      viewportHeight = 0;
      viewportZoom = 0;
      playerAppearance = new PlayerComposition();
      field774 = -1;
      field720 = -1;
      field776 = new DesktopPlatformInfoProvider();
      grandExchangeOffers = new GrandExchangeOffer[8];
      GrandExchangeEvents_worldComparator = new GrandExchangeOfferOwnWorldComparator();
      field779 = new class435(8, class433.field4645);
      DBTableIndex_cache = new EvictingDualNodeHashTable(64);
      archive11 = new EvictingDualNodeHashTable(64);
      field636 = -1;
      field783 = -1;
      field500 = new ArrayList();
      field673 = new class229();
      archiveLoaders = new ArrayList(10);
      archiveLoadersDone = 0;
      field645 = 0;
      field750 = new ApproximateRouteStrategy();
      field790 = new int[50];
      field718 = new int[50];
      pitchRelaxEnabled = false;
      lastPitch = 128;
      lastPitchTarget = 128;
      rl$modelViewportXs = new int[4700];
      rl$modelViewportYs = new int[4700];
      complianceMap = new HashMap();
      $assertionsDisabled = !Client.class.desiredAssertionStatus();
      shouldRenderLoginScreenFire = true;
      rl$minimapReceivesClicks = true;
      rl$minimapZoomValue = 4.0D;
      rl$logger = LoggerFactory.getLogger("mapped-client");
      oldPlayers = new Player[2048];
      hideDisconnect = false;
      hideFriendAttackOptions = false;
      hideClanmateAttackOptions = false;
      hideFriendCastOptions = false;
      hideClanmateCastOptions = false;
      allWidgetsAreOpTargetable = false;
      unhiddenCasts = new HashSet();
      widgetItems = new ArrayList();
      hiddenWidgets = new ArrayList();
      rl$menuEntries = new RuneLiteMenuEntry[500];
      customClientScripts = new HashMap();
      archives = new Archive[21];
      idleTimeout = 15000;
      lastActivityNanos = System.nanoTime();
      spriteOverrides = new HashMap();
      widgetSpriteOverrides = new HashMap();
   }

   public static io.sentry.protocol.User sentryUser = new io.sentry.protocol.User();

   public Client() {
      this.field532 = false;
      this.field545 = 0;
      this.accountHash = -1L;
      this.onAccountHashChanged(-1);
      this.enumCache = CacheBuilder.newBuilder().maximumSize(64L).build();
      this.isMirrored = false;
      this.comparingAppearance = Integer.valueOf(0);
      this.tmpModelDataCache = this.newEvictingDualNodeHashTable(16);
      this.outdatedScripts = new ArrayList();
      this.rl$$init1();

      sentryUser.setIpAddress("{{auto}}");
      Sentry.setUser(sentryUser);
   }

   @ObfuscatedName("ak")
   @ObfuscatedSignature(
      descriptor = "(B)V",
      garbageValue = "101"
   )
   protected final void resizeGame_base() {
      field716 = SpotAnimationDefinition.method3775_base() + 500L;
      this.resizeJS_base();
      if(rootInterface != -1) {
         this.method1290_base(true);
      }

   }

   @ObfuscatedName("bm")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-550390769"
   )
   protected final void setUp_base() {
      class4.method20_base(new int[]{20, 260, 10000}, new int[]{1000, 100, 500});
      WorldMapCacheName.worldPort = gameBuild == 0?43594:worldId + 40000;
      AbstractSocket.js5Port = gameBuild == 0?9999:worldId + 50000;
      class252.currentPort = WorldMapCacheName.worldPort;
      WorldMapLabelSize.field2440 = class342.field3642;
      class90.field1094 = class342.field3641;
      class503.field5015 = class342.field3643;
      PlayerComposition.field3606 = class342.field3640;
      class60.urlRequester = new class113(this.field532, 218);
      this.setUpKeyboard_base();
      this.method506_base();
      class396.mouseWheel = this.mouseWheel_base();
      this.method505_base(field725, 0);
      this.method505_base(field724, 1);
      this.setUpClipboard_base();
      class302.masterDisk = new ArchiveDisk(255, JagexCache.JagexCache_dat2File, JagexCache.JagexCache_idx255File, 500000);
      AccessFile var2 = null;
      ClientPreferences var3 = new ClientPreferences();

      try {
         var2 = class131.method3099("", Messages.field1401.name, false);
         byte[] var4 = new byte[(int)var2.length_base()];

         int var6;
         for(int var5 = 0; var5 < var4.length; var5 += var6) {
            var6 = var2.read_base(var4, var5, var4.length - var5);
            if(var6 == -1) {
               throw new IOException();
            }
         }

         var3 = new ClientPreferences(new Buffer(var4));
      } catch (Exception var8) {
         ;
      }

      try {
         if(var2 != null) {
            var2.close_base();
         }
      } catch (Exception var7) {
         ;
      }

      WorldMapIcon_1.clientPreferences = var3;
      class27.method445_base(this, class14.field67);
      class9.setWindowedMode_base(WorldMapIcon_1.clientPreferences.method2564_base());
      class12.friendSystem = new FriendSystem(class89.loginType);
      this.field528 = new class14("tokenRequest", 1, 1);
      if(!class316.field3420.contains(this)) {
         class316.field3420.add(this);
      }

      field673.method4440_base();
   }

   @ObfuscatedName("bp")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "564244601"
   )
   protected final void doCycle_base() {
      this.doCycle();
      ++cycle;
      this.doCycleJs5_base();

      while(true) {
         NodeDeque var2 = ArchiveDiskActionHandler.ArchiveDiskActionHandler_requestQueue;
         ArchiveDiskAction var1;
         synchronized(ArchiveDiskActionHandler.ArchiveDiskActionHandler_requestQueue) {
            var1 = (ArchiveDiskAction)ArchiveDiskActionHandler.ArchiveDiskActionHandler_responseQueue.method7231();
         }

         if(var1 == null) {
            boolean var5 = class516.method9145_base();
            if(var5 && playingJingle && MusicPatchPcmStream.pcmPlayer1 != null) {
               MusicPatchPcmStream.pcmPlayer1.tryDiscard_base();
            }

            class102.method2728_base();
            field724.method4313_base();
            this.method567_base();
            MouseHandler var9 = MouseHandler.MouseHandler_instance;
            synchronized(MouseHandler.MouseHandler_instance) {
               MouseHandler.MouseHandler_currentButton = MouseHandler.MouseHandler_currentButtonVolatile;
               MouseHandler.MouseHandler_x = MouseHandler.MouseHandler_xVolatile;
               MouseHandler.MouseHandler_y = MouseHandler.MouseHandler_yVolatile;
               MouseHandler.MouseHandler_millis = MouseHandler.MouseHandler_lastMovedVolatile;
               MouseHandler.MouseHandler_lastButton = MouseHandler.MouseHandler_lastButtonVolatile;
               MouseHandler.MouseHandler_lastPressedX = MouseHandler.MouseHandler_lastPressedXVolatile;
               MouseHandler.MouseHandler_lastPressedY = MouseHandler.MouseHandler_lastPressedYVolatile;
               MouseHandler.MouseHandler_lastPressedTimeMillis = MouseHandler.MouseHandler_lastPressedTimeMillisVolatile;
               MouseHandler.MouseHandler_lastButtonVolatile = 0;
            }

            if(class396.mouseWheel != null) {
               int var6 = class396.mouseWheel.useRotation_base();
               mouseWheelRotation = var6;
            }

            if(gameState == 0) {
               WorldMapCacheName.method5005_base();
               WorldMapRenderer.method4746_base();
            } else if(gameState == 5) {
               Actor.method2496(this, class369.fontPlain11, ItemLayer.fontPlain12);
               WorldMapCacheName.method5005_base();
               WorldMapRenderer.method4746_base();
            } else if(gameState != 10 && gameState != 11) {
               if(gameState == 20) {
                  Actor.method2496(this, class369.fontPlain11, ItemLayer.fontPlain12);
                  this.doCycleLoggedOut_base();
               } else if(gameState == 50) {
                  Actor.method2496(this, class369.fontPlain11, ItemLayer.fontPlain12);
                  this.doCycleLoggedOut_base();
               } else if(gameState == 25) {
                  ModeWhere.method7205_base();
               }
            } else {
               Actor.method2496(this, class369.fontPlain11, ItemLayer.fontPlain12);
            }

            if(gameState == 30) {
               this.doCycleLoggedIn_base();
            } else if(gameState == 40 || gameState == 45) {
               this.doCycleLoggedOut_base();
            }

            this.doCycleEnd();
            return;
         }

         var1.archive.method6907(var1.archiveDisk, (int)var1.key, var1.data, false);
      }
   }

   @ObfuscatedName("bw")
   @ObfuscatedSignature(
      descriptor = "(ZI)V",
      garbageValue = "-851092167"
   )
   protected final void draw_base(boolean var1) {
      this.callbacks.frame();
      this.updateCamera();
      this.copy$draw(var1, -851092167);
      checkResize();
   }

   @ObfuscatedName("bj")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "1863199463"
   )
   protected final void kill0_base() {
      if(class176.varcs.hasUnwrittenChanges_base()) {
         class176.varcs.write_base();
      }

      if(Message.mouseRecorder != null) {
         Message.mouseRecorder.isRunning = false;
      }

      Message.mouseRecorder = null;
      packetWriter.close_base();
      if(MouseHandler.MouseHandler_instance != null) {
         MouseHandler var1 = MouseHandler.MouseHandler_instance;
         synchronized(MouseHandler.MouseHandler_instance) {
            MouseHandler.MouseHandler_instance = null;
         }
      }

      class396.mouseWheel = null;
      if(MusicPatchPcmStream.pcmPlayer1 != null) {
         MusicPatchPcmStream.pcmPlayer1.shutdown_base();
      }

      WorldMapSectionType.field2556.method7049_base();
      class227.method4406_base();
      if(class60.urlRequester != null) {
         class60.urlRequester.close_base();
         class60.urlRequester = null;
      }

      HealthBarDefinition.method3654_base();
      this.field528.method179_base();
   }

   @ObfuscatedName("bc")
   @ObfuscatedSignature(
      descriptor = "(B)V",
      garbageValue = "-94"
   )
   protected final void vmethod1353_base() {
   }

   @ObfuscatedName("gv")
   @ObfuscatedSignature(
      descriptor = "(I)Z",
      garbageValue = "2071645038"
   )
   boolean method1263_base() {
      return this.field545 == 1;
   }

   @ObfuscatedName("gc")
   @ObfuscatedSignature(
      descriptor = "(S)Z",
      garbageValue = "-22117"
   )
   boolean containsAccessAndRefreshToken_base() {
      return Messages.accessToken != null && !Messages.accessToken.trim().isEmpty() && ObjectComposition.refreshToken != null && !ObjectComposition.refreshToken.trim().isEmpty();
   }

   @ObfuscatedName("gr")
   @ObfuscatedSignature(
      descriptor = "(B)Z",
      garbageValue = "74"
   )
   boolean containsSessionAndCharacterId_base() {
      return class369.sessionId != null && !class369.sessionId.trim().isEmpty() && InterfaceParent.characterId != null && !InterfaceParent.characterId.trim().isEmpty();
   }

   @ObfuscatedName("gk")
   @ObfuscatedSignature(
      descriptor = "(I)Z",
      garbageValue = "-1304458364"
   )
   boolean method1347_base() {
      return this.field530 != null;
   }

   @ObfuscatedName("go")
   @ObfuscatedSignature(
      descriptor = "(Ljava/lang/String;I)V",
      garbageValue = "-191398087"
   )
   void method1268_base(String var1) throws IOException {
      HashMap var2 = new HashMap();
      var2.put("grant_type", "refresh_token");
      var2.put("scope", "gamesso.token.create");
      var2.put("refresh_token", var1);
      URL var3 = new URL(class314.field3401 + "shield/oauth/token" + (new class475(var2)).method8589_base());
      class431 var4 = new class431();
      if(this.method1263_base()) {
         var4.method7957_base(field538);
      } else {
         var4.method7957_base(field537);
      }

      var4.method7954_base("Host", (new URL(class314.field3401)).getHost());
      var4.method7961_base(class472.field4810);
      class9 var5 = class9.field33;
      RefreshAccessTokenRequester var6 = this.field535;
      if(var6 != null) {
         this.field536 = var6.request(var5.method75_base(), var3, var4.method7953_base(), "");
      } else {
         class10 var7 = new class10(var3, var5, var4, this.field532);
         this.field611 = this.field528.method181_base(var7);
      }
   }

   @ObfuscatedName("gh")
   @ObfuscatedSignature(
      descriptor = "(Ljava/lang/String;B)V",
      garbageValue = "-43"
   )
   void method1386_base(String var1) throws IOException {
      URL var2 = new URL(class314.field3401 + "public/v1/games/YCfdbvr2pM1zUYMxJRexZY/play");
      class431 var3 = new class431();
      var3.method7977_base(var1);
      class9 var4 = class9.field31;
      OtlTokenRequester var5 = this.field530;
      if(var5 != null) {
         this.field605 = var5.request(var4.method75_base(), var2, var3.method7953_base(), "");
      } else {
         class10 var6 = new class10(var2, var4, var3, this.field532);
         this.field657 = this.field528.method181_base(var6);
      }
   }

   @ObfuscatedName("gd")
   @ObfuscatedSignature(
      descriptor = "(Ljava/lang/String;Ljava/lang/String;I)V",
      garbageValue = "169401816"
   )
   void method1270_base(String var1, String var2) throws IOException, JSONException {
      URL var3 = new URL(FriendsChat.field4677 + "game-session/v1/tokens");
      class10 var4 = new class10(var3, class9.field33, this.field532);
      var4.method95_base().method7977_base(var1);
      var4.method95_base().method7961_base(class472.field4810);
      JSONObject var5 = new JSONObject();
      var5.put("accountId", var2);
      var4.method92_base(new class474(var5));
      this.field657 = this.field528.method181_base(var4);
   }

   @ObfuscatedName("hi")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "121204254"
   )
   void doCycleJs5_base() {
      if(gameState != 1000) {
         boolean var1 = WorldMapSectionType.field2556.method7044_base();
         if(!var1) {
            this.method1276_base();
         }

      }
   }

   @ObfuscatedName("hq")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1703369019"
   )
   void method1276_base() {
      if(WorldMapSectionType.field2556.field4343 >= 4) {
         this.error_base("js5crc");
         WorldMapSection2.updateGameState_base(1000);
      } else {
         if(WorldMapSectionType.field2556.field4327 >= 4) {
            if(gameState <= 5) {
               this.error_base("js5io");
               WorldMapSection2.updateGameState_base(1000);
               return;
            }

            field791 = 3000;
            WorldMapSectionType.field2556.field4327 = 3;
         }

         if(--field791 + 1 <= 0) {
            try {
               if(js5ConnectState == 0) {
                  class101.js5SocketTask = GameEngine.taskHandler.method4185(RSPSConstants.JS5_IP, RSPSConstants.JS5_PORT);
                  ++js5ConnectState;
               }

               if(js5ConnectState == 1) {
                  if(class101.js5SocketTask.status == 2) {
                     this.js5Error_base(-1);
                     return;
                  }

                  if(class101.js5SocketTask.status == 1) {
                     ++js5ConnectState;
                  }
               }

               if(js5ConnectState == 2) {
                  class167.js5Socket = WorldMapData_0.method4467((Socket)class101.js5SocketTask.result, 40000, 5000);
                  Buffer var1 = new Buffer(5);
                  var1.writeByte_base(15);
                  var1.writeInt_base(218);
                  class167.js5Socket.write_base(var1.array, 0, 5);
                  ++js5ConnectState;
                  class310.field3388 = SpotAnimationDefinition.method3775_base();
               }

               if(js5ConnectState == 3) {
                  if(class167.js5Socket.available_base() > 0) {
                     int var2 = class167.js5Socket.readUnsignedByte_base();
                     if(var2 != 0) {
                        this.js5Error_base(var2);
                        return;
                     }

                     ++js5ConnectState;
                  } else if(SpotAnimationDefinition.method3775_base() - class310.field3388 > 30000L) {
                     this.js5Error_base(-2);
                     return;
                  }
               }

               if(js5ConnectState == 4) {
                  WorldMapSectionType.field2556.method7048(class167.js5Socket, gameState > 20);
                  class101.js5SocketTask = null;
                  class167.js5Socket = null;
                  js5ConnectState = 0;
                  js5Errors = 0;
               }

            } catch (IOException var3) {
               this.js5Error_base(-3);
            }
         }
      }
   }

   @ObfuscatedName("hf")
   @ObfuscatedSignature(
      descriptor = "(II)V",
      garbageValue = "-267215757"
   )
   void js5Error_base(int var1) {
      class101.js5SocketTask = null;
      class167.js5Socket = null;
      js5ConnectState = 0;
      if(class252.currentPort == WorldMapCacheName.worldPort) {
         class252.currentPort = AbstractSocket.js5Port;
      } else {
         class252.currentPort = WorldMapCacheName.worldPort;
      }

      ++js5Errors;
      if(js5Errors < 2 || var1 != 7 && var1 != 9) {
         if(js5Errors >= 2 && var1 == 6) {
            this.error_base("js5connect_outofdate");
            WorldMapSection2.updateGameState_base(1000);
         } else if(js5Errors >= 4) {
            if(gameState <= 5) {
               this.error_base("js5connect");
               WorldMapSection2.updateGameState_base(1000);
            } else {
               field791 = 3000;
            }
         }
      } else if(gameState <= 5) {
         this.error_base("js5connect_full");
         WorldMapSection2.updateGameState_base(1000);
      } else {
         field791 = 3000;
      }

   }

   @ObfuscatedName("hh")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1040776320"
   )
   final void doCycleLoggedOut_base() {
      AbstractSocket var1 = packetWriter.method2885();
      PacketBuffer var2 = packetWriter.packetBuffer;

      try {
         if(loginState == 0) {
            if(EnumComposition.field1896 == null && (secureRandomFuture.isDone_base() || field522 > 250)) {
               EnumComposition.field1896 = secureRandomFuture.get_base();
               secureRandomFuture.shutdown_base();
               secureRandomFuture = null;
            }

            if(EnumComposition.field1896 != null) {
               if(var1 != null) {
                  var1.close_base();
                  var1 = null;
               }

               Player.field1125 = null;
               hadNetworkError = false;
               field522 = 0;
               if(field526.method9577_base()) {
                  if(this.containsAccessAndRefreshToken_base()) {
                     try {
                        this.method1268_base(ObjectComposition.refreshToken);
                        class19.method295_base(21);
                     } catch (Throwable var16) {
                        GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base((String)null, var16);
                        class149.getLoginError_base(65);
                        return;
                     }
                  } else {
                     if(!this.containsSessionAndCharacterId_base()) {
                        class149.getLoginError_base(65);
                        return;
                     }

                     try {
                        this.method1270_base(class369.sessionId, InterfaceParent.characterId);
                        class19.method295_base(20);
                     } catch (Exception var17) {
                        GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base((String)null, var17);
                        class149.getLoginError_base(65);
                        return;
                     }
                  }
               } else {
                  class19.method295_base(1);
               }
            }
         }

         class20 var24;
         if(loginState == 21) {
            if(this.field536 != null) {
               if(!this.field536.isDone()) {
                  return;
               }

               if(this.field536.isCancelled()) {
                  class149.getLoginError_base(65);
                  this.field536 = null;
                  return;
               }

               try {
                  RefreshAccessTokenResponse var3 = (RefreshAccessTokenResponse)this.field536.get();
                  if(!var3.isSuccess()) {
                     class149.getLoginError_base(65);
                     this.field536 = null;
                     return;
                  }

                  Messages.accessToken = var3.getAccessToken();
                  ObjectComposition.refreshToken = var3.getRefreshToken();
                  onRefreshToken(-1);
                  this.field536 = null;
               } catch (Exception var18) {
                  GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base((String)null, var18);
                  class149.getLoginError_base(65);
                  this.field536 = null;
                  return;
               }
            } else {
               if(this.field611 == null) {
                  class149.getLoginError_base(65);
                  return;
               }

               if(!this.field611.method283_base()) {
                  return;
               }

               if(this.field611.method267_base()) {
                  GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base(this.field611.method264_base(), (Throwable)null);
                  class149.getLoginError_base(65);
                  this.field611 = null;
                  return;
               }

               var24 = this.field611.method269_base();
               if(var24.method297_base() != 200) {
                  class149.getLoginError_base(65);
                  this.field611 = null;
                  return;
               }

               field522 = 0;
               class474 var4 = new class474(var24.method299_base());

               try {
                  Messages.accessToken = var4.method8573_base().getString("access_token");
                  ObjectComposition.refreshToken = var4.method8573_base().getString("refresh_token");
                  onRefreshToken(-1);
               } catch (Exception var19) {
                  GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base("Error parsing tokens", var19);
                  class149.getLoginError_base(65);
                  this.field611 = null;
                  return;
               }
            }

            this.method1386_base(Messages.accessToken);
            class19.method295_base(20);
         }

         if(loginState == 20) {
            if(this.field605 != null) {
               if(!this.field605.isDone()) {
                  return;
               }

               if(this.field605.isCancelled()) {
                  class149.getLoginError_base(65);
                  this.field605 = null;
                  return;
               }

               try {
                  OtlTokenResponse var25 = (OtlTokenResponse)this.field605.get();
                  if(!var25.isSuccess()) {
                     class149.getLoginError_base(65);
                     this.field605 = null;
                     return;
                  }

                  this.field527 = var25.getToken();
                  this.field605 = null;
               } catch (Exception var20) {
                  GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base((String)null, var20);
                  class149.getLoginError_base(65);
                  this.field605 = null;
                  return;
               }
            } else {
               if(this.field657 == null) {
                  class149.getLoginError_base(65);
                  return;
               }

               if(!this.field657.method283_base()) {
                  return;
               }

               if(this.field657.method267_base()) {
                  GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base(this.field657.method264_base(), (Throwable)null);
                  class149.getLoginError_base(65);
                  this.field657 = null;
                  return;
               }

               var24 = this.field657.method269_base();
               if(var24.method297_base() != 200) {
                  GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base("Response code: " + var24.method297_base() + "Response body: " + var24.method299_base(), (Throwable)null);
                  class149.getLoginError_base(65);
                  this.field657 = null;
                  return;
               }

               List var27 = (List)var24.method301_base().get("Content-Type");
               if(var27 != null && var27.contains(class472.field4810.method8563_base())) {
                  try {
                     JSONObject var5 = new JSONObject(var24.method299_base());
                     this.field527 = var5.getString("token");
                  } catch (JSONException var21) {
                     GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base((String)null, var21);
                     class149.getLoginError_base(65);
                     this.field657 = null;
                     return;
                  }
               } else {
                  this.field527 = var24.method299_base();
               }

               this.field657 = null;
            }

            field522 = 0;
            class19.method295_base(1);
         }

         if(loginState == 1) {
            if(Player.field1125 == null) {
               Player.field1125 = GameEngine.taskHandler.method4185(Friend.worldHost, class252.currentPort);
            }

            if(Player.field1125.status == 2) {
               throw new IOException();
            }

            if(Player.field1125.status == 1) {
               var1 = WorldMapData_0.method4467((Socket)Player.field1125.result, 40000, 5000);
               packetWriter.method2868(var1);
               Player.field1125 = null;
               class19.method295_base(2);
            }
         }

         PacketBufferNode var26;
         if(loginState == 2) {
            packetWriter.clearBuffer_base();
            var26 = HorizontalAlignment.method3686();
            var26.packetBuffer.writeByte_base(LoginPacket.field3377.id);
            packetWriter.method2867(var26);
            packetWriter.flush_base();
            var2.offset = 0;
            class19.method295_base(3);
         }

         int var12;
         if(loginState == 3) {
            if(MusicPatchPcmStream.pcmPlayer1 != null) {
               MusicPatchPcmStream.pcmPlayer1.method795_base();
            }

            if(var1.isAvailable_base(1)) {
               var12 = var1.readUnsignedByte_base();
               if(MusicPatchPcmStream.pcmPlayer1 != null) {
                  MusicPatchPcmStream.pcmPlayer1.method795_base();
               }

               if(var12 != 0) {
                  class149.getLoginError_base(var12);
                  return;
               }

               var2.offset = 0;
               class19.method295_base(4);
            }
         }

         if(loginState == 4) {
            if(var2.offset < 8) {
               var12 = var1.available_base();
               if(var12 > 8 - var2.offset) {
                  var12 = 8 - var2.offset;
               }

               if(var12 > 0) {
                  var1.read_base(var2.array, var2.offset, var12);
                  var2.offset += var12;
               }
            }

            if(var2.offset == 8) {
               var2.offset = 0;
               Clock.field2337 = var2.readLong_base();
               class19.method295_base(5);
            }
         }

         int var6;
         if(loginState == 5) {
            packetWriter.packetBuffer.offset = 0;
            packetWriter.clearBuffer_base();
            PacketBuffer var28 = new PacketBuffer(500);
            int[] var29 = new int[]{EnumComposition.field1896.nextInt(), EnumComposition.field1896.nextInt(), EnumComposition.field1896.nextInt(), EnumComposition.field1896.nextInt()};
            var28.offset = 0;
            var28.writeByte_base(1);
            var28.writeInt_base(var29[0]);
            var28.writeInt_base(var29[1]);
            var28.writeInt_base(var29[2]);
            var28.writeInt_base(var29[3]);
            var28.writeLong_base(Clock.field2337);
            if(gameState == 40) {
               var28.writeInt_base(class215.field2305[0]);
               var28.writeInt_base(class215.field2305[1]);
               var28.writeInt_base(class215.field2305[2]);
               var28.writeInt_base(class215.field2305[3]);
            } else {
               if(gameState == 50) {
                  var28.writeByte_base(class124.field1472.rsOrdinal_base());
                  var28.writeInt_base(class160.field1748);
               } else {
                  var28.writeByte_base(field525.rsOrdinal_base());
                  switch(field525.field1468) {
                  case 0:
                  case 1:
                     var28.writeMedium_base(class53.field350);
                     ++var28.offset;
                     break;
                  case 2:
                     var28.offset += 4;
                     break;
                  case 3:
                     var28.writeInt_base(WorldMapIcon_1.clientPreferences.method2567_base(Login.Login_username));
                  }
               }

               if(field526.method9577_base()) {
                  var28.writeByte_base(class531.field5192.rsOrdinal_base());
                  var28.writeStringCp1252NullTerminated_base(this.field527);
               } else {
                  var28.writeByte_base(class531.field5197.rsOrdinal_base());
                  var28.writeStringCp1252NullTerminated_base(Login.Login_password);
               }
            }

            var28.encryptRsa_base(class74.field889, class74.field890);
            class215.field2305 = var29;
            PacketBufferNode var32 = HorizontalAlignment.method3686();
            var32.packetBuffer.offset = 0;
            if(gameState == 40) {
               var32.packetBuffer.writeByte_base(LoginPacket.field3380.id);
            } else {
               var32.packetBuffer.writeByte_base(LoginPacket.field3383.id);
            }

            var32.packetBuffer.writeShort_base(0);
            var6 = var32.packetBuffer.offset;
            var32.packetBuffer.writeInt_base(218);
            var32.packetBuffer.writeInt_base(1);
            var32.packetBuffer.writeByte_base(clientType);
            var32.packetBuffer.writeByte_base(field490);
            byte var7 = 0;
            var32.packetBuffer.writeByte_base(var7);
            var32.packetBuffer.writeBytes_base(var28.array, 0, var28.offset);
            int var8 = var32.packetBuffer.offset;
            var32.packetBuffer.writeStringCp1252NullTerminated_base(Login.Login_username);
            var32.packetBuffer.writeByte_base((isResizable?1:0) << 1 | (isLowDetail?1:0));
            var32.packetBuffer.writeShort_base(Language.canvasWidth);
            var32.packetBuffer.writeShort_base(class47.canvasHeight);
            class354.method6860(var32.packetBuffer);
            var32.packetBuffer.writeStringCp1252NullTerminated_base(MenuAction.field878);
            var32.packetBuffer.writeInt_base(DevicePcmPlayerProvider.field111);
            if(revision > 213) {
               var32.packetBuffer.writeByte_base(0);
            }

            Buffer var9 = new Buffer(class60.platformInfo.size_base());
            class60.platformInfo.method8636(var9);
            var32.packetBuffer.writeBytes_base(var9.array, 0, var9.array.length);
            var32.packetBuffer.writeByte_base(clientType);
            var32.packetBuffer.writeInt_base(0);
            var32.packetBuffer.writeIntLE_base(PcmPlayer.field281.hash);
            var32.packetBuffer.writeIntIME_base(SoundSystem.field298.hash);
            var32.packetBuffer.writeIntME_base(class145.field1643.hash);
            var32.packetBuffer.writeIntIME_base(class7.field25.hash);
            var32.packetBuffer.writeIntME_base(class514.archive6.hash);
            var32.packetBuffer.writeIntME_base(StructComposition.field2041.hash);
            var32.packetBuffer.writeIntIME_base(class313.archive4.hash);
            var32.packetBuffer.writeIntLE_base(UserComparator7.field1441.hash);
            var32.packetBuffer.writeIntME_base(WorldMapDecorationType.archive10.hash);
            var32.packetBuffer.writeIntLE_base(SpotAnimationDefinition.field2007.hash);
            var32.packetBuffer.writeIntIME_base(Canvas.field114.hash);
            var32.packetBuffer.writeIntLE_base(VarbitComposition.archive13.hash);
            var32.packetBuffer.writeInt_base(WorldMapData_0.field2426.hash);
            var32.packetBuffer.writeIntIME_base(0);
            var32.packetBuffer.writeIntME_base(class47.archive12.hash);
            var32.packetBuffer.writeIntME_base(GrandExchangeOfferOwnWorldComparator.archive8.hash);
            var32.packetBuffer.writeIntME_base(Language.field4412.hash);
            var32.packetBuffer.writeInt_base(WorldMapSection0.archive9.hash);
            var32.packetBuffer.writeIntME_base(class19.field92.hash);
            var32.packetBuffer.writeIntLE_base(class344.archive2.hash);
            var32.packetBuffer.writeIntLE_base(BuddyRankComparator.field1460.hash);
            var32.packetBuffer.xteaEncrypt_base(var29, var8, var32.packetBuffer.offset);
            var32.packetBuffer.writeLengthShort_base(var32.packetBuffer.offset - var6);
            packetWriter.method2867(var32);
            packetWriter.flush_base();
            packetWriter.isaacCipher = new IsaacCipher(var29);
            int[] var10 = new int[4];
            int var11 = 0;

            while(true) {
               if(var11 >= 4) {
                  var2.newIsaacCipher_base(var10);
                  class19.method295_base(6);
                  break;
               }

               var10[var11] = var29[var11] + 50;
               ++var11;
            }
         }

         int var13;
         if(loginState == 6 && var1.available_base() > 0) {
            var12 = var1.readUnsignedByte_base();
            if(var12 == 61) {
               var13 = var1.available_base();
               PendingSpawn.field1169 = var13 == 1 && var1.readUnsignedByte_base() == 1;
               class19.method295_base(5);
            }

            if(var12 == 21 && gameState == 20) {
               class19.method295_base(12);
            } else if(var12 == 2) {
               class19.method295_base(14);
            } else if(var12 == 15 && gameState == 40) {
               packetWriter.serverPacketLength = -1;
               class19.method295_base(19);
            } else if(var12 == 64) {
               class19.method295_base(10);
            } else if(var12 == 23 && field614 < 1) {
               ++field614;
               class19.method295_base(0);
            } else if(var12 == 29) {
               class19.method295_base(17);
            } else {
               if(var12 != 69) {
                  class149.getLoginError_base(var12);
                  return;
               }

               class19.method295_base(7);
            }
         }

         if(loginState == 7 && var1.available_base() >= 2) {
            var1.read_base(var2.array, 0, 2);
            var2.offset = 0;
            Language.field4410 = var2.readUnsignedShort_base();
            class19.method295_base(8);
         }

         if(loginState == 8 && var1.available_base() >= Language.field4410) {
            var2.offset = 0;
            var1.read_base(var2.array, var2.offset, Language.field4410);
            class6 var30 = class221.method4305_base()[var2.readUnsignedByte_base()];

            try {
               class3 var31 = WorldMapElement.method3590_base(var30);
               this.field542 = new class7(var2, var31);
               class19.method295_base(9);
            } catch (Exception var22) {
               class149.getLoginError_base(22);
               return;
            }
         }

         if(loginState == 9 && this.field542.method51_base()) {
            this.field702 = this.field542.method52();
            this.field542.method62_base();
            this.field542 = null;
            if(this.field702 == null) {
               class149.getLoginError_base(22);
               return;
            }

            packetWriter.clearBuffer_base();
            var26 = HorizontalAlignment.method3686();
            var26.packetBuffer.writeByte_base(LoginPacket.field3379.id);
            var26.packetBuffer.writeShort_base(this.field702.offset);
            var26.packetBuffer.method9373(this.field702);
            packetWriter.method2867(var26);
            packetWriter.flush_base();
            this.field702 = null;
            class19.method295_base(6);
         }

         if(loginState == 10 && var1.available_base() > 0) {
            class223.field2351 = var1.readUnsignedByte_base();
            class19.method295_base(11);
         }

         if(loginState == 11 && var1.available_base() >= class223.field2351) {
            var1.read_base(var2.array, 0, class223.field2351);
            var2.offset = 0;
            class19.method295_base(6);
         }

         if(loginState == 12 && var1.available_base() > 0) {
            field675 = (var1.readUnsignedByte_base() + 3) * 60;
            class19.method295_base(13);
         }

         if(loginState == 13) {
            field522 = 0;
            class139.setLoginResponseString_base("You have only just left another world.", "Your profile will be transferred in:", field675 / 60 + " seconds.");
            if(--field675 <= 0) {
               class19.method295_base(0);
            }

         } else {
            if(loginState == 14 && var1.available_base() >= 1) {
               SoundCache.field303 = var1.readUnsignedByte_base();
               class19.method295_base(15);
            }

            if(loginState == 15 && var1.available_base() >= SoundCache.field303) {
               boolean var38 = var1.readUnsignedByte_base() == 1;
               var1.read_base(var2.array, 0, 4);
               var2.offset = 0;
               boolean var37 = false;
               if(var38) {
                  var13 = var2.readByteIsaac_base() << 24;
                  var13 |= var2.readByteIsaac_base() << 16;
                  var13 |= var2.readByteIsaac_base() << 8;
                  var13 |= var2.readByteIsaac_base();
                  WorldMapIcon_1.clientPreferences.method2565_base(Login.Login_username, var13);
               }

               if(Login_isUsernameRemembered) {
                  WorldMapIcon_1.clientPreferences.method2586_base(Login.Login_username);
               } else {
                  WorldMapIcon_1.clientPreferences.method2586_base((String)null);
               }

               TextureProvider.savePreferences_base();
               staffModLevel = var1.readUnsignedByte_base();
               playerMod = var1.readUnsignedByte_base() == 1;
               localPlayerIndex = var1.readUnsignedByte_base();
               localPlayerIndex <<= 8;
               localPlayerIndex += var1.readUnsignedByte_base();
               field754 = var1.readUnsignedByte_base();
               var1.read_base(var2.array, 0, 8);
               var2.offset = 0;
               this.accountHash = var2.readLong_base();
               this.onAccountHashChanged(-1);
               var1.read_base(var2.array, 0, 8);
               var2.offset = 0;
               userId = var2.readLong_base();
               if(revision >= 214) {
                  var1.read_base(var2.array, 0, 8);
                  var2.offset = 0;
                  var2.readLong_base();
               }

               var1.read_base(var2.array, 0, 1);
               var2.offset = 0;
               ServerPacket[] var35 = class12.method168();
               var6 = var2.readSmartByteShortIsaac_base();
               if(var6 < 0 || var6 >= var35.length) {
                  throw new IOException(var6 + " " + var2.offset);
               }

               packetWriter.serverPacket = var35[var6];
               packetWriter.serverPacketLength = packetWriter.serverPacket.length;
               var1.read_base(var2.array, 0, 2);
               var2.offset = 0;
               packetWriter.serverPacketLength = var2.readUnsignedShort_base();

               try {
                  class26.method394_base(SpriteMask.client, "zap");
               } catch (Throwable var15) {
                  ;
               }

               class19.method295_base(16);
            }

            if(loginState == 16) {
               if(var1.available_base() >= packetWriter.serverPacketLength) {
                  var2.offset = 0;
                  var1.read_base(var2.array, 0, packetWriter.serverPacketLength);
                  timer.method7926_base();
                  class53.method1110_base();
                  Players.method2785(var2);
                  DefaultsGroup.field4740 = -1;
                  GrandExchangeOfferUnitPriceComparator.method7148(false, var2, revision >= 218);
                  packetWriter.serverPacket = null;
               }

            } else {
               if(loginState == 17 && var1.available_base() >= 2) {
                  var2.offset = 0;
                  var1.read_base(var2.array, 0, 2);
                  var2.offset = 0;
                  GrandExchangeOfferOwnWorldComparator.field478 = var2.readUnsignedShort_base();
                  class19.method295_base(18);
               }

               if(loginState == 18 && var1.available_base() >= GrandExchangeOfferOwnWorldComparator.field478) {
                  var2.offset = 0;
                  var1.read_base(var2.array, 0, GrandExchangeOfferOwnWorldComparator.field478);
                  var2.offset = 0;
                  String var34 = var2.readStringCp1252NullTerminated_base();
                  String var33 = var2.readStringCp1252NullTerminated_base();
                  String var36 = var2.readStringCp1252NullTerminated_base();
                  class139.setLoginResponseString_base(var34, var33, var36);
                  WorldMapSection2.updateGameState_base(10);
                  if(field526.method9577_base()) {
                     UserComparator7.method2966_base(9);
                  }
               }

               if(loginState == 19) {
                  if(packetWriter.serverPacketLength == -1) {
                     if(var1.available_base() < 2) {
                        return;
                     }

                     var1.read_base(var2.array, 0, 2);
                     var2.offset = 0;
                     packetWriter.serverPacketLength = var2.readUnsignedShort_base();
                  }

                  if(var1.available_base() >= packetWriter.serverPacketLength) {
                     var1.read_base(var2.array, 0, packetWriter.serverPacketLength);
                     var2.offset = 0;
                     var12 = packetWriter.serverPacketLength;
                     timer.method7928_base();
                     class17.method263_base();
                     Players.method2785(var2);
                     if(var12 != var2.offset) {
                        throw new RuntimeException();
                     }
                  }
               } else {
                  ++field522;
                  if(field522 > 2000) {
                     if(field614 < 1) {
                        if(WorldMapCacheName.worldPort == class252.currentPort) {
                           class252.currentPort = AbstractSocket.js5Port;
                        } else {
                           class252.currentPort = WorldMapCacheName.worldPort;
                        }

                        ++field614;
                        class19.method295_base(0);
                     } else {
                        class149.getLoginError_base(-3);
                     }
                  }
               }
            }
         }
      } catch (IOException var23) {
         if(field614 < 1) {
            if(WorldMapCacheName.worldPort == class252.currentPort) {
               class252.currentPort = AbstractSocket.js5Port;
            } else {
               class252.currentPort = WorldMapCacheName.worldPort;
            }

            ++field614;
            class19.method295_base(0);
         } else {
            class149.getLoginError_base(-2);
         }
      }
   }

   @ObfuscatedName("hm")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-614967617"
   )
   final void doCycleLoggedIn_base() {
      if(rebootTimer > 1) {
         --rebootTimer;
      }

      if(logoutTimer > 0) {
         --logoutTimer;
      }

      if(hadNetworkError) {
         hadNetworkError = false;
         class9.method85_base();
      } else {
         if(!isMenuOpen) {
            UserComparator10.addCancelMenuEntry_base();
         }

         int var1;
         for(var1 = 0; var1 < 100 && this.method1829(packetWriter); ++var1) {
            ;
         }

         if(gameState == 30) {
            int var2;
            PacketBufferNode var14;
            while(class216.method4239_base()) {
               var14 = class113.method2919(ClientPacket.REFLECTION_CHECK_REPLY, packetWriter.isaacCipher);
               var14.packetBuffer.writeByte_base(0);
               var2 = var14.packetBuffer.offset;
               class415.method7826(var14.packetBuffer);
               var14.packetBuffer.writeLengthByte_base(var14.packetBuffer.offset - var2);
               packetWriter.method2867(var14);
            }

            if(timer.field4596) {
               var14 = class113.method2919(ClientPacket.TIMINGS, packetWriter.isaacCipher);
               var14.packetBuffer.writeByte_base(0);
               var2 = var14.packetBuffer.offset;
               timer.method7931(var14.packetBuffer);
               var14.packetBuffer.writeLengthByte_base(var14.packetBuffer.offset - var2);
               packetWriter.method2867(var14);
               timer.method7927_base();
            }

            Object var34 = Message.mouseRecorder.lock;
            int var3;
            int var4;
            int var5;
            int var6;
            int var7;
            int var8;
            int var9;
            int var10;
            int var11;
            int var12;
            synchronized(Message.mouseRecorder.lock) {
               if(!field729) {
                  Message.mouseRecorder.index = 0;
               } else if(MouseHandler.MouseHandler_lastButton != 0 || Message.mouseRecorder.index >= 40) {
                  PacketBufferNode var15 = null;
                  var3 = 0;
                  var4 = 0;
                  var5 = 0;
                  var6 = 0;

                  for(var7 = 0; var7 < Message.mouseRecorder.index && (var15 == null || var15.packetBuffer.offset - var3 < 246); ++var7) {
                     var4 = var7;
                     var8 = Message.mouseRecorder.ys[var7];
                     if(var8 < -1) {
                        var8 = -1;
                     } else if(var8 > 65534) {
                        var8 = 65534;
                     }

                     var9 = Message.mouseRecorder.xs[var7];
                     if(var9 < -1) {
                        var9 = -1;
                     } else if(var9 > 65534) {
                        var9 = 65534;
                     }

                     if(var9 != field501 || var8 != field502) {
                        if(var15 == null) {
                           var15 = class113.method2919(ClientPacket.EVENT_MOUSE_MOVE, packetWriter.isaacCipher);
                           var15.packetBuffer.writeByte_base(0);
                           var3 = var15.packetBuffer.offset;
                           var15.packetBuffer.offset += 2;
                           var5 = 0;
                           var6 = 0;
                        }

                        if(-1L != field503) {
                           var10 = var9 - field501;
                           var11 = var8 - field502;
                           var12 = (int)((Message.mouseRecorder.millis[var7] - field503) / 20L);
                           var5 = (int)((long)var5 + (Message.mouseRecorder.millis[var7] - field503) % 20L);
                        } else {
                           var10 = var9;
                           var11 = var8;
                           var12 = Integer.MAX_VALUE;
                        }

                        field501 = var9;
                        field502 = var8;
                        if(var12 < 8 && var10 >= -32 && var10 <= 31 && var11 >= -32 && var11 <= 31) {
                           var10 += 32;
                           var11 += 32;
                           var15.packetBuffer.writeShort_base((var12 << 12) + var11 + (var10 << 6));
                        } else if(var12 < 32 && var10 >= -128 && var10 <= 127 && var11 >= -128 && var11 <= 127) {
                           var10 += 128;
                           var11 += 128;
                           var15.packetBuffer.writeByte_base(var12 + 128);
                           var15.packetBuffer.writeShort_base(var11 + (var10 << 8));
                        } else if(var12 < 32) {
                           var15.packetBuffer.writeByte_base(var12 + 192);
                           if(var9 != -1 && var8 != -1) {
                              var15.packetBuffer.writeInt_base(var9 | var8 << 16);
                           } else {
                              var15.packetBuffer.writeInt_base(Integer.MIN_VALUE);
                           }
                        } else {
                           var15.packetBuffer.writeShort_base((var12 & 8191) + 57344);
                           if(var9 != -1 && var8 != -1) {
                              var15.packetBuffer.writeInt_base(var9 | var8 << 16);
                           } else {
                              var15.packetBuffer.writeInt_base(Integer.MIN_VALUE);
                           }
                        }

                        ++var6;
                        field503 = Message.mouseRecorder.millis[var7];
                     }
                  }

                  if(var15 != null) {
                     var15.packetBuffer.writeLengthByte_base(var15.packetBuffer.offset - var3);
                     var7 = var15.packetBuffer.offset;
                     var15.packetBuffer.offset = var3;
                     var15.packetBuffer.writeByte_base(var5 / var6);
                     var15.packetBuffer.writeByte_base(var5 % var6);
                     var15.packetBuffer.offset = var7;
                     packetWriter.method2867(var15);
                  }

                  if(var4 >= Message.mouseRecorder.index) {
                     Message.mouseRecorder.index = 0;
                  } else {
                     Message.mouseRecorder.index -= var4;
                     System.arraycopy(Message.mouseRecorder.xs, var4, Message.mouseRecorder.xs, 0, Message.mouseRecorder.index);
                     System.arraycopy(Message.mouseRecorder.ys, var4, Message.mouseRecorder.ys, 0, Message.mouseRecorder.index);
                     System.arraycopy(Message.mouseRecorder.millis, var4, Message.mouseRecorder.millis, 0, Message.mouseRecorder.index);
                  }
               }
            }

            if(MouseHandler.MouseHandler_lastButton == 1 || !class19.mouseCam && MouseHandler.MouseHandler_lastButton == 4 || MouseHandler.MouseHandler_lastButton == 2) {
               long var16 = MouseHandler.MouseHandler_lastPressedTimeMillis - mouseLastLastPressedTimeMillis * -1L;
               if(var16 > 32767L) {
                  var16 = 32767L;
               }

               mouseLastLastPressedTimeMillis = MouseHandler.MouseHandler_lastPressedTimeMillis * -1L;
               var3 = MouseHandler.MouseHandler_lastPressedY;
               if(var3 < 0) {
                  var3 = 0;
               } else if(var3 > class47.canvasHeight) {
                  var3 = class47.canvasHeight;
               }

               var4 = MouseHandler.MouseHandler_lastPressedX;
               if(var4 < 0) {
                  var4 = 0;
               } else if(var4 > Language.canvasWidth) {
                  var4 = Language.canvasWidth;
               }

               var5 = (int)var16;
               PacketBufferNode var18 = class113.method2919(ClientPacket.EVENT_MOUSE_CLICK, packetWriter.isaacCipher);
               var18.packetBuffer.writeShort_base((var5 << 1) + (MouseHandler.MouseHandler_lastButton == 2?1:0));
               var18.packetBuffer.writeShort_base(var4);
               var18.packetBuffer.writeShort_base(var3);
               packetWriter.method2867(var18);
            }

            if(mouseWheelRotation != 0) {
               var14 = class113.method2919(ClientPacket.EVENT_MOUSE_SCROLL, packetWriter.isaacCipher);
               var14.packetBuffer.writeShort_base(mouseWheelRotation);
               packetWriter.method2867(var14);
            }

            if(field724.field2354 > 0) {
               var14 = class113.method2919(ClientPacket.EVENT_KEYBOARD, packetWriter.isaacCipher);
               var14.packetBuffer.writeShort_base(0);
               var2 = var14.packetBuffer.offset;
               long var19 = SpotAnimationDefinition.method3775_base();

               for(var5 = 0; var5 < field724.field2354; ++var5) {
                  long var21 = var19 - field638;
                  if(var21 > 16777215L) {
                     var21 = 16777215L;
                  }

                  field638 = var19;
                  var14.packetBuffer.writeMediumLE_base((int)var21);
                  var14.packetBuffer.writeByteNeg_base(field724.field2353[var5]);
               }

               var14.packetBuffer.writeLengthShort_base(var14.packetBuffer.offset - var2);
               packetWriter.method2867(var14);
            }

            if(field523 > 0) {
               --field523;
            }

            if(field724.method4316_base(96) || field724.method4316_base(97) || field724.method4316_base(98) || field724.method4316_base(99)) {
               field587 = true;
            }

            if(field587 && field523 <= 0) {
               field523 = 20;
               field587 = false;
               var14 = class113.method2919(ClientPacket.EVENT_CAMERA_POSITION, packetWriter.isaacCipher);
               var14.packetBuffer.writeShortLE_base(camAngleX);
               var14.packetBuffer.writeShortLE_base(camAngleY);
               packetWriter.method2867(var14);
            }

            if(class357.hasFocus && !hadFocus) {
               hadFocus = true;
               var14 = class113.method2919(ClientPacket.EVENT_APPLET_FOCUS, packetWriter.isaacCipher);
               var14.packetBuffer.writeByte_base(1);
               packetWriter.method2867(var14);
            }

            if(!class357.hasFocus && hadFocus) {
               hadFocus = false;
               var14 = class113.method2919(ClientPacket.EVENT_APPLET_FOCUS, packetWriter.isaacCipher);
               var14.packetBuffer.writeByte_base(0);
               packetWriter.method2867(var14);
            }

            if(NpcOverrides.worldMap != null) {
               NpcOverrides.worldMap.method8713_base();
            }

            if(class344.ClanChat_inClanChat) {
               if(class20.friendsChat != null) {
                  class20.friendsChat.sort_base();
               }

               for(var1 = 0; var1 < Players.Players_count; ++var1) {
                  Player var36 = players[Players.Players_indices[var1]];
                  var36.clearIsInFriendsChat_base();
               }

               class344.ClanChat_inClanChat = false;
            }

            class153.method3311_base();
            class435.method8025_base();
            if(gameState == 30) {
               for(PendingSpawn var35 = (PendingSpawn)pendingSpawns.method7265(); var35 != null; var35 = (PendingSpawn)pendingSpawns.method7235()) {
                  if(var35.hitpoints > 0) {
                     --var35.hitpoints;
                  }

                  if(var35.hitpoints == 0) {
                     if(var35.objectId >= 0) {
                        var3 = var35.objectId;
                        var4 = var35.field1158;
                        ObjectComposition var23 = WorldMapSection2.method4515(var3);
                        if(var4 == 11) {
                           var4 = 10;
                        }

                        if(var4 >= 5 && var4 <= 8) {
                           var4 = 4;
                        }

                        boolean var30 = var23.method3892_base(var4);
                        if(!var30) {
                           continue;
                        }
                     }

                     WorldMapAreaData.addPendingSpawnToScene_base(var35.plane, var35.type, var35.x, var35.y, var35.objectId, var35.field1157, var35.field1158, var35.field1152);
                     var35.remove_base();
                  } else {
                     if(var35.delay > 0) {
                        --var35.delay;
                     }

                     if(var35.delay == 0 && var35.x >= 1 && var35.y >= 1 && var35.x <= 102 && var35.y <= 102 && (var35.field1162 < 0 || class141.method3211_base(var35.field1162, var35.field1161))) {
                        WorldMapAreaData.addPendingSpawnToScene_base(var35.plane, var35.type, var35.x, var35.y, var35.field1162, var35.field1160, var35.field1161, var35.field1152);
                        var35.delay = -1;
                        if(var35.field1162 == var35.objectId && var35.objectId == -1) {
                           var35.remove_base();
                        } else if(var35.field1162 == var35.objectId && var35.field1157 == var35.field1160 && var35.field1161 == var35.field1158) {
                           var35.remove_base();
                        }
                     }
                  }
               }

               for(var1 = 0; var1 < soundEffectCount; ++var1) {
                  --queuedSoundEffectDelays[var1];
                  if(queuedSoundEffectDelays[var1] >= -10) {
                     SoundEffect var37 = soundEffects[var1];
                     if(var37 == null) {
                        Object var10000 = null;
                        var37 = SoundEffect.method761(Language.field4412, soundEffectIds[var1], 0);
                        if(var37 == null) {
                           continue;
                        }

                        queuedSoundEffectDelays[var1] += var37.calculateDelay_base();
                        soundEffects[var1] = var37;
                     }

                     if(queuedSoundEffectDelays[var1] < 0) {
                        if(soundLocations[var1] != 0) {
                           var4 = (soundLocations[var1] & 255) * 128;
                           var5 = soundLocations[var1] >> 16 & 255;
                           var6 = var5 * 128 + 64 - class229.localPlayer.x;
                           if(var6 < 0) {
                              var6 = -var6;
                           }

                           var7 = soundLocations[var1] >> 8 & 255;
                           var8 = var7 * 128 + 64 - class229.localPlayer.y;
                           if(var8 < 0) {
                              var8 = -var8;
                           }

                           var9 = var8 + var6 - 128;
                           if(var9 > var4) {
                              queuedSoundEffectDelays[var1] = -100;
                              continue;
                           }

                           if(var9 < 0) {
                              var9 = 0;
                           }

                           var3 = (var4 - var9) * WorldMapIcon_1.clientPreferences.method2605_base() / var4;
                        } else {
                           var3 = WorldMapIcon_1.clientPreferences.method2556_base();
                        }

                        if(var3 > 0) {
                           RawSound var24 = var37.method767().method772(class521.decimator);
                           RawPcmStream var45 = RawPcmStream.method949(var24, 100, var3);
                           var45.setNumLoops_base(queuedSoundEffectLoops[var1] - 1);
                           LoginScreenAnimation.pcmStreamMixer.method713(var45);
                        }

                        queuedSoundEffectDelays[var1] = -100;
                     }
                  } else {
                     --soundEffectCount;
                     queuedSoundEffectCountChanged(-1);

                     for(var2 = var1; var2 < soundEffectCount; ++var2) {
                        soundEffectIds[var2] = soundEffectIds[var2 + 1];
                        soundEffects[var2] = soundEffects[var2 + 1];
                        queuedSoundEffectLoops[var2] = queuedSoundEffectLoops[var2 + 1];
                        queuedSoundEffectDelays[var2] = queuedSoundEffectDelays[var2 + 1];
                        soundLocations[var2] = soundLocations[var2 + 1];
                     }

                     --var1;
                  }
               }

               if(playingJingle && !BuddyRankComparator.method3006_base()) {
                  if(WorldMapIcon_1.clientPreferences.method2554_base() != 0) {
                     boolean var31 = !class316.field3424.isEmpty();
                     if(var31) {
                        class72.method2137(class514.archive6, WorldMapIcon_1.clientPreferences.method2554_base());
                     }
                  }

                  playingJingle = false;
               }

               ++packetWriter.field1412;
               if(packetWriter.field1412 > 750) {
                  class9.method85_base();
               } else {
                  var1 = Players.Players_count;
                  int[] var40 = Players.Players_indices;

                  for(var3 = 0; var3 < var1; ++var3) {
                     Player var47 = players[var40[var3]];
                     if(var47 != null) {
                        class228.method4437(var47, 1);
                     }
                  }

                  for(var1 = 0; var1 < npcCount; ++var1) {
                     var2 = npcIndices[var1];
                     NPC var25 = npcs[var2];
                     if(var25 != null) {
                        class228.method4437(var25, var25.definition.size);
                     }
                  }

                  int[] var38 = Players.Players_indices;

                  for(var2 = 0; var2 < Players.Players_count; ++var2) {
                     Player var51 = players[var38[var2]];
                     if(var51 != null && var51.overheadTextCyclesRemaining > 0) {
                        --var51.overheadTextCyclesRemaining;
                        if(var51.overheadTextCyclesRemaining == 0) {
                           var51.overheadText = null;
                           var51.overheadTextChanged(-1);
                        }
                     }
                  }

                  for(var2 = 0; var2 < npcCount; ++var2) {
                     var3 = npcIndices[var2];
                     NPC var48 = npcs[var3];
                     if(var48 != null && var48.overheadTextCyclesRemaining > 0) {
                        --var48.overheadTextCyclesRemaining;
                        if(var48.overheadTextCyclesRemaining == 0) {
                           var48.overheadText = null;
                           var48.overheadTextChanged(-1);
                        }
                     }
                  }

                  ++graphicsCycle;
                  if(mouseCrossColor != 0) {
                     mouseCrossState += 20;
                     if(mouseCrossState >= 400) {
                        mouseCrossColor = 0;
                     }
                  }

                  Widget var39 = Interpreter.mousedOverWidgetIf1;
                  Widget var42 = SwapSongTask.field4539;
                  Interpreter.mousedOverWidgetIf1 = null;
                  SwapSongTask.field4539 = null;
                  draggedOnWidget = null;
                  field516 = false;
                  field674 = false;
                  field726 = 0;

                  while(field724.method4324_base() && field726 < 128) {
                     if(staffModLevel >= 2 && field724.method4316_base(82) && field724.field2360 == 66) {
                        String var52 = class250.method4935_base();
                        SpriteMask.client.method501_base(var52);
                     } else if(oculusOrbState != 1 || field724.field2363 <= 0) {
                        field518[field726] = field724.field2360;
                        field586[field726] = field724.field2363;
                        ++field726;
                     }
                  }

                  boolean var32 = staffModLevel >= 2;
                  PacketBufferNode var26;
                  if(var32 && field724.method4316_base(82) && field724.method4316_base(81) && mouseWheelRotation != 0) {
                     var4 = class229.localPlayer.plane - mouseWheelRotation;
                     if(var4 < 0) {
                        var4 = 0;
                     } else if(var4 > 3) {
                        var4 = 3;
                     }

                     if(var4 != class229.localPlayer.plane) {
                        var5 = class229.localPlayer.pathX[0] + NpcOverrides.baseX;
                        var6 = class229.localPlayer.pathY[0] + class101.baseY;
                        var26 = class113.method2919(ClientPacket.TELEPORT, packetWriter.isaacCipher);
                        var26.packetBuffer.writeInt_base(0);
                        var26.packetBuffer.writeShortAdd_base(var5);
                        var26.packetBuffer.writeShortAdd_base(var6);
                        var26.packetBuffer.writeByte_base(var4);
                        packetWriter.method2867(var26);
                     }

                     mouseWheelRotation = 0;
                  }

                  if(rootInterface != -1) {
                     class406.updateRootInterface_base(rootInterface, 0, 0, Language.canvasWidth, class47.canvasHeight, 0, 0);
                  }

                  ++cycleCntr;
                  onCycleCntrChanged(-1);

                  while(true) {
                     Widget var41;
                     Widget var46;
                     ScriptEvent var50;
                     do {
                        var50 = (ScriptEvent)scriptEvents2.method7231();
                        if(var50 == null) {
                           while(true) {
                              do {
                                 var50 = (ScriptEvent)scriptEvents3.method7231();
                                 if(var50 == null) {
                                    while(true) {
                                       do {
                                          var50 = (ScriptEvent)scriptEvents.method7231();
                                          if(var50 == null) {
                                             boolean var33 = false;

                                             while(true) {
                                                class222 var49 = (class222)field682.method7231();
                                                if(var49 == null) {
                                                   if(!var33 && MouseHandler.MouseHandler_lastButton == 1) {
                                                      field725.method4281_base();
                                                   }

                                                   this.menu_base();
                                                   class127.method3038_base();
                                                   if(clickedWidget != null) {
                                                      this.method1727_base();
                                                   }

                                                   if(Scene.shouldSendWalk_base()) {
                                                      var5 = Scene.Scene_selectedX;
                                                      var6 = Scene.Scene_selectedY;
                                                      var26 = class113.method2919(ClientPacket.MOVE_GAMECLICK, packetWriter.isaacCipher);
                                                      var26.packetBuffer.writeByte_base(5);
                                                      var26.packetBuffer.writeShort_base(var5 + NpcOverrides.baseX);
                                                      var26.packetBuffer.writeShortLE_base(var6 + class101.baseY);
                                                      var26.packetBuffer.writeByteSub_base(field724.method4316_base(82)?(field724.method4316_base(81)?2:1):0);
                                                      packetWriter.method2867(var26);
                                                      Scene.method5365_base();
                                                      mouseCrossX = MouseHandler.MouseHandler_lastPressedX;
                                                      mouseCrossY = MouseHandler.MouseHandler_lastPressedY;
                                                      mouseCrossColor = 1;
                                                      mouseCrossState = 0;
                                                      destinationX = var5;
                                                      destinationY = var6;
                                                   }

                                                   if(var39 != Interpreter.mousedOverWidgetIf1) {
                                                      if(var39 != null) {
                                                         class159.method3423(var39);
                                                      }

                                                      if(Interpreter.mousedOverWidgetIf1 != null) {
                                                         class159.method3423(Interpreter.mousedOverWidgetIf1);
                                                      }
                                                   }

                                                   if(var42 != SwapSongTask.field4539 && field648 == field768) {
                                                      if(var42 != null) {
                                                         class159.method3423(var42);
                                                      }

                                                      if(SwapSongTask.field4539 != null) {
                                                         class159.method3423(SwapSongTask.field4539);
                                                      }
                                                   }

                                                   if(SwapSongTask.field4539 != null) {
                                                      if(field648 < field768) {
                                                         ++field648;
                                                         if(field768 == field648) {
                                                            class159.method3423(SwapSongTask.field4539);
                                                         }
                                                      }
                                                   } else if(field648 > 0) {
                                                      --field648;
                                                   }

                                                   class336.method6302_base();
                                                   if(field482) {
                                                      TextureProvider.method5533_base();
                                                   } else if(isCameraLocked) {
                                                      if(!field748) {
                                                         var5 = ScriptFrame.field456 * 128 + 64;
                                                         var6 = class216.field2314 * 128 + 64;
                                                         var7 = WorldMapDecorationType.getTileHeight_base(var5, var6, ItemLayer.Client_plane) - class127.field1488;
                                                         class314.method5953_base(var5, var7, var6);
                                                      } else if(field751 != null) {
                                                         ViewportMouse.cameraX = field751.vmethod8673_base();
                                                         class36.cameraZ = field751.vmethod8674_base();
                                                         if(field661) {
                                                            SecureRandomFuture.cameraY = field751.vmethod8675_base();
                                                         } else {
                                                            SecureRandomFuture.cameraY = WorldMapDecorationType.getTileHeight_base(ViewportMouse.cameraX, class36.cameraZ, ItemLayer.Client_plane) - field751.vmethod8675_base();
                                                         }

                                                         field751.method8684_base();
                                                      }

                                                      if(!field749) {
                                                         var5 = Messages.field1400 * 128 + 64;
                                                         var6 = AbstractWorldMapData.field2575 * 128 + 64;
                                                         var7 = WorldMapDecorationType.getTileHeight_base(var5, var6, ItemLayer.Client_plane) - class302.field3119;
                                                         var8 = var5 - ViewportMouse.cameraX;
                                                         var9 = var7 - SecureRandomFuture.cameraY;
                                                         var10 = var6 - class36.cameraZ;
                                                         var11 = (int)Math.sqrt((double)(var10 * var10 + var8 * var8));
                                                         var12 = (int)(Math.atan2((double)var9, (double)var11) * 325.9490051269531D) & 2047;
                                                         int var27 = (int)(Math.atan2((double)var8, (double)var10) * -325.9490051269531D) & 2047;
                                                         class303.method5908_base(var12, var27);
                                                      } else {
                                                         if(field672 != null) {
                                                            Varcs.cameraPitch = field672.method8668_base();
                                                            onCameraPitchChanged(-1);
                                                            Varcs.cameraPitch = Math.min(Math.max(Varcs.cameraPitch, 128), 383);
                                                            onCameraPitchChanged(-1);
                                                            field672.method8684_base();
                                                         }

                                                         if(field752 != null) {
                                                            class192.cameraYaw = field752.method8668_base() & 2047;
                                                            field752.method8684_base();
                                                         }
                                                      }
                                                   }

                                                   for(var5 = 0; var5 < 5; ++var5) {
                                                      ++field728[var5];
                                                   }

                                                   class176.varcs.tryWrite_base();
                                                   var5 = InterfaceParent.method2351_base();
                                                   var6 = class181.method3656_base();
                                                   if(var5 > 15000 && var6 > 15000) {
                                                      logoutTimer = 250;
                                                      WorldMapEvent.method5097_base(14500);
                                                      var26 = class113.method2919(ClientPacket.IDLE, packetWriter.isaacCipher);
                                                      packetWriter.method2867(var26);
                                                   }

                                                   class12.friendSystem.processFriendUpdates_base();

                                                   for(var7 = 0; var7 < field500.size(); ++var7) {
                                                      if(MouseRecorder.method2372_base(((Integer)field500.get(var7)).intValue()) != 2) {
                                                         field500.remove(var7);
                                                         --var7;
                                                      }
                                                   }

                                                   ++packetWriter.pendingWrites;
                                                   if(packetWriter.pendingWrites > 50) {
                                                      var26 = class113.method2919(ClientPacket.NO_TIMEOUT, packetWriter.isaacCipher);
                                                      packetWriter.method2867(var26);
                                                   }

                                                   try {
                                                      packetWriter.flush_base();
                                                   } catch (IOException var28) {
                                                      class9.method85_base();
                                                   }

                                                   return;
                                                }

                                                if(var49.field2349.type == 12) {
                                                   var33 = true;
                                                }

                                                if(var49 != null && var49.field2349 != null) {
                                                   if(var49.field2349.childIndex >= 0) {
                                                      var41 = HealthBarDefinition.widgetDefinition.method6287(var49.field2349.parentId);
                                                      if(var41 == null || var41.children == null || var41.children.length == 0 || var49.field2349.childIndex >= var41.children.length || var49.field2349 != var41.children[var49.field2349.childIndex]) {
                                                         continue;
                                                      }
                                                   }

                                                   if(var49.field2349.type == 11 && var49.field2344 == 0) {
                                                      if(var49.field2349.method6723_base(var49.field2346, var49.field2347, 0, 0)) {
                                                         switch(var49.field2349.method6681_base()) {
                                                         case 0:
                                                            HealthBar.openURL_base(var49.field2349.method6683_base(), true, false);
                                                            break;
                                                         case 1:
                                                            if(ClanChannel.method3483_base(class361.method6871(var49.field2349))) {
                                                               int[] var44 = var49.field2349.method6684_base();
                                                               if(var44 != null) {
                                                                  var26 = class113.method2919(ClientPacket.IF_CRMVIEW_CLICK, packetWriter.isaacCipher);
                                                                  var26.packetBuffer.writeIntLE_base(var44[1]);
                                                                  var26.packetBuffer.writeInt_base(var44[0]);
                                                                  var26.packetBuffer.writeShortAddLE_base(var49.field2349.childIndex);
                                                                  var26.packetBuffer.writeInt_base(var44[2]);
                                                                  var26.packetBuffer.writeIntLE_base(var49.field2349.id);
                                                                  var26.packetBuffer.writeIntME_base(var49.field2349.method6689_base());
                                                                  packetWriter.method2867(var26);
                                                               }
                                                            }
                                                         }
                                                      }
                                                   } else if(var49.field2349.type == 12) {
                                                      class341 var43 = var49.field2349.method6688_base();
                                                      if(var43 != null && var43.method6409_base()) {
                                                         switch(var49.field2344) {
                                                         case 0:
                                                            field725.method4279(var49.field2349);
                                                            var43.method6361_base(true);
                                                            var43.method6400_base(var49.field2346, var49.field2347, field724.method4316_base(82), field724.method4316_base(81));
                                                            break;
                                                         case 1:
                                                            var43.method6401_base(var49.field2346, var49.field2347);
                                                         }
                                                      }
                                                   }
                                                }
                                             }
                                          }

                                          var46 = var50.widget;
                                          if(var46.childIndex < 0) {
                                             break;
                                          }

                                          var41 = HealthBarDefinition.widgetDefinition.method6287(var46.parentId);
                                       } while(var41 == null || var41.children == null || var46.childIndex >= var41.children.length || var46 != var41.children[var46.childIndex]);

                                       class157.method3403(var50);
                                    }
                                 }

                                 var46 = var50.widget;
                                 if(var46.childIndex < 0) {
                                    break;
                                 }

                                 var41 = HealthBarDefinition.widgetDefinition.method6287(var46.parentId);
                              } while(var41 == null || var41.children == null || var46.childIndex >= var41.children.length || var46 != var41.children[var46.childIndex]);

                              class157.method3403(var50);
                           }
                        }

                        var46 = var50.widget;
                        if(var46.childIndex < 0) {
                           break;
                        }

                        var41 = HealthBarDefinition.widgetDefinition.method6287(var46.parentId);
                     } while(var41 == null || var41.children == null || var46.childIndex >= var41.children.length || var46 != var41.children[var46.childIndex]);

                     class157.method3403(var50);
                  }
               }
            }
         }
      }
   }

   @ObfuscatedName("im")
   @ObfuscatedSignature(
      descriptor = "(III)V",
      garbageValue = "-1786579284"
   )
   public void vmethod6202_base(int var1, int var2) {
      if(packetWriter != null && packetWriter.isaacCipher != null) {
         if(var1 > -1 && WorldMapIcon_1.clientPreferences.method2554_base() > 0 && !playingJingle) {
            PacketBufferNode var3 = class113.method2919(ClientPacket.SOUND_SONGEND, packetWriter.isaacCipher);
            var3.packetBuffer.writeInt_base(var1);
            packetWriter.method2867(var3);
         }

      }
   }

   @ObfuscatedName("ii")
   @ObfuscatedSignature(
      descriptor = "(B)V",
      garbageValue = "58"
   )
   void resizeJS_base() {
      int var1 = Language.canvasWidth;
      int var2 = class47.canvasHeight;
      if(super.contentWidth < var1) {
         var1 = super.contentWidth;
      }

      if(super.contentHeight < var2) {
         var2 = super.contentHeight;
      }

      if(WorldMapIcon_1.clientPreferences != null) {
         try {
            class26.method396_base(SpriteMask.client, "resize", new Object[]{Integer.valueOf(ApproximateRouteStrategy.getWindowedMode_base())});
         } catch (Throwable var4) {
            ;
         }
      }

   }

   @ObfuscatedName("ik")
   @ObfuscatedSignature(
      descriptor = "(B)V",
      garbageValue = "-37"
   )
   final void drawLoggedIn_base() {
      if(rootInterface != -1) {
         ClanChannel.method3471_base(rootInterface);
      }

      int var1;
      for(var1 = 0; var1 < rootWidgetCount; ++var1) {
         if(validRootWidgets[var1]) {
            field785[var1] = true;
         }

         field515[var1] = validRootWidgets[var1];
         validRootWidgets[var1] = false;
      }

      field557 = cycle;
      viewportX = -1;
      viewportY = -1;
      if(rootInterface != -1) {
         rootWidgetCount = 0;
         Canvas.drawWidgets_base(rootInterface, 0, 0, Language.canvasWidth, class47.canvasHeight, 0, 0, -1);
      }

      Rasterizer2D.Rasterizer2D_resetClip_base();
      if(showMouseCross) {
         if(mouseCrossColor == 1) {
            VarpDefinition.crossSprites[mouseCrossState / 100].drawTransBgAt_base(mouseCrossX - 8, mouseCrossY - 8);
         }

         if(mouseCrossColor == 2) {
            VarpDefinition.crossSprites[mouseCrossState / 100 + 4].drawTransBgAt_base(mouseCrossX - 8, mouseCrossY - 8);
         }
      }

      if(!isMenuOpen) {
         if(viewportX != -1) {
            class478.method8608_base(viewportX, viewportY);
         }
      } else if(!drawMenu()) {
         ClanSettings.method3333_base();
      }

      if(gameDrawingMode == 3) {
         for(var1 = 0; var1 < rootWidgetCount; ++var1) {
            if(field515[var1]) {
               Rasterizer2D.Rasterizer2D_fillRectangleAlpha_base(rootWidgetXs[var1], rootWidgetYs[var1], rootWidgetWidths[var1], rootWidgetHeights[var1], 16711935, 128);
            } else if(field785[var1]) {
               Rasterizer2D.Rasterizer2D_fillRectangleAlpha_base(rootWidgetXs[var1], rootWidgetYs[var1], rootWidgetWidths[var1], rootWidgetHeights[var1], 16711680, 128);
            }
         }
      }

      IgnoreList.method8061_base(ItemLayer.Client_plane, class229.localPlayer.x, class229.localPlayer.y, graphicsCycle);
      graphicsCycle = 0;
   }

   @ObfuscatedName("jx")
   @ObfuscatedSignature(
      descriptor = "(Lef;II)Z",
      garbageValue = "-2137639716"
   )
   boolean method1284(PacketWriter var1, int var2) {
      if(var1.serverPacketLength == 0) {
         class20.friendsChat = null;
         clanMemberManagerChanged(-1);
      } else {
         if(class20.friendsChat == null) {
            class20.friendsChat = new FriendsChat(class89.loginType, SpriteMask.client);
            clanMemberManagerChanged(-1);
         }

         class20.friendsChat.method8089(var1.packetBuffer, var2);
      }

      field692 = cycleCntr;
      class344.ClanChat_inClanChat = true;
      var1.serverPacket = null;
      return true;
   }

   @ObfuscatedName("ja")
   @ObfuscatedSignature(
      descriptor = "(Lef;B)Z",
      garbageValue = "-16"
   )
   boolean method1576(PacketWriter var1) {
      if(class20.friendsChat != null) {
         class20.friendsChat.method8090(var1.packetBuffer);
      }

      field692 = cycleCntr;
      class344.ClanChat_inClanChat = true;
      var1.serverPacket = null;
      return true;
   }

   @ObfuscatedName("jt")
   @ObfuscatedSignature(
      descriptor = "(Lef;B)Z",
      garbageValue = "1"
   )
   final boolean method1829(PacketWriter var1) {
      AbstractSocket var2 = var1.method2885();
      PacketBuffer var3 = var1.packetBuffer;
      if(var2 == null) {
         return false;
      } else {
         int var6;
         boolean var10000;
         String var20;
         try {
            int var5;
            if(var1.serverPacket == null) {
               if(var1.field1411) {
                  if(!var2.isAvailable_base(1)) {
                     var10000 = false;
                     return var10000;
                  }

                  var2.read_base(var1.packetBuffer.array, 0, 1);
                  var1.field1412 = 0;
                  var1.field1411 = false;
               }

               var3.offset = 0;
               if(var3.method9206_base()) {
                  if(!var2.isAvailable_base(1)) {
                     var10000 = false;
                     return var10000;
                  }

                  var2.read_base(var1.packetBuffer.array, 1, 1);
                  var1.field1412 = 0;
               }

               var1.field1411 = true;
               ServerPacket[] var4 = class12.method168();
               var5 = var3.readSmartByteShortIsaac_base();
               if(var5 < 0 || var5 >= var4.length) {
                  throw new IOException(var5 + " " + var3.offset);
               }

               var1.serverPacket = var4[var5];
               var1.serverPacketLength = var1.serverPacket.length;
            }

            if(var1.serverPacketLength == -1) {
               if(!var2.isAvailable_base(1)) {
                  var10000 = false;
                  return var10000;
               }

               var1.method2885().read_base(var3.array, 0, 1);
               var1.serverPacketLength = var3.array[0] & 255;
            }

            if(var1.serverPacketLength == -2) {
               if(!var2.isAvailable_base(2)) {
                  var10000 = false;
                  return var10000;
               }

               var1.method2885().read_base(var3.array, 0, 2);
               var3.offset = 0;
               var1.serverPacketLength = var3.readUnsignedShort_base();
            }

            if(!var2.isAvailable_base(var1.serverPacketLength)) {
               var10000 = false;
               return var10000;
            }

            var3.offset = 0;
            var2.read_base(var3.array, 0, var1.serverPacketLength);
            var1.field1412 = 0;
            timer.method7923_base();
            var1.field1416 = var1.field1409;
            var1.field1409 = var1.field1414;
            var1.field1414 = var1.serverPacket;
            String var52;
            if(ServerPacket.MESSAGE_PRIVATE_ECHO == var1.serverPacket) {
               var52 = var3.readStringCp1252NullTerminated_base();
               var20 = AbstractFont.escapeBrackets_base(class20.method303_base(class128.method3076(var3)));
               GrandExchangeOfferUnitPriceComparator.addGameMessage_base(6, var52, var20);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.LOC_MERGEPLAYER == var1.serverPacket) {
               class106.method2777_base(class306.LOC_MERGEPLAYER);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            byte var77;
            if(ServerPacket.CLANSETTINGS_FULL == var1.serverPacket) {
               class316.method5982_base();
               var77 = var3.readByte_base();
               if(var1.serverPacketLength == 1) {
                  if(var77 >= 0) {
                     currentClanSettings[var77] = null;
                  } else {
                     class478.guestClanSettings = null;
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(var77 >= 0) {
                  currentClanSettings[var77] = new ClanSettings(var3);
               } else {
                  class478.guestClanSettings = new ClanSettings(var3);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            int var7;
            int var8;
            int var9;
            int var11;
            int var21;
            int var23;
            long var63;
            InterfaceParent var75;
            if(ServerPacket.IF_INITIALSTATE == var1.serverPacket) {
               var21 = var3.offset + var1.serverPacketLength;
               var5 = var3.readUnsignedShort_base();
               if(var5 == 65535) {
                  var5 = -1;
               }

               var6 = var3.readUnsignedShort_base();
               if(var5 != rootInterface) {
                  rootInterface = var5;
                  this.method1290_base(false);
                  class130.method3095_base(rootInterface);
                  class106.runWidgetOnLoadListener_base(rootInterface);

                  for(var7 = 0; var7 < 100; ++var7) {
                     validRootWidgets[var7] = true;
                  }
               }

               InterfaceParent var59;
               for(; var6-- > 0; var59.field1047 = true) {
                  var7 = var3.readInt_base();
                  var8 = var3.readUnsignedShort_base();
                  var9 = var3.readUnsignedByte_base();
                  var59 = (InterfaceParent)interfaceParents.get((long)var7);
                  if(var59 != null && var8 != var59.group) {
                     class302.method5909(var59, true);
                     var59 = null;
                  }

                  if(var59 == null) {
                     var59 = UserComparator8.method2954(var7, var8, var9);
                  }
               }

               for(var75 = (InterfaceParent)interfaceParents.method8977(); var75 != null; var75 = (InterfaceParent)interfaceParents.method8978()) {
                  if(var75.field1047) {
                     var75.field1047 = false;
                  } else {
                     class302.method5909(var75, true);
                  }
               }

               widgetFlags = new NodeHashTable(512);

               while(var3.offset < var21) {
                  var7 = var3.readInt_base();
                  var8 = var3.readUnsignedShort_base();
                  var9 = var3.readUnsignedShort_base();
                  var23 = var3.readInt_base();

                  for(var11 = var8; var11 <= var9; ++var11) {
                     var63 = ((long)var7 << 32) + (long)var11;
                     widgetFlags.put(new IntegerNode(var23), var63);
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.SYNTH_SOUND == var1.serverPacket) {
               var21 = var3.readUnsignedShort_base();
               var5 = var3.readUnsignedByte_base();
               var6 = var3.readUnsignedShort_base();
               class460.queueSoundEffect_base(var21, var5, var6);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            int var24;
            boolean var62;
            boolean var82;
            if(ServerPacket.CAM_MOVETO_EASED_CIRCULAR == var1.serverPacket) {
               isCameraLocked = true;
               field482 = false;
               field748 = true;
               ScriptFrame.field456 = var3.readUnsignedByte_base();
               class216.field2314 = var3.readUnsignedByte_base();
               var21 = var3.readUnsignedShort_base();
               var5 = var3.readUnsignedByte_base() * 128 + 64;
               var6 = var3.readUnsignedByte_base() * 128 + 64;
               var7 = var3.readUnsignedShort_base();
               field661 = var3.readBoolean_base();
               var8 = var3.readUnsignedByte_base();
               var9 = ScriptFrame.field456 * 128 + 64;
               var23 = class216.field2314 * 128 + 64;
               var62 = false;
               var82 = false;
               if(field661) {
                  var11 = SecureRandomFuture.cameraY;
                  var24 = WorldMapDecorationType.getTileHeight_base(var9, var23, ItemLayer.Client_plane) - var21;
               } else {
                  var11 = WorldMapDecorationType.getTileHeight_base(ViewportMouse.cameraX, class36.cameraZ, ItemLayer.Client_plane) - SecureRandomFuture.cameraY;
                  var24 = var21;
               }

               field751 = new class488(ViewportMouse.cameraX, class36.cameraZ, var11, var9, var23, var24, var5, var6, var7, var8);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CHAT_FILTER_SETTINGS == var1.serverPacket) {
               publicChatMode = var3.readUnsignedByteSub_base();
               tradeChatMode = var3.readUnsignedByteAdd_base();
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            Widget var25;
            if(ServerPacket.IF_SETSCROLLPOS == var1.serverPacket) {
               var21 = var3.readUnsignedShortAdd_base();
               var5 = var3.readUnsignedIntME_base();
               var25 = HealthBarDefinition.widgetDefinition.method6287(var5);
               if(var25 != null && var25.type == 0) {
                  if(var21 > var25.scrollHeight - var25.height) {
                     var21 = var25.scrollHeight - var25.height;
                  }

                  if(var21 < 0) {
                     var21 = 0;
                  }

                  if(var21 != var25.scrollY) {
                     var25.scrollY = var21;
                     class159.method3423(var25);
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.NPC_INFO_LARGE == var1.serverPacket) {
               class90.method2383(true, var3);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.SERVER_TICK_END == var1.serverPacket) {
               field677 = null;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            boolean var98;
            if(ServerPacket.HEATMAP_TOGGLE == var1.serverPacket) {
               var98 = var3.readBoolean_base();
               if(var98) {
                  if(MidiPcmStream.field3456 == null) {
                     MidiPcmStream.field3456 = new class381();
                  }
               } else {
                  MidiPcmStream.field3456 = null;
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_SETNPCHEAD_ACTIVE == var1.serverPacket) {
               var21 = var3.readUnsignedShort_base();
               var5 = var3.readUnsignedIntME_base();
               var25 = HealthBarDefinition.widgetDefinition.method6287(var5);
               if(var25.modelType != 6 || var21 != var25.modelId) {
                  var25.modelType = 6;
                  var25.modelId = var21;
                  class159.method3423(var25);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_FRIENDCHAT_CHANNEL_FULL_V1 == var1.serverPacket) {
               var10000 = this.method1284(var1, 1);
               return var10000;
            }

            if(ServerPacket.REFLECTION_CHECKER == var1.serverPacket) {
               class153.method3310(var3, var1.serverPacketLength);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_STOCKMARKET_SLOT == var1.serverPacket) {
               var21 = var3.readUnsignedByte_base();
               if(var3.readUnsignedByte_base() == 0) {
                  grandExchangeOffers[var21] = new GrandExchangeOffer();
                  onGrandExchangeOffersChanged(var21);
                  var3.offset += 18;
               } else {
                  --var3.offset;
                  grandExchangeOffers[var21] = new GrandExchangeOffer(var3, false);
                  onGrandExchangeOffersChanged(var21);
               }

               field551 = cycleCntr;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MAP_PROJANIM_OLD == var1.serverPacket) {
               class106.method2777_base(class306.MAP_PROJANIM_OLD);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MINIMAP_TOGGLE == var1.serverPacket) {
               minimapState = var3.readUnsignedByte_base();
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.PLAYER_INFO == var1.serverPacket) {
               Interpreter.method2009(var3, var1.serverPacketLength);
               WorldMapSectionType.method4889_base();
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.VARP_SYNC == var1.serverPacket) {
               for(var21 = 0; var21 < Varps.Varps_main.length; ++var21) {
                  if(Varps.Varps_main[var21] != Varps.Varps_temp[var21]) {
                     Varps.Varps_main[var21] = Varps.Varps_temp[var21];
                     settingsChanged(var21);
                     Projectile.changeGameOptions_base(var21);
                     changedVarps[++changedVarpCount - 1 & 31] = var21;
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_CLOSESUB == var1.serverPacket) {
               var21 = var3.readInt_base();
               InterfaceParent var80 = (InterfaceParent)interfaceParents.get((long)var21);
               if(var80 != null) {
                  class302.method5909(var80, true);
               }

               if(meslayerContinueWidget != null) {
                  class159.method3423(meslayerContinueWidget);
                  meslayerContinueWidget = null;
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CLANSETTINGS_DELTA == var1.serverPacket) {
               class316.method5982_base();
               var77 = var3.readByte_base();
               class147 var78 = new class147(var3);
               ClanSettings var91;
               if(var77 >= 0) {
                  var91 = currentClanSettings[var77];
               } else {
                  var91 = class478.guestClanSettings;
               }

               if(var91 == null) {
                  this.method1295_base(var77);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(var78.field1655 > var91.field1701) {
                  this.method1295_base(var77);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(var78.field1655 < var91.field1701) {
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               var78.method3252(var91);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            int var15;
            int var65;
            if(ServerPacket.LOC_ANIM_SPECIFIC == var1.serverPacket) {
               var9 = var3.readUnsignedByteNeg_base();
               var23 = var9 >> 2;
               var11 = var9 & 3;
               var24 = field563[var23];
               var65 = var3.readUnsignedShort_base();
               var6 = var3.readUnsignedMedium_base();
               var21 = var6 >> 16;
               var5 = var6 >> 8 & 255;
               var7 = var21 + (var6 >> 4 & 7);
               var8 = var5 + (var6 & 7);
               if(var7 >= 0 && var8 >= 0 && var7 < 103 && var8 < 103) {
                  if(var24 == 0) {
                     BoundaryObject var68 = class36.scene.method5346(ItemLayer.Client_plane, var7, var8);
                     if(var68 != null) {
                        var15 = class232.Entity_unpackID_base(var68.tag);
                        if(var23 == 2) {
                           var68.renderable1 = new DynamicObject(var15, 2, var11 + 4, ItemLayer.Client_plane, var7, var8, var65, false, var68.renderable1);
                           var68.renderable2 = new DynamicObject(var15, 2, var11 + 1 & 3, ItemLayer.Client_plane, var7, var8, var65, false, var68.renderable2);
                        } else {
                           var68.renderable1 = new DynamicObject(var15, var23, var11, ItemLayer.Client_plane, var7, var8, var65, false, var68.renderable1);
                        }
                     }
                  } else if(var24 == 1) {
                     WallDecoration var67 = class36.scene.method5347(ItemLayer.Client_plane, var7, var8);
                     if(var67 != null) {
                        var15 = class232.Entity_unpackID_base(var67.tag);
                        if(var23 != 4 && var23 != 5) {
                           if(var23 == 6) {
                              var67.renderable1 = new DynamicObject(var15, 4, var11 + 4, ItemLayer.Client_plane, var7, var8, var65, false, var67.renderable1);
                           } else if(var23 == 7) {
                              var67.renderable1 = new DynamicObject(var15, 4, (var11 + 2 & 3) + 4, ItemLayer.Client_plane, var7, var8, var65, false, var67.renderable1);
                           } else if(var23 == 8) {
                              var67.renderable1 = new DynamicObject(var15, 4, var11 + 4, ItemLayer.Client_plane, var7, var8, var65, false, var67.renderable1);
                              var67.renderable2 = new DynamicObject(var15, 4, (var11 + 2 & 3) + 4, ItemLayer.Client_plane, var7, var8, var65, false, var67.renderable2);
                           }
                        } else {
                           var67.renderable1 = new DynamicObject(var15, 4, var11, ItemLayer.Client_plane, var7, var8, var65, false, var67.renderable1);
                        }
                     }
                  } else if(var24 == 2) {
                     GameObject var64 = class36.scene.method5348(ItemLayer.Client_plane, var7, var8);
                     if(var23 == 11) {
                        var23 = 10;
                     }

                     if(var64 != null) {
                        var64.renderable = new DynamicObject(class232.Entity_unpackID_base(var64.tag), var23, var11, ItemLayer.Client_plane, var7, var8, var65, false, var64.renderable);
                     }
                  } else if(var24 == 3) {
                     FloorDecoration var66 = class36.scene.method5458(ItemLayer.Client_plane, var7, var8);
                     if(var66 != null) {
                        var66.renderable = new DynamicObject(class232.Entity_unpackID_base(var66.tag), 22, var11, ItemLayer.Client_plane, var7, var8, var65, false, var66.renderable);
                     }
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            int var16;
            int var17;
            int var18;
            Projectile var19;
            int var26;
            byte var56;
            byte var81;
            if(ServerPacket.PROJANIM_SPECIFIC_OLD == var1.serverPacket) {
               var15 = var3.readUnsignedShort_base();
               var17 = var3.readUnsignedByte_base();
               var6 = var3.readUnsignedMedium_base();
               var21 = var6 >> 16;
               var5 = var6 >> 8 & 255;
               var7 = var21 + (var6 >> 4 & 7);
               var8 = var5 + (var6 & 7);
               var56 = var3.readByte_base();
               var16 = var3.readUnsignedShortAddLE_base();
               var24 = var3.readUnsignedShort_base();
               var11 = var3.method9313_base();
               var26 = var3.readUnsignedByteAdd_base() * 4;
               var65 = var3.readUnsignedByte_base() * 4;
               var18 = var3.readUnsignedShortAdd_base();
               var81 = var3.readByteAdd_base();
               var9 = var56 + var7;
               var23 = var81 + var8;
               if(var7 >= 0 && var8 >= 0 && var7 < 104 && var8 < 104 && var9 >= 0 && var23 >= 0 && var9 < 104 && var23 < 104 && var24 != 65535) {
                  var7 = var7 * 128 + 64;
                  var8 = var8 * 128 + 64;
                  var9 = var9 * 128 + 64;
                  var23 = var23 * 128 + 64;
                  var19 = new Projectile(var24, ItemLayer.Client_plane, var7, var8, WorldMapDecorationType.getTileHeight_base(var7, var8, ItemLayer.Client_plane) - var65, var15 + cycle, var16 + cycle, var17, var18, var11, var26);
                  var19.setDestination_base(var9, var23, WorldMapDecorationType.getTileHeight_base(var9, var23, ItemLayer.Client_plane) - var26, var15 + cycle);
                  projectiles.method7233(var19);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.OBJ_COUNT == var1.serverPacket) {
               class106.method2777_base(class306.OBJ_COUNT);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            Widget var22;
            if(ServerPacket.IF_SETPLAYERMODEL_BASECOLOUR == var1.serverPacket) {
               var21 = var3.readUnsignedByte_base();
               var5 = var3.readUnsignedByteAdd_base();
               var6 = var3.readInt_base();
               var22 = HealthBarDefinition.widgetDefinition.method6287(var6);
               class306.method5917(var22, var21, var5);
               class159.method3423(var22);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_OPENSUB == var1.serverPacket) {
               var21 = var3.readUnsignedShortLE_base();
               var5 = var3.readUnsignedIntIME_base();
               var6 = var3.readUnsignedByteAdd_base();
               var75 = (InterfaceParent)interfaceParents.get((long)var5);
               if(var75 != null) {
                  class302.method5909(var75, var21 != var75.group);
               }

               UserComparator8.method2954(var5, var21, var6);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_INV_FULL == var1.serverPacket) {
               var21 = var3.readInt_base();
               var5 = var3.readUnsignedShort_base();
               if(var21 < -70000) {
                  var5 += 32768;
               }

               if(var21 >= 0) {
                  var25 = HealthBarDefinition.widgetDefinition.method6287(var21);
               } else {
                  var25 = null;
               }

               if(var25 != null) {
                  for(var7 = 0; var7 < var25.itemIds.length; ++var7) {
                     var25.itemIds[var7] = 0;
                     var25.itemQuantities[var7] = 0;
                  }
               }

               class28.clearItemContainer_base(var5);
               var7 = var3.readUnsignedShort_base();

               for(var8 = 0; var8 < var7; ++var8) {
                  var9 = var3.readUnsignedShortAdd_base();
                  var23 = var3.readUnsignedByteAdd_base();
                  if(var23 == 255) {
                     var23 = var3.readInt_base();
                  }

                  if(var25 != null && var8 < var25.itemIds.length) {
                     var25.itemIds[var8] = var9;
                     var25.itemQuantities[var8] = var23;
                  }

                  class185.itemContainerSetItem_base(var5, var8, var9 - 1, var23);
               }

               if(var25 != null) {
                  class159.method3423(var25);
               }

               class396.method7403_base();
               changedItemContainers[++field685 - 1 & 31] = var5 & 32767;
               ItemContainer.onItemContainerUpdate(field685 + 1 - 1 & 31);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            Widget var74;
            if(ServerPacket.IF_CLEARINV == var1.serverPacket) {
               var21 = var3.readUnsignedIntIME_base();
               var74 = HealthBarDefinition.widgetDefinition.method6287(var21);

               for(var6 = 0; var6 < var74.itemIds.length; ++var6) {
                  var74.itemIds[var6] = -1;
                  var74.itemIds[var6] = 0;
               }

               class159.method3423(var74);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            long var27;
            long var29;
            String var34;
            if(ServerPacket.MESSAGE_PRIVATE == var1.serverPacket) {
               var52 = var3.readStringCp1252NullTerminated_base();
               var27 = (long)var3.readUnsignedShort_base();
               var29 = (long)var3.readUnsignedMedium_base();
               PlayerType var90 = (PlayerType)class12.method170(class320.method6191(), var3.readUnsignedByte_base());
               long var32 = (var27 << 32) + var29;
               var82 = false;

               for(var65 = 0; var65 < 100; ++var65) {
                  if(crossWorldMessageIds[var65] == var32) {
                     var82 = true;
                     break;
                  }
               }

               if(class12.friendSystem.method1908(new Username(var52, class89.loginType))) {
                  var82 = true;
               }

               if(!var82 && field736 == 0) {
                  crossWorldMessageIds[crossWorldMessageIdsIndex] = var32;
                  crossWorldMessageIdsIndex = (crossWorldMessageIdsIndex + 1) % 100;
                  var34 = AbstractFont.escapeBrackets_base(class20.method303_base(class128.method3076(var3)));
                  byte var87;
                  if(var90.isPrivileged) {
                     var87 = 7;
                  } else {
                     var87 = 3;
                  }

                  if(var90.modIcon != -1) {
                     GrandExchangeOfferUnitPriceComparator.addGameMessage_base(var87, FloorUnderlayDefinition.method3799_base(var90.modIcon) + var52, var34);
                  } else {
                     GrandExchangeOfferUnitPriceComparator.addGameMessage_base(var87, var52, var34);
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CHAT_FILTER_SETTINGS_PRIVATECHAT == var1.serverPacket) {
               PlayerCompositionColorTextureOverride.privateChatMode = WorldMapArea.method4580(var3.readUnsignedByte_base());
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CAM_LOOKAT_EASED_ANGLE_ABSOLUTE == var1.serverPacket) {
               isCameraLocked = true;
               field482 = false;
               field749 = true;
               var21 = class319.method6186_base(var3.readShort_base() & 2027);
               var5 = class240.method4829_base(var3.readShort_base() & 2027);
               var6 = var3.readUnsignedShort_base();
               var7 = var3.readUnsignedByte_base();
               field672 = new class490(Varcs.cameraPitch, var5, var6, var7);
               field752 = new class490(class192.cameraYaw, var21, var6, var7);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_REBOOT_TIMER == var1.serverPacket) {
               rebootTimer = var3.readUnsignedShort_base() * 30;
               field697 = cycleCntr;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_SETPLAYERHEAD == var1.serverPacket) {
               var21 = var3.readInt_base();
               var74 = HealthBarDefinition.widgetDefinition.method6287(var21);
               var74.modelType = 3;
               var74.modelId = class229.localPlayer.appearance.getChatHeadId_base();
               class159.method3423(var74);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_SETANIM == var1.serverPacket) {
               var21 = var3.readShortLE_base();
               var5 = var3.readInt_base();
               var25 = HealthBarDefinition.widgetDefinition.method6287(var5);
               if(var21 != var25.sequenceId || var21 == -1) {
                  var25.sequenceId = var21;
                  var25.modelFrame = 0;
                  var25.modelFrameCycle = 0;
                  class159.method3423(var25);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_RUNENERGY == var1.serverPacket) {
               class396.method7403_base();
               runEnergy = var3.readUnsignedShort_base();
               field697 = cycleCntr;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.VARP_SMALL == var1.serverPacket) {
               var77 = var3.readByteNeg_base();
               var5 = var3.readUnsignedShort_base();
               Varps.Varps_temp[var5] = var77;
               if(Varps.Varps_main[var5] != var77) {
                  Varps.Varps_main[var5] = var77;
                  settingsChanged(var5);
               }

               Projectile.changeGameOptions_base(var5);
               changedVarps[++changedVarpCount - 1 & 31] = var5;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_FRIENDCHAT_CHANNEL_FULL_V2 == var1.serverPacket) {
               var10000 = this.method1284(var1, 2);
               return var10000;
            }

            if(ServerPacket.MAP_ANIM == var1.serverPacket) {
               class106.method2777_base(class306.MAP_ANIM);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.HINT_ARROW == var1.serverPacket) {
               hintArrowType = var3.readUnsignedByte_base();
               if(hintArrowType == 1) {
                  hintArrowNpcIndex = var3.readUnsignedShort_base();
               }

               if(hintArrowType >= 2 && hintArrowType <= 6) {
                  if(hintArrowType == 2) {
                     hintArrowSubX = 64;
                     hintArrowSubY = 1940221888;
                  }

                  if(hintArrowType == 3) {
                     hintArrowSubX = 0;
                     hintArrowSubY = 1940221888;
                  }

                  if(hintArrowType == 4) {
                     hintArrowSubX = 128;
                     hintArrowSubY = 1940221888;
                  }

                  if(hintArrowType == 5) {
                     hintArrowSubX = 64;
                     hintArrowSubY = 0;
                  }

                  if(hintArrowType == 6) {
                     hintArrowSubX = 64;
                     hintArrowSubY = -414523520;
                  }

                  hintArrowType = 2;
                  hintArrowX = var3.readUnsignedShort_base();
                  hintArrowY = var3.readUnsignedShort_base();
                  hintArrowHeight = var3.readUnsignedByte_base();
               }

               if(hintArrowType == 10) {
                  hintArrowPlayerIndex = var3.readUnsignedShort_base();
                  hintPlayerChanged(-1);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.VARCLAN == var1.serverPacket) {
               if(field677 == null) {
                  field677 = new class466(Players.Widget_cachedFonts);
               }

               class535 var53 = Players.Widget_cachedFonts.method8536(var3);
               field677.field4799.vmethod9001_base(var53.field5204, var53.field5205);
               field688[++field689 - 1 & 31] = var53.field5204;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_SETMODEL == var1.serverPacket) {
               var21 = var3.readUnsignedShort_base();
               var5 = var3.readUnsignedIntLE_base();
               var25 = HealthBarDefinition.widgetDefinition.method6287(var5);
               if(var25.modelType != 1 || var21 != var25.modelId) {
                  var25.modelType = 1;
                  var25.modelId = var21;
                  class159.method3423(var25);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.NPC_SPOTANIM_SPECIFIC == var1.serverPacket) {
               var5 = var3.readUnsignedShortLE_base();
               var7 = var3.readUnsignedByteAdd_base();
               var6 = var3.readUnsignedIntME_base();
               var21 = var3.readUnsignedShortAdd_base();
               Player var95;
               if(var21 == localPlayerIndex) {
                  var95 = class229.localPlayer;
               } else {
                  var95 = players[var21];
               }

               if(var95 != null) {
                  var95.updateSpotAnimation_base(var7, var5, var6 >> 16, var6 & 65535);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_INV_STOPTRANSMIT == var1.serverPacket) {
               var21 = var3.readUnsignedShortAdd_base();
               WorldMapEvent.method5099_base(var21);
               changedItemContainers[++field685 - 1 & 31] = var21 & 32767;
               ItemContainer.onItemContainerUpdate(field685 + 1 - 1 & 31);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.SEND_PING == var1.serverPacket) {
               var21 = var3.readInt_base();
               var5 = var3.readInt_base();
               var6 = class167.getGcDuration_base();
               PacketBufferNode var79 = class113.method2919(ClientPacket.SEND_PING_REPLY, packetWriter.isaacCipher);
               var79.packetBuffer.writeIntIME_base(var21);
               var79.packetBuffer.writeIntME_base(var5);
               var79.packetBuffer.writeByteNeg_base(var6);
               var79.packetBuffer.writeByte_base(GameEngine.fps);
               packetWriter.method2867(var79);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            String var84;
            if(ServerPacket.SET_PLAYER_OP == var1.serverPacket) {
               var21 = var3.readUnsignedByte_base();
               var5 = var3.readUnsignedByteSub_base();
               var84 = var3.readStringCp1252NullTerminated_base();
               if(var21 >= 1 && var21 <= 8) {
                  if(var84.equalsIgnoreCase("null")) {
                     var84 = null;
                  }

                  playerMenuActions[var21 - 1] = var84;
                  playerOptionsChanged(var21 - 1);
                  playerOptionsPriorities[var21 - 1] = var5 == 0;
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.FRIENDLIST_LOADED == var1.serverPacket) {
               class12.friendSystem.method1929_base();
               field747 = cycleCntr;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.VARCLAN_ENABLE == var1.serverPacket) {
               field677 = new class466(Players.Widget_cachedFonts);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.field3280 == var1.serverPacket) {
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CAM_SHAKE == var1.serverPacket) {
               var21 = var3.readUnsignedByte_base();
               var5 = var3.readUnsignedByte_base();
               var6 = var3.readUnsignedByte_base();
               var7 = var3.readUnsignedByte_base();
               field755[var21] = true;
               field756[var21] = var5;
               field704[var21] = var6;
               field758[var21] = var7;
               field728[var21] = 0;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            Widget var93;
            if(ServerPacket.IF_SETANGLE == var1.serverPacket) {
               var21 = var3.readUnsignedShortAdd_base();
               var5 = var3.readInt_base();
               var6 = var3.readUnsignedShortLE_base();
               var7 = var3.readUnsignedShortAddLE_base();
               var93 = HealthBarDefinition.widgetDefinition.method6287(var5);
               if(var21 != var93.modelAngleX || var6 != var93.modelAngleY || var7 != var93.modelZoom) {
                  var93.modelAngleX = var21;
                  var93.modelAngleY = var6;
                  var93.modelZoom = var7;
                  class159.method3423(var93);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MAP_PROJANIM == var1.serverPacket) {
               class106.method2777_base(class306.MAP_PROJANIM);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CAM_UNKNOWN == var1.serverPacket) {
               var21 = var3.readInt_base();
               if(var21 != field584) {
                  field584 = var21;
                  VerticalAlignment.method3756_base();
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_FRIENDLIST == var1.serverPacket) {
               class12.friendSystem.method1904(var3, var1.serverPacketLength);
               field747 = cycleCntr;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_TRADINGPOST == var1.serverPacket) {
               var98 = var3.readUnsignedByte_base() == 1;
               if(var98) {
                  class489.field4905 = SpotAnimationDefinition.method3775_base() - var3.readLong_base();
                  class6.grandExchangeEvents = new GrandExchangeEvents(var3, true);
               } else {
                  class6.grandExchangeEvents = null;
               }

               field782 = cycleCntr;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_OPENTOP == var1.serverPacket) {
               var21 = var3.readUnsignedShort_base();
               if(var21 == 65535) {
                  var21 = -1;
               }

               rootInterface = var21;
               this.method1290_base(false);
               class130.method3095_base(var21);
               class106.runWidgetOnLoadListener_base(rootInterface);

               for(var5 = 0; var5 < 100; ++var5) {
                  validRootWidgets[var5] = true;
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.NPC_ANIM_SPECIFIC == var1.serverPacket) {
               var21 = var3.readUnsignedShortAddLE_base();
               var6 = var3.readUnsignedByteSub_base();
               var5 = var3.readUnsignedShortLE_base();
               if(var5 == 65535) {
                  var5 = -1;
               }

               NPC var76 = npcs[var21];
               if(var76 != null) {
                  if(var5 == var76.sequence && var5 != -1) {
                     var8 = DynamicObject.method2245(var5).restartMode;
                     if(var8 == 1) {
                        var76.sequenceFrame = 0;
                        var76.sequenceFrameCycle = 0;
                        var76.sequenceDelay = var6;
                        var76.field1199 = 0;
                     } else if(var8 == 2) {
                        var76.field1199 = 0;
                     }
                  } else if(var5 == -1 || var76.sequence == -1 || DynamicObject.method2245(var5).field2223 >= DynamicObject.method2245(var76.sequence).field2223) {
                     var76.sequence = var5;
                     var76.animationChanged(-1);
                     var76.sequenceFrame = 0;
                     var76.sequenceFrameCycle = 0;
                     var76.sequenceDelay = var6;
                     var76.field1199 = 0;
                     var76.field1220 = var76.pathLength;
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.RESET_ANIMS == var1.serverPacket) {
               for(var21 = 0; var21 < players.length; ++var21) {
                  if(players[var21] != null) {
                     players[var21].sequence = -1;
                     players[var21].animationChanged(-1);
                  }
               }

               for(var21 = 0; var21 < npcs.length; ++var21) {
                  if(npcs[var21] != null) {
                     npcs[var21].sequence = -1;
                     npcs[var21].animationChanged(-1);
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.NPC_INFO_SMALL == var1.serverPacket) {
               class90.method2383(false, var3);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.LOGOUT == var1.serverPacket) {
               class13.logOut_base();
               var1.serverPacket = null;
               var10000 = false;
               return var10000;
            }

            if(ServerPacket.UPDATE_RUNWEIGHT == var1.serverPacket) {
               class396.method7403_base();
               weight = var3.readShort_base();
               field697 = cycleCntr;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.OBJ_ADD == var1.serverPacket) {
               class106.method2777_base(class306.OBJ_ADD);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CAM_MOVETO == var1.serverPacket) {
               isCameraLocked = true;
               field482 = false;
               field748 = false;
               ScriptFrame.field456 = var3.readUnsignedByte_base();
               class216.field2314 = var3.readUnsignedByte_base();
               class127.field1488 = var3.readUnsignedShort_base();
               WorldMapIcon_0.field2529 = var3.readUnsignedByte_base();
               class1.field2 = var3.readUnsignedByte_base();
               if(class1.field2 >= 100) {
                  ViewportMouse.cameraX = ScriptFrame.field456 * 128 + 64;
                  class36.cameraZ = class216.field2314 * 128 + 64;
                  SecureRandomFuture.cameraY = WorldMapDecorationType.getTileHeight_base(ViewportMouse.cameraX, class36.cameraZ, ItemLayer.Client_plane) - class127.field1488;
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_FRIENDCHAT_CHANNEL_SINGLEUSER == var1.serverPacket) {
               var10000 = this.method1576(var1);
               return var10000;
            }

            if(ServerPacket.SET_MAP_FLAG == var1.serverPacket) {
               destinationX = var3.readUnsignedByte_base();
               if(destinationX == 255) {
                  destinationX = 0;
               }

               destinationY = var3.readUnsignedByte_base();
               if(destinationY == 255) {
                  destinationY = 0;
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_UID192 == var1.serverPacket) {
               var3.offset += 28;
               if(var3.checkCrc_base()) {
                  class336.method6305(var3, var3.offset - 28);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            long var36;
            if(ServerPacket.MESSAGE_CLANCHANNEL_SYSTEM == var1.serverPacket) {
               var77 = var3.readByte_base();
               var27 = (long)var3.readUnsignedShort_base();
               var29 = (long)var3.readUnsignedMedium_base();
               var36 = (var27 << 32) + var29;
               var62 = false;
               ClanChannel var96 = var77 >= 0?currentClanChannels[var77]:ItemContainer.guestClanChannel;
               if(var96 == null) {
                  var62 = true;
               } else {
                  for(var65 = 0; var65 < 100; ++var65) {
                     if(var36 == crossWorldMessageIds[var65]) {
                        var62 = true;
                        break;
                     }
                  }
               }

               if(!var62) {
                  crossWorldMessageIds[crossWorldMessageIdsIndex] = var36;
                  crossWorldMessageIdsIndex = (crossWorldMessageIdsIndex + 1) % 100;
                  var34 = class128.method3076(var3);
                  var26 = var77 >= 0?43:46;
                  ArchiveLoader.addChatMessage_base(var26, "", var34, var96.name);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MIDI_SONG == var1.serverPacket) {
               var8 = var3.readUnsignedShortAddLE_base();
               var5 = var3.readUnsignedShortLE_base();
               var7 = var3.readUnsignedShortAdd_base();
               var6 = var3.readUnsignedShortLE_base();
               var21 = var3.readUnsignedShortAddLE_base();
               if(var21 == 65535) {
                  var21 = -1;
               }

               ArrayList var31 = new ArrayList();
               var31.add(Integer.valueOf(var21));
               class135.method3152_base(var31, var5, var6, var7, var8);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_SETTEXT == var1.serverPacket) {
               var21 = var3.readUnsignedIntIME_base();
               var20 = var3.readStringCp1252NullTerminated_base();
               var25 = HealthBarDefinition.widgetDefinition.method6287(var21);
               if(!var20.equals(var25.text)) {
                  var25.text = var20;
                  class159.method3423(var25);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MIDI_SWAP == var1.serverPacket) {
               var5 = var3.readUnsignedShort_base();
               var7 = var3.readUnsignedShortAdd_base();
               var21 = var3.readUnsignedShortLE_base();
               var6 = var3.readUnsignedShortAddLE_base();
               class191.method3758_base(var21, var5, var6, var7);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_IGNORELIST == var1.serverPacket) {
               class12.friendSystem.ignoreList.method8056(var3, var1.serverPacketLength);
               DelayFadeTask.FriendSystem_invalidateIgnoreds_base();
               field747 = cycleCntr;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.LOC_ANIM == var1.serverPacket) {
               class106.method2777_base(class306.LOC_ANIM);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            String var40;
            if(ServerPacket.MESSAGE_FRIENDCHANNEL == var1.serverPacket) {
               var52 = var3.readStringCp1252NullTerminated_base();
               var27 = var3.readLong_base();
               var29 = (long)var3.readUnsignedShort_base();
               var36 = (long)var3.readUnsignedMedium_base();
               PlayerType var97 = (PlayerType)class12.method170(class320.method6191(), var3.readUnsignedByte_base());
               var63 = (var29 << 32) + var36;
               boolean var85 = false;

               for(var15 = 0; var15 < 100; ++var15) {
                  if(crossWorldMessageIds[var15] == var63) {
                     var85 = true;
                     break;
                  }
               }

               if(var97.isUser && class12.friendSystem.method1908(new Username(var52, class89.loginType))) {
                  var85 = true;
               }

               if(!var85 && field736 == 0) {
                  crossWorldMessageIds[crossWorldMessageIdsIndex] = var63;
                  crossWorldMessageIdsIndex = (crossWorldMessageIdsIndex + 1) % 100;
                  var40 = AbstractFont.escapeBrackets_base(class20.method303_base(class128.method3076(var3)));
                  if(var97.modIcon != -1) {
                     ArchiveLoader.addChatMessage_base(9, FloorUnderlayDefinition.method3799_base(var97.modIcon) + var52, var40, HitSplatDefinition.base37DecodeLong_base(var27));
                  } else {
                     ArchiveLoader.addChatMessage_base(9, var52, var40, HitSplatDefinition.base37DecodeLong_base(var27));
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.RUNCLIENTSCRIPT == var1.serverPacket) {
               var52 = var3.readStringCp1252NullTerminated_base();
               Object[] var73 = new Object[var52.length() + 1];

               for(var6 = var52.length() - 1; var6 >= 0; --var6) {
                  if(var52.charAt(var6) == 's') {
                     var73[var6 + 1] = var3.readStringCp1252NullTerminated_base();
                  } else {
                     var73[var6 + 1] = new Integer(var3.readInt_base());
                  }
               }

               var73[0] = new Integer(var3.readInt_base());
               ScriptEvent var89 = new ScriptEvent();
               var89.args = var73;
               class157.method3403(var89);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CAM_MODE == var1.serverPacket) {
               var21 = var3.readUnsignedByte_base();
               WorldMapIcon_1.method4514_base(var21);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.TRIGGER_ONDIALOGABORT == var1.serverPacket) {
               if(rootInterface != -1) {
                  class514.runIntfCloseListeners_base(rootInterface, 0);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CAM_SMOOTH_RESET == var1.serverPacket && isCameraLocked) {
               field482 = true;
               field749 = false;
               field748 = false;

               for(var21 = 0; var21 < 5; ++var21) {
                  field755[var21] = false;
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_SETCOLOUR == var1.serverPacket) {
               var21 = var3.readUnsignedShortLE_base();
               var5 = var3.readInt_base();
               var6 = var21 >> 10 & 31;
               var7 = var21 >> 5 & 31;
               var8 = var21 & 31;
               var9 = (var7 << 11) + (var6 << 19) + (var8 << 3);
               Widget var58 = HealthBarDefinition.widgetDefinition.method6287(var5);
               if(var9 != var58.color) {
                  var58.color = var9;
                  class159.method3423(var58);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            NPC var94;
            if(ServerPacket.PLAYER_SPOTANIM_SPECIFIC == var1.serverPacket) {
               var21 = var3.readUnsignedShortAddLE_base();
               var94 = npcs[var21];
               var6 = var3.readUnsignedShortAddLE_base();
               var5 = var3.readUnsignedIntIME_base();
               var7 = var3.readUnsignedByteAdd_base();
               if(var94 != null) {
                  var94.updateSpotAnimation_base(var7, var6, var5 >> 16, var5 & 65535);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CLANCHANNEL_FULL == var1.serverPacket) {
               field588 = cycleCntr;
               var77 = var3.readByte_base();
               if(var1.serverPacketLength == 1) {
                  if(var77 >= 0) {
                     currentClanChannels[var77] = null;
                     onCurrentClanChannelsChanged(var77);
                  } else {
                     ItemContainer.guestClanChannel = null;
                     onGuestClanChannelChanged(-1);
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(var77 >= 0) {
                  currentClanChannels[var77] = new ClanChannel(var3);
                  onCurrentClanChannelsChanged(var77);
               } else {
                  ItemContainer.guestClanChannel = new ClanChannel(var3);
                  onGuestClanChannelChanged(-1);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.NPC_HEADICON_SPECIFIC == var1.serverPacket) {
               var21 = var3.readUnsignedIntME_base();
               var5 = var3.readUnsignedShortLE_base();
               short var60 = (short)var3.readShort_base();
               var7 = var3.readUnsignedByteAdd_base();
               var94 = npcs[var5];
               if(var94 != null) {
                  var94.method2666_base(var7, var21, var60);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_ZONE_PARTIAL_ENCLOSED == var1.serverPacket) {
               class18.field85 = var3.readUnsignedByteSub_base();
               class6.field14 = var3.readUnsignedByteNeg_base();

               while(var3.offset < var1.serverPacketLength) {
                  var21 = var3.readUnsignedByte_base();
                  class306 var72 = class520.method9189_base()[var21];
                  class106.method2777_base(var72);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CLANCHANNEL_DELTA == var1.serverPacket) {
               field588 = cycleCntr;
               var77 = var3.readByte_base();
               class161 var71 = new class161(var3);
               ClanChannel var88;
               if(var77 >= 0) {
                  var88 = currentClanChannels[var77];
               } else {
                  var88 = ItemContainer.guestClanChannel;
               }

               if(var88 == null) {
                  this.method1294_base(var77);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(var71.field1752 > var88.field1772) {
                  this.method1294_base(var77);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(var71.field1752 < var88.field1772) {
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               var71.method3437(var88);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MAP_PROJANIM_OLD_OLD == var1.serverPacket) {
               class106.method2777_base(class306.MAP_PROJANIM_OLD_OLD);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.SOUND_AREA == var1.serverPacket) {
               class106.method2777_base(class306.SOUND_AREA);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_STAT_OLD == var1.serverPacket) {
               class396.method7403_base();
               var21 = var3.readUnsignedByteNeg_base();
               var5 = var3.readUnsignedIntLE_base();
               var6 = var3.readUnsignedByte_base();
               experience[var21] = var5;
               experiencedChanged(var21);
               currentLevels[var21] = var6;
               levels[var21] = 1;
               field540[var21] = var6;

               for(var7 = 0; var7 < 98; ++var7) {
                  if(var5 >= Skills.Skills_experienceTable[var7]) {
                     levels[var21] = var7 + 2;
                  }
               }

               changedSkills[++changedSkillsCount - 1 & 31] = var21;
               boostedSkillLevelsChanged(changedSkillsCount + 1 - 1 & 31);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.OBJ_DEL == var1.serverPacket) {
               class106.method2777_base(class306.OBJ_DEL);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_SITESETTINGS == var1.serverPacket) {
               class410.method7801_base(var3.readStringCp1252NullTerminated_base());
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            boolean var57;
            if(ServerPacket.IF_SETHIDE == var1.serverPacket) {
               var21 = var3.readUnsignedIntLE_base();
               var57 = var3.readUnsignedByte_base() == 1;
               var25 = HealthBarDefinition.widgetDefinition.method6287(var21);
               if(var57 != var25.isHidden) {
                  var25.isHidden = var57;
                  class159.method3423(var25);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.LOC_DEL == var1.serverPacket) {
               class106.method2777_base(class306.LOC_DEL);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_ZONE_PARTIAL_FOLLOWS == var1.serverPacket) {
               class18.field85 = var3.readUnsignedByteAdd_base();
               class6.field14 = var3.readUnsignedByteNeg_base();
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.VARP_RESET == var1.serverPacket) {
               for(var21 = 0; var21 < VarpDefinition.field1815; ++var21) {
                  VarpDefinition var70 = FloorOverlayDefinition.method4037(var21);
                  if(var70 != null) {
                     Varps.Varps_temp[var21] = 0;
                     Varps.Varps_main[var21] = 0;
                     settingsChanged(var21);
                  }
               }

               class396.method7403_base();
               changedVarpCount += 32;
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.LOC_ADD_CHANGE == var1.serverPacket) {
               class106.method2777_base(class306.LOC_ADD_CHANGE);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_INV_PARTIAL == var1.serverPacket) {
               var21 = var3.readInt_base();
               var5 = var3.readUnsignedShort_base();
               if(var21 < -70000) {
                  var5 += 32768;
               }

               if(var21 >= 0) {
                  var25 = HealthBarDefinition.widgetDefinition.method6287(var21);
               } else {
                  var25 = null;
               }

               for(; var3.offset < var1.serverPacketLength; class185.itemContainerSetItem_base(var5, var7, var8 - 1, var9)) {
                  var7 = var3.readUShortSmart_base();
                  var8 = var3.readUnsignedShort_base();
                  var9 = 0;
                  if(var8 != 0) {
                     var9 = var3.readUnsignedByte_base();
                     if(var9 == 255) {
                        var9 = var3.readInt_base();
                     }
                  }

                  if(var25 != null && var7 >= 0 && var7 < var25.itemIds.length) {
                     var25.itemIds[var7] = var8;
                     var25.itemQuantities[var7] = var9;
                  }
               }

               if(var25 != null) {
                  class159.method3423(var25);
               }

               class396.method7403_base();
               changedItemContainers[++field685 - 1 & 31] = var5 & 32767;
               ItemContainer.onItemContainerUpdate(field685 + 1 - 1 & 31);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.LOGOUT_TRANSFER == var1.serverPacket) {
               World var51 = new World();
               var51.host = var3.readStringCp1252NullTerminated_base();
               var51.id = var3.readUnsignedShort_base();
               var5 = var3.readInt_base();
               var51.properties = var5;
               if(var51.isDeadman_base()) {
                  var51.field808 = "beta";
               }

               WorldMapSection2.updateGameState_base(45);
               var2.close_base();
               var2 = null;
               class28.method449(var51);
               var1.serverPacket = null;
               var10000 = false;
               return var10000;
            }

            if(ServerPacket.IF_MOVESUB == var1.serverPacket) {
               var21 = var3.readUnsignedIntME_base();
               var5 = var3.readUnsignedIntIME_base();
               InterfaceParent var86 = (InterfaceParent)interfaceParents.get((long)var5);
               var75 = (InterfaceParent)interfaceParents.get((long)var21);
               if(var75 != null) {
                  class302.method5909(var75, var86 == null || var86.group != var75.group);
               }

               if(var86 != null) {
                  var86.remove_base();
                  interfaceParents.put(var86, (long)var21);
               }

               var93 = HealthBarDefinition.widgetDefinition.method6287(var5);
               if(var93 != null) {
                  class159.method3423(var93);
               }

               var93 = HealthBarDefinition.widgetDefinition.method6287(var21);
               if(var93 != null) {
                  class159.method3423(var93);
                  class132.method3138(HealthBarDefinition.widgetDefinition.Widget_interfaceComponents[var93.id >>> 16], var93, true);
               }

               if(rootInterface != -1) {
                  class514.runIntfCloseListeners_base(rootInterface, 1);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CAM_MOVETO_EASED == var1.serverPacket) {
               isCameraLocked = true;
               field482 = false;
               field748 = true;
               ScriptFrame.field456 = var3.readUnsignedByte_base();
               class216.field2314 = var3.readUnsignedByte_base();
               var21 = var3.readUnsignedShort_base();
               var5 = var3.readUnsignedShort_base();
               field661 = var3.readBoolean_base();
               var6 = var3.readUnsignedByte_base();
               var7 = ScriptFrame.field456 * 128 + 64;
               var8 = class216.field2314 * 128 + 64;
               boolean var61 = false;
               boolean var83 = false;
               if(field661) {
                  var9 = SecureRandomFuture.cameraY;
                  var23 = WorldMapDecorationType.getTileHeight_base(var7, var8, ItemLayer.Client_plane) - var21;
               } else {
                  var9 = WorldMapDecorationType.getTileHeight_base(ViewportMouse.cameraX, class36.cameraZ, ItemLayer.Client_plane) - SecureRandomFuture.cameraY;
                  var23 = var21;
               }

               field751 = new class489(ViewportMouse.cameraX, class36.cameraZ, var9, var7, var8, var23, var5, var6);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MIDI_SONG_WITHSECONDARY == var1.serverPacket) {
               var9 = var3.readUnsignedShortLE_base();
               var8 = var3.readUnsignedShortAddLE_base();
               var21 = var3.readUnsignedShortAddLE_base();
               if(var21 == 65535) {
                  var21 = -1;
               }

               var7 = var3.readUnsignedShortLE_base();
               var6 = var3.readUnsignedShortLE_base();
               var5 = var3.readUnsignedShortLE_base();
               if(var5 == 65535) {
                  var5 = -1;
               }

               ArrayList var55 = new ArrayList();
               var55.add(Integer.valueOf(var21));
               var55.add(Integer.valueOf(var5));
               class135.method3152_base(var55, var6, var7, var8, var9);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.REBUILD_REGION == var1.serverPacket) {
               GrandExchangeOfferUnitPriceComparator.method7148(true, var1.packetBuffer, false);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.PROJANIM_SPECIFIC == var1.serverPacket) {
               var11 = var3.method9313_base();
               var26 = var3.readUnsignedByteSub_base() * 4;
               var24 = var3.readUnsignedShortAddLE_base();
               var6 = var3.method9418_base();
               var21 = var6 >> 16;
               var5 = var6 >> 8 & 255;
               var7 = var21 + (var6 >> 4 & 7);
               var8 = var5 + (var6 & 7);
               var15 = var3.readUnsignedShortLE_base();
               var56 = var3.readByte_base();
               var18 = var3.readUnsignedByteNeg_base();
               var16 = var3.readUnsignedShortAdd_base();
               var17 = var3.readUnsignedByteAdd_base();
               var81 = var3.readByteAdd_base();
               var65 = var3.readUnsignedByte_base() * 4;
               var9 = var56 + var7;
               var23 = var81 + var8;
               if(var7 >= 0 && var8 >= 0 && var7 < 104 && var8 < 104 && var9 >= 0 && var23 >= 0 && var9 < 104 && var23 < 104 && var24 != 65535) {
                  var7 = var7 * 128 + 64;
                  var8 = var8 * 128 + 64;
                  var9 = var9 * 128 + 64;
                  var23 = var23 * 128 + 64;
                  var19 = new Projectile(var24, ItemLayer.Client_plane, var7, var8, WorldMapDecorationType.getTileHeight_base(var7, var8, ItemLayer.Client_plane) - var65, var15 + cycle, var16 + cycle, var17, var18, var11, var26);
                  var19.setDestination_base(var9, var23, WorldMapDecorationType.getTileHeight_base(var9, var23, ItemLayer.Client_plane) - var26, var15 + cycle);
                  projectiles.method7233(var19);
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.REBUILD_NORMAL_OLD == var1.serverPacket) {
               GrandExchangeOfferUnitPriceComparator.method7148(false, var1.packetBuffer, false);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.REBUILD_NORMAL == var1.serverPacket) {
               GrandExchangeOfferUnitPriceComparator.method7148(false, var1.packetBuffer, true);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MIDI_SONG_STOP == var1.serverPacket) {
               var5 = var3.readUnsignedShortAddLE_base();
               var21 = var3.readUnsignedShortLE_base();
               WorldMapRenderer.method4769_base(var21, var5);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_SETPOSITION == var1.serverPacket) {
               var21 = var3.readShortLE_base();
               var5 = var3.readShortLEAdd_base();
               var6 = var3.readUnsignedIntIME_base();
               var22 = HealthBarDefinition.widgetDefinition.method6287(var6);
               if(var5 != var22.rawX || var21 != var22.rawY || var22.xAlignment != 0 || var22.yAlignment != 0) {
                  var22.rawX = var5;
                  var22.rawY = var21;
                  var22.xAlignment = 0;
                  var22.yAlignment = 0;
                  class159.method3423(var22);
                  this.method1536(var22);
                  if(var22.type == 0) {
                     class132.method3138(HealthBarDefinition.widgetDefinition.Widget_interfaceComponents[var6 >> 16], var22, false);
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MIDI_SONG_OLD == var1.serverPacket) {
               var21 = var3.readUnsignedShort_base();
               if(var21 == 65535) {
                  var21 = -1;
               }

               class102.playSong_base(var21);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.MIDI_JINGLE == var1.serverPacket) {
               var21 = var3.method9310_base();
               var5 = var3.readUnsignedShortAdd_base();
               if(var5 == 65535) {
                  var5 = -1;
               }

               FileSystem.playJingle_base(var5, var21);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CAM_LOOKAT_EASED_ANGLE_RELATIVE == var1.serverPacket) {
               isCameraLocked = true;
               field482 = false;
               field749 = true;
               var21 = var3.readShort_base();
               var5 = var3.readShort_base();
               var6 = class240.method4829_base(var5 + Varcs.cameraPitch & 2027);
               var7 = var21 + class192.cameraYaw;
               var8 = var3.readUnsignedShort_base();
               var9 = var3.readUnsignedByte_base();
               field672 = new class490(Varcs.cameraPitch, var6, var8, var9);
               field752 = new class490(class192.cameraYaw, var7, var8, var9);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.IF_SETROTATESPEED == var1.serverPacket) {
               var21 = var3.readUnsignedShortLE_base();
               var5 = var3.readUnsignedShortLE_base();
               var6 = var3.readUnsignedIntIME_base();
               var22 = HealthBarDefinition.widgetDefinition.method6287(var6);
               var22.field3716 = var5 + (var21 << 16);
               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.UPDATE_ZONE_FULL_FOLLOWS == var1.serverPacket) {
               class18.field85 = var3.readUnsignedByteAdd_base();
               class6.field14 = var3.readUnsignedByteAdd_base();

               for(var21 = class18.field85; var21 < class18.field85 + 8; ++var21) {
                  for(var5 = class6.field14; var5 < class6.field14 + 8; ++var5) {
                     if(groundItems[ItemLayer.Client_plane][var21][var5] != null) {
                        groundItems[ItemLayer.Client_plane][var21][var5] = null;
                        ClanSettings.updateItemPile_base(var21, var5);
                     }
                  }
               }

               for(PendingSpawn var50 = (PendingSpawn)pendingSpawns.method7265(); var50 != null; var50 = (PendingSpawn)pendingSpawns.method7235()) {
                  if(var50.x >= class18.field85 && var50.x < class18.field85 + 8 && var50.y >= class6.field14 && var50.y < class6.field14 + 8 && var50.plane == ItemLayer.Client_plane) {
                     var50.hitpoints = 0;
                  }
               }

               var1.serverPacket = null;
               var10000 = true;
               return var10000;
            }

            if(ServerPacket.CAM_LOOKAT_EASED_COORD != var1.serverPacket) {
               if(ServerPacket.IF_SETPLAYERMODEL_SELF == var1.serverPacket) {
                  var21 = var3.readUnsignedIntLE_base();
                  var57 = var3.readUnsignedByteSub_base() == 1;
                  var25 = HealthBarDefinition.widgetDefinition.method6287(var21);
                  class18.method290(var25, class229.localPlayer.appearance, var57);
                  class159.method3423(var25);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.IF_SETPLAYERMODEL_BODYTYPE == var1.serverPacket) {
                  var21 = var3.readUnsignedByte_base();
                  var5 = var3.readInt_base();
                  var25 = HealthBarDefinition.widgetDefinition.method6287(var5);
                  class302.method5908(var25, class229.localPlayer.appearance.gender, var21);
                  class159.method3423(var25);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.MESSAGE_GAME == var1.serverPacket) {
                  var21 = var3.readUShortSmart_base();
                  var57 = var3.readUnsignedByte_base() == 1;
                  var84 = "";
                  boolean var54 = false;
                  if(var57) {
                     var84 = var3.readStringCp1252NullTerminated_base();
                     if(class12.friendSystem.method1908(new Username(var84, class89.loginType))) {
                        var54 = true;
                     }
                  }

                  String var92 = var3.readStringCp1252NullTerminated_base();
                  if(!var54) {
                     GrandExchangeOfferUnitPriceComparator.addGameMessage_base(var21, var84, var92);
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.MAP_ANIM_SPECIFIC == var1.serverPacket) {
                  var9 = var3.readUnsignedShortAddLE_base();
                  var23 = var3.readUnsignedByteAdd_base();
                  var6 = var3.readUnsignedMedium_base();
                  var21 = var6 >> 16;
                  var5 = var6 >> 8 & 255;
                  var7 = var21 + (var6 >> 4 & 7);
                  var8 = var5 + (var6 & 7);
                  var11 = var3.readUnsignedShortLE_base();
                  if(var7 >= 0 && var8 >= 0 && var7 < 104 && var8 < 104) {
                     var7 = var7 * 128 + 64;
                     var8 = var8 * 128 + 64;
                     GraphicsObject var38 = new GraphicsObject(var9, ItemLayer.Client_plane, var7, var8, WorldMapDecorationType.getTileHeight_base(var7, var8, ItemLayer.Client_plane) - var23, var11, cycle);
                     graphicsObjects.method7233(var38);
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.IF_SETPLAYERMODEL_OBJ == var1.serverPacket) {
                  var21 = var3.readUnsignedIntME_base();
                  var5 = var3.readUnsignedIntLE_base();
                  var25 = HealthBarDefinition.widgetDefinition.method6287(var5);
                  AbstractWorldMapData.method4899(var25, var21);
                  class159.method3423(var25);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.IF_SETOBJECT == var1.serverPacket) {
                  var21 = var3.readUnsignedIntME_base();
                  var5 = var3.readUnsignedShortAdd_base();
                  if(var5 == 65535) {
                     var5 = -1;
                  }

                  var6 = var3.readUnsignedIntLE_base();
                  var22 = HealthBarDefinition.widgetDefinition.method6287(var6);
                  ItemComposition var35;
                  if(!var22.isIf3) {
                     if(var5 == -1) {
                        var22.modelType = 0;
                        var1.serverPacket = null;
                        var10000 = true;
                        return var10000;
                     }

                     var35 = class214.method4226(var5).method3957(var21);
                     var22.modelType = 4;
                     var22.modelId = var5;
                     var22.modelAngleX = var35.xan2d;
                     var22.modelAngleY = var35.yan2d;
                     var22.modelZoom = var35.zoom2d * 100 / var21;
                     class159.method3423(var22);
                  } else {
                     var22.itemId = var5;
                     var22.itemQuantity = var21;
                     var35 = class214.method4226(var5).method3957(var21);
                     var22.modelAngleX = var35.xan2d;
                     var22.modelAngleY = var35.yan2d;
                     var22.modelAngleZ = var35.zan2d;
                     var22.modelOffsetX = var35.offsetX2d;
                     var22.modelOffsetY = var35.offsetY2d;
                     var22.modelZoom = var35.zoom2d;
                     if(var35.isStackable == 1) {
                        var22.itemQuantityMode = 1;
                     } else {
                        var22.itemQuantityMode = 2;
                     }

                     if(var22.field3684 > 0) {
                        var22.modelZoom = var22.modelZoom * 32 / var22.field3684;
                     } else if(var22.rawWidth > 0) {
                        var22.modelZoom = var22.modelZoom * 32 / var22.rawWidth;
                     }

                     class159.method3423(var22);
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.CAM_RESET == var1.serverPacket) {
                  field482 = false;
                  isCameraLocked = false;
                  field748 = false;
                  field749 = false;
                  Messages.field1400 = 0;
                  AbstractWorldMapData.field2575 = 0;
                  class302.field3119 = 0;
                  field661 = false;
                  class60.field421 = 0;
                  class134.field1581 = 0;
                  class1.field2 = 0;
                  WorldMapIcon_0.field2529 = 0;
                  ScriptFrame.field456 = 0;
                  class216.field2314 = 0;
                  class127.field1488 = 0;
                  field751 = null;
                  field672 = null;
                  field752 = null;

                  for(var21 = 0; var21 < 5; ++var21) {
                     field755[var21] = false;
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.URL_OPEN == var1.serverPacket) {
                  byte[] var49 = new byte[var1.serverPacketLength];
                  var3.method9208_base(var49, 0, var49.length);
                  Buffer var69 = new Buffer(var49);
                  var84 = var69.readStringCp1252NullTerminated_base();
                  HealthBar.openURL_base(var84, true, false);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.CAM_LOOKAT == var1.serverPacket) {
                  isCameraLocked = true;
                  field482 = false;
                  field749 = false;
                  Messages.field1400 = var3.readUnsignedByte_base();
                  AbstractWorldMapData.field2575 = var3.readUnsignedByte_base();
                  class302.field3119 = var3.readUnsignedShort_base();
                  class60.field421 = var3.readUnsignedByte_base();
                  class134.field1581 = var3.readUnsignedByte_base();
                  if(class134.field1581 >= 100) {
                     var21 = Messages.field1400 * 128 + 64;
                     var5 = AbstractWorldMapData.field2575 * 128 + 64;
                     var6 = WorldMapDecorationType.getTileHeight_base(var21, var5, ItemLayer.Client_plane) - class302.field3119;
                     var7 = var21 - ViewportMouse.cameraX;
                     var8 = var6 - SecureRandomFuture.cameraY;
                     var9 = var5 - class36.cameraZ;
                     var23 = (int)Math.sqrt((double)(var9 * var9 + var7 * var7));
                     Varcs.cameraPitch = (int)(Math.atan2((double)var8, (double)var23) * 325.9490051269531D) & 2047;
                     onCameraPitchChanged(-1);
                     class192.cameraYaw = (int)(Math.atan2((double)var7, (double)var9) * -325.9490051269531D) & 2047;
                     if(Varcs.cameraPitch < 128) {
                        Varcs.cameraPitch = 128;
                        onCameraPitchChanged(-1);
                     }

                     if(Varcs.cameraPitch > 383) {
                        Varcs.cameraPitch = 383;
                        onCameraPitchChanged(-1);
                     }
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.UPDATE_STAT == var1.serverPacket) {
                  class396.method7403_base();
                  var21 = var3.readUnsignedByteSub_base();
                  var5 = var3.readUnsignedIntIME_base();
                  var6 = var3.readUnsignedByte_base();
                  var7 = var3.readUnsignedByteNeg_base();
                  experience[var6] = var5;
                  experiencedChanged(var6);
                  currentLevels[var6] = var7;
                  levels[var6] = 1;
                  field540[var6] = var21;

                  for(var8 = 0; var8 < 98; ++var8) {
                     if(var5 >= Skills.Skills_experienceTable[var8]) {
                        levels[var6] = var8 + 2;
                     }
                  }

                  changedSkills[++changedSkillsCount - 1 & 31] = var6;
                  boostedSkillLevelsChanged(changedSkillsCount + 1 - 1 & 31);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.VARP_LARGE == var1.serverPacket) {
                  var21 = var3.readUnsignedShort_base();
                  var5 = var3.readInt_base();
                  Varps.Varps_temp[var21] = var5;
                  if(Varps.Varps_main[var21] != var5) {
                     Varps.Varps_main[var21] = var5;
                     settingsChanged(var21);
                  }

                  Projectile.changeGameOptions_base(var21);
                  changedVarps[++changedVarpCount - 1 & 31] = var21;
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.OBJ_OPFILTER == var1.serverPacket) {
                  class106.method2777_base(class306.OBJ_OPFILTER);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.MESSAGE_CLANCHANNEL == var1.serverPacket) {
                  var77 = var3.readByte_base();
                  var20 = var3.readStringCp1252NullTerminated_base();
                  long var41 = (long)var3.readUnsignedShort_base();
                  long var43 = (long)var3.readUnsignedMedium_base();
                  PlayerType var10 = (PlayerType)class12.method170(class320.method6191(), var3.readUnsignedByte_base());
                  long var45 = var43 + (var41 << 32);
                  boolean var13 = false;
                  ClanChannel var14 = null;
                  var14 = var77 >= 0?currentClanChannels[var77]:ItemContainer.guestClanChannel;
                  if(var14 == null) {
                     var13 = true;
                  } else {
                     var15 = 0;

                     while(true) {
                        if(var15 >= 100) {
                           if(var10.isUser && class12.friendSystem.method1908(new Username(var20, class89.loginType))) {
                              var13 = true;
                           }
                           break;
                        }

                        if(var45 == crossWorldMessageIds[var15]) {
                           var13 = true;
                           break;
                        }

                        ++var15;
                     }
                  }

                  if(!var13) {
                     crossWorldMessageIds[crossWorldMessageIdsIndex] = var45;
                     crossWorldMessageIdsIndex = (crossWorldMessageIdsIndex + 1) % 100;
                     var40 = AbstractFont.escapeBrackets_base(class128.method3076(var3));
                     var16 = var77 >= 0?41:44;
                     if(var10.modIcon != -1) {
                        ArchiveLoader.addChatMessage_base(var16, FloorUnderlayDefinition.method3799_base(var10.modIcon) + var20, var40, var14.name);
                     } else {
                        ArchiveLoader.addChatMessage_base(var16, var20, var40, var14.name);
                     }
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.IF_SETEVENTS == var1.serverPacket) {
                  var21 = var3.readUnsignedIntME_base();
                  var5 = var3.readUnsignedShortLE_base();
                  if(var5 == 65535) {
                     var5 = -1;
                  }

                  var6 = var3.readUnsignedIntIME_base();
                  var7 = var3.readUnsignedShort_base();
                  if(var7 == 65535) {
                     var7 = -1;
                  }

                  for(var8 = var7; var8 <= var5; ++var8) {
                     var36 = ((long)var6 << 32) + (long)var8;
                     Node var39 = widgetFlags.get(var36);
                     if(var39 != null) {
                        var39.remove_base();
                     }

                     widgetFlags.put(new IntegerNode(var21), var36);
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.PLAYER_ANIM_SPECIFIC == var1.serverPacket) {
                  var21 = var3.readUnsignedShortAddLE_base();
                  var5 = var3.readUnsignedByteSub_base();
                  if(var21 == 65535) {
                     var21 = -1;
                  }

                  WorldMapLabelSize.method4493(class229.localPlayer, var21, var5);
                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.IF_SETNPCHEAD == var1.serverPacket) {
                  var21 = var3.readUnsignedIntIME_base();
                  var5 = var3.readUnsignedShortLE_base();
                  var25 = HealthBarDefinition.widgetDefinition.method6287(var21);
                  if(var25.modelType != 2 || var5 != var25.modelId) {
                     var25.modelType = 2;
                     var25.modelId = var5;
                     class159.method3423(var25);
                  }

                  var1.serverPacket = null;
                  var10000 = true;
                  return var10000;
               }

               if(ServerPacket.LOGOUT_WITHREASON == var1.serverPacket) {
                  var21 = var3.readUnsignedByte_base();
                  PacketWriter.forceDisconnect_base(var21);
                  var1.serverPacket = null;
                  var10000 = false;
                  return var10000;
               }

               GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base("" + (var1.serverPacket != null?var1.serverPacket.id:-1) + "," + (var1.field1409 != null?var1.field1409.id:-1) + "," + (var1.field1416 != null?var1.field1416.id:-1) + "," + var1.serverPacketLength, (Throwable)null);
               class13.logOut_base();
               return true;
            }

            isCameraLocked = true;
            field482 = false;
            field749 = true;
            Messages.field1400 = var3.readUnsignedByte_base();
            AbstractWorldMapData.field2575 = var3.readUnsignedByte_base();
            class302.field3119 = var3.readUnsignedShort_base();
            var21 = var3.readUnsignedShort_base();
            var5 = var3.readUnsignedByte_base();
            var6 = Messages.field1400 * 128 + 64;
            var7 = AbstractWorldMapData.field2575 * 128 + 64;
            var8 = WorldMapDecorationType.getTileHeight_base(var6, var7, ItemLayer.Client_plane) - class302.field3119;
            var9 = var6 - ViewportMouse.cameraX;
            var23 = var8 - SecureRandomFuture.cameraY;
            var11 = var7 - class36.cameraZ;
            double var12 = Math.sqrt((double)(var9 * var9 + var11 * var11));
            var26 = class240.method4829_base((int)(Math.atan2((double)var23, var12) * 325.9490051269531D) & 2047);
            var15 = class319.method6186_base((int)(Math.atan2((double)var9, (double)var11) * -325.9490051269531D) & 2047);
            field672 = new class490(Varcs.cameraPitch, var26, var21, var5);
            field752 = new class490(class192.cameraYaw, var15, var21, var5);
            var1.serverPacket = null;
            var10000 = true;
         } catch (IOException var47) {
            class9.method85_base();
            return true;
         } catch (Exception var48) {
            var20 = "" + (var1.serverPacket != null?var1.serverPacket.id:-1) + "," + (var1.field1409 != null?var1.field1409.id:-1) + "," + (var1.field1416 != null?var1.field1416.id:-1) + "," + var1.serverPacketLength + "," + (class229.localPlayer.pathX[0] + NpcOverrides.baseX) + "," + (class229.localPlayer.pathY[0] + class101.baseY) + ",";

            for(var6 = 0; var6 < var1.serverPacketLength && var6 < 50; ++var6) {
               var20 = var20 + var3.array[var6] + ",";
            }

            GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base(var20, var48);
            class13.logOut_base();
            return true;
         }

         return var10000;
      }
   }

   @ObfuscatedName("kl")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "1598980943"
   )
   final void menu_base() {
      boolean var1 = false;

      int var2;
      while(!var1) {
         var1 = true;

         for(var2 = 0; var2 < SpriteMask.client.getMenuOptionCount() - 1; ++var2) {
            if(SpriteMask.client.getMenuOpcodes()[var2] < 1000 && SpriteMask.client.getMenuOpcodes()[var2 + 1] > 1000) {
               sortMenuEntries(var2, var2 + 1);
               var1 = false;
            }
         }

         if(var1 && !SpriteMask.client.isMenuOpen()) {
            SpriteMask.client.getCallbacks().post(new PostMenuSort());
         }
      }

      if(SpriteMask.client.getDraggedWidget() == null) {
         int var4 = SpriteMask.client.getMouseLastButton();
         int var3;
         int var5;
         int var6;
         int var7;
         int var8;
         if(SpriteMask.client.isMenuOpen()) {
            int var9;
            if(var4 != 1 && (SpriteMask.client.isMouseCam() || var4 != 4)) {
               var2 = SpriteMask.client.getMouseX();
               var9 = SpriteMask.client.getMouseY();
               if(var2 < SpriteMask.client.getMenuX() - 10 || var2 > SpriteMask.client.getMenuX() + SpriteMask.client.getMenuWidth() + 10 || var9 < SpriteMask.client.getMenuY() - 10 || var9 > SpriteMask.client.getMenuY() + SpriteMask.client.getMenuHeight() + 10) {
                  SpriteMask.client.setMenuOpen(false);
                  var5 = SpriteMask.client.getMenuX();
                  var3 = SpriteMask.client.getMenuY();
                  var8 = SpriteMask.client.getMenuWidth();
                  var6 = SpriteMask.client.getMenuHeight();

                  for(var7 = 0; var7 < SpriteMask.client.getRootWidgetCount(); ++var7) {
                     if(SpriteMask.client.getWidgetWidths()[var7] + SpriteMask.client.getWidgetPositionsX()[var7] > var5 && SpriteMask.client.getWidgetPositionsX()[var7] < var5 + var8 && SpriteMask.client.getWidgetPositionsY()[var7] + SpriteMask.client.getWidgetHeights()[var7] > var3 && SpriteMask.client.getWidgetPositionsY()[var7] < var3 + var6) {
                        SpriteMask.client.getValidRootWidgets()[var7] = true;
                     }
                  }
               }
            }

            if(var4 == 1 || !SpriteMask.client.isMouseCam() && var4 == 4) {
               var2 = SpriteMask.client.getMenuX();
               var9 = SpriteMask.client.getMenuY();
               var5 = SpriteMask.client.getMenuWidth();
               var3 = SpriteMask.client.getMouseLastPressedX();
               var8 = SpriteMask.client.getMouseLastPressedY();
               var6 = -1;

               int var17;
               for(var7 = 0; var7 < SpriteMask.client.getMenuOptionCount(); ++var7) {
                  var17 = (SpriteMask.client.getMenuOptionCount() - 1 - var7) * 15 + var9 + 31;
                  if(var3 > var2 && var3 < var5 + var2 && var8 > var17 - 13 && var8 < var17 + 3) {
                     var6 = var7;
                  }
               }

               int var11;
               int var12;
               int var13;
               if(var6 != -1 && var6 >= 0) {
                  var7 = SpriteMask.client.getMenuArguments1()[var6];
                  var17 = SpriteMask.client.getMenuArguments2()[var6];
                  var13 = SpriteMask.client.getMenuOpcodes()[var6];
                  var11 = SpriteMask.client.getMenuIdentifiers()[var6];
                  var12 = SpriteMask.client.getMenuItemIds()[var6];
                  String var14 = SpriteMask.client.getMenuOptions()[var6];
                  String var15 = SpriteMask.client.getMenuTargets()[var6];
                  SpriteMask.client.sendMenuAction(var7, var17, var13, var11, var12, var14, var15, SpriteMask.client.getMouseLastPressedX(), SpriteMask.client.getMouseLastPressedY());
               }

               SpriteMask.client.setMenuOpen(false);
               var7 = SpriteMask.client.getMenuX();
               var17 = SpriteMask.client.getMenuY();
               var13 = SpriteMask.client.getMenuWidth();
               var11 = SpriteMask.client.getMenuHeight();

               for(var12 = 0; var12 < SpriteMask.client.getRootWidgetCount(); ++var12) {
                  if(SpriteMask.client.getWidgetWidths()[var12] + SpriteMask.client.getWidgetPositionsX()[var12] > var7 && SpriteMask.client.getWidgetPositionsX()[var12] < var7 + var13 && SpriteMask.client.getWidgetHeights()[var12] + SpriteMask.client.getWidgetPositionsY()[var12] > var17 && SpriteMask.client.getWidgetPositionsY()[var12] < var17 + var11) {
                     SpriteMask.client.getValidRootWidgets()[var12] = true;
                  }
               }
            }
         } else {
            var2 = SpriteMask.client.getMenuOptionCount() - 1;
            if((var4 == 1 || !SpriteMask.client.isMouseCam() && var4 == 4) && this.copy$shouldLeftClickOpenMenu(-1230030345)) {
               var4 = 2;
            }

            if((var4 == 1 || !SpriteMask.client.isMouseCam() && var4 == 4) && SpriteMask.client.getMenuOptionCount() > 0 && var2 >= 0) {
               var5 = SpriteMask.client.getMenuArguments1()[var2];
               var3 = SpriteMask.client.getMenuArguments2()[var2];
               var8 = SpriteMask.client.getMenuOpcodes()[var2];
               var6 = SpriteMask.client.getMenuIdentifiers()[var2];
               var7 = SpriteMask.client.getMenuItemIds()[var2];
               String var16 = SpriteMask.client.getMenuOptions()[var2];
               String var10 = SpriteMask.client.getMenuTargets()[var2];
               SpriteMask.client.sendMenuAction(var5, var3, var8, var6, var7, var16, var10, SpriteMask.client.getMouseLastPressedX(), SpriteMask.client.getMouseLastPressedY());
            }

            if(var4 == 2 && SpriteMask.client.getMenuOptionCount() > 0) {
               this.openMenu(SpriteMask.client.getMouseLastPressedX(), SpriteMask.client.getMouseLastPressedY());
            }
         }
      }

   }

   @ObfuscatedName("kc")
   @ObfuscatedSignature(
      descriptor = "(I)Z",
      garbageValue = "-1230030345"
   )
   final boolean shouldLeftClickOpenMenu_base() {
      if(this.copy$shouldLeftClickOpenMenu(-1230030345)) {
         return true;
      } else {
         MenuShouldLeftClick var1 = new MenuShouldLeftClick();
         SpriteMask.client.getCallbacks().post(var1);
         if(var1.isForceRightClick()) {
            return true;
         } else {
            int var2 = this.getMenuOptionCount();
            if(var2 <= 0) {
               return false;
            } else {
               int var3 = this.getMenuOpcodes()[var2 - 1];
               return var3 == net.runelite.api.MenuAction.RUNELITE_OVERLAY.getId() || var3 == net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG.getId() || var3 == net.runelite.api.MenuAction.RUNELITE_INFOBOX.getId();
            }
         }
      }
   }

   @ObfuscatedName("ka")
   @ObfuscatedSignature(
      descriptor = "(IIB)V",
      garbageValue = "-26"
   )
   final void openMenu_base(int var1, int var2) {
      MenuOpened var3 = new MenuOpened();
      var3.setMenuEntries(this.getMenuEntries());
      this.callbacks.post(var3);
      if(var3.isModified()) {
         this.setMenuEntries(var3.getMenuEntries());
      }

      this.copy$openMenu(var1, var2, (byte)-26);
      SpriteMask.client.getScene().menuOpen(SpriteMask.client.getPlane(), var1 - SpriteMask.client.getViewportXOffset(), var2 - SpriteMask.client.getViewportYOffset(), false);
   }

   @ObfuscatedName("lp")
   @ObfuscatedSignature(
      descriptor = "(ZI)V",
      garbageValue = "-928787848"
   )
   final void method1290_base(boolean var1) {
      NPCComposition.method3748_base(rootInterface, Language.canvasWidth, class47.canvasHeight, var1);
   }

   @ObfuscatedName("lh")
   @ObfuscatedSignature(
      descriptor = "(Lnn;I)V",
      garbageValue = "1484692020"
   )
   void method1536(Widget var1) {
      Widget var2 = var1.parentId == -1?null:HealthBarDefinition.widgetDefinition.method6287(var1.parentId);
      int var3;
      int var4;
      if(var2 == null) {
         var3 = Language.canvasWidth;
         var4 = class47.canvasHeight;
      } else {
         var3 = var2.width;
         var4 = var2.height;
      }

      Renderable.method5510(var1, var3, var4, false);
      JagexCache.method4213(var1, var3, var4);
   }

   @ObfuscatedName("mf")
   @ObfuscatedSignature(
      descriptor = "(B)V",
      garbageValue = "-74"
   )
   final void method1727_base() {
      class159.method3423(clickedWidget);
      ++class148.widgetDragDuration;
      if(field516 && field674) {
         int var1 = MouseHandler.MouseHandler_x;
         int var2 = MouseHandler.MouseHandler_y;
         var1 -= widgetClickX;
         var2 -= widgetClickY;
         if(var1 < field554) {
            var1 = field554;
         }

         if(var1 + clickedWidget.width > field554 + clickedWidgetParent.width) {
            var1 = field554 + clickedWidgetParent.width - clickedWidget.width;
         }

         if(var2 < field676) {
            var2 = field676;
         }

         if(var2 + clickedWidget.height > field676 + clickedWidgetParent.height) {
            var2 = field676 + clickedWidgetParent.height - clickedWidget.height;
         }

         int var3 = var1 - field533;
         int var4 = var2 - field679;
         int var5 = clickedWidget.dragZoneSize;
         if(class148.widgetDragDuration > clickedWidget.dragThreshold && (var3 > var5 || var3 < -var5 || var4 > var5 || var4 < -var5)) {
            isDraggingWidget = true;
            draggingWidgetChanged(-1);
         }

         int var6 = var1 - field554 + clickedWidgetParent.scrollX;
         int var7 = var2 - field676 + clickedWidgetParent.scrollY;
         ScriptEvent var8;
         if(clickedWidget.onDrag != null && isDraggingWidget) {
            var8 = new ScriptEvent();
            var8.widget = clickedWidget;
            var8.mouseX = var6;
            var8.mouseY = var7;
            var8.args = clickedWidget.onDrag;
            class157.method3403(var8);
         }

         if(MouseHandler.MouseHandler_currentButton == 0) {
            if(isDraggingWidget) {
               if(clickedWidget.onDragComplete != null) {
                  var8 = new ScriptEvent();
                  var8.widget = clickedWidget;
                  var8.mouseX = var6;
                  var8.mouseY = var7;
                  var8.dragTarget = draggedOnWidget;
                  var8.args = clickedWidget.onDragComplete;
                  class157.method3403(var8);
               }

               if(draggedOnWidget != null && class227.method4434(clickedWidget) != null) {
                  PacketBufferNode var9 = class113.method2919(ClientPacket.IF_BUTTOND, packetWriter.isaacCipher);
                  var9.packetBuffer.writeShortLE_base(clickedWidget.itemId);
                  var9.packetBuffer.writeShortAdd_base(draggedOnWidget.childIndex);
                  var9.packetBuffer.writeIntME_base(clickedWidget.id);
                  var9.packetBuffer.writeInt_base(draggedOnWidget.id);
                  var9.packetBuffer.writeShortLE_base(clickedWidget.childIndex);
                  var9.packetBuffer.writeShortAdd_base(draggedOnWidget.itemId);
                  packetWriter.method2867(var9);
               }
            } else if(this.shouldLeftClickOpenMenu_base()) {
               this.openMenu_base(field533 + widgetClickX, field679 + widgetClickY);
            } else if(menuOptionsCount > 0) {
               method1847_base(widgetClickX + field533, field679 + widgetClickY);
            }

            clickedWidget = null;
         }

      } else {
         if(class148.widgetDragDuration > 1) {
            if(!isDraggingWidget && menuOptionsCount > 0) {
               method1847_base(widgetClickX + field533, widgetClickY + field679);
            }

            clickedWidget = null;
         }

      }
   }

   @ObfuscatedName("or")
   @ObfuscatedSignature(
      descriptor = "(I)Lvj;",
      garbageValue = "-1748725154"
   )
   public Username vmethod8071() {
      return class229.localPlayer != null?class229.localPlayer.username:null;
   }

   @ObfuscatedName("ob")
   @ObfuscatedSignature(
      descriptor = "(II)V",
      garbageValue = "-1572672090"
   )
   void method1294_base(int var1) {
      if(revision >= 216) {
         PacketBufferNode var2 = class113.method2919(ClientPacket.CLANCHANNEL_REQUEST_FULL, packetWriter.isaacCipher);
         var2.packetBuffer.writeByte_base(var1);
         packetWriter.method2867(var2);
      }

   }

   @ObfuscatedName("os")
   @ObfuscatedSignature(
      descriptor = "(II)V",
      garbageValue = "-1728239313"
   )
   void method1295_base(int var1) {
      if(revision >= 216) {
         PacketBufferNode var2 = class113.method2919(ClientPacket.CLANSETTINGS_REQUEST_FULL, packetWriter.isaacCipher);
         var2.packetBuffer.writeByte_base(var1);
         packetWriter.method2867(var2);
      }

   }

   public RSSpritePixels drawInstanceMap(int var1) {
      RSSpritePixels var2 = this.createSpritePixels(new int[262144], 512, 512);
      RSSpritePixels var3 = this.getMinimapSprite();
      RSScene var4 = this.getScene();
      int[] var5 = var2.getPixels();
      byte[][][] var6 = this.getTileSettings();

      try {
         this.setMinimapSprite(var2);

         int var8;
         int var9;
         for(var8 = 1; var8 < 103; ++var8) {
            int var7 = (103 - var8) * 2048 + 24628;

            for(var9 = 1; var9 < 103; ++var9) {
               if((var6[var1][var9][var8] & 24) == 0) {
                  var4.drawTile(var5, var7, 512, var1, var9, var8);
               }

               if(var1 < 3 && (var6[var1 + 1][var9][var8] & 8) != 0) {
                  var4.drawTile(var5, var7, 512, var1 + 1, var9, var8);
               }

               var7 += 4;
            }
         }

         var8 = (238 + (int)(Math.random() * 20.0D) - 10 << 16) + (238 + (int)(Math.random() * 20.0D) - 10 << 8) + (238 + (int)(Math.random() * 20.0D) - 10);
         var9 = 238 + (int)(Math.random() * 20.0D) - 10 << 16;
         var2.setRaster();

         for(int var10 = 1; var10 < 103; ++var10) {
            for(int var11 = 1; var11 < 103; ++var11) {
               if((var6[var1][var11][var10] & 24) == 0) {
                  this.drawObject(var1, var11, var10, var8, var9);
               }

               if(var1 < 3 && (var6[var1 + 1][var11][var10] & 8) != 0) {
                  this.drawObject(var1 + 1, var11, var10, var8, var9);
               }
            }
         }
      } finally {
         this.getBufferProvider().setRaster();
         this.setMinimapSprite(var3);
      }

      return var2;
   }

   @ObfuscatedSignature(
      descriptor = "(Lnet/runelite/api/ChatMessageType;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Lnet/runelite/api/MessageNode;",
      garbageValue = "1"
   )
   public MessageNode addChatMessage(ChatMessageType var1, String var2, String var3, String var4, boolean var5) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("addChatMessage must be called on client thread");
      } else {
         ChatMessageType var6 = var1;
         String var7 = var3;
         if(var1 == ChatMessageType.CLAN_GIM_CHAT) {
            var6 = ChatMessageType.CLAN_CHAT;
            var7 = "|" + var3;
         } else if(var1 == ChatMessageType.CLAN_GIM_MESSAGE) {
            var6 = ChatMessageType.CLAN_MESSAGE;
            var7 = "|" + var3;
         }

         copy$addChatMessage(var6.getType(), var2, var7, var4, 2035865306);
         Logger var8 = SpriteMask.client.getLogger();
         if(var8.isDebugEnabled()) {
            var8.debug("Chat message type {}: {}", var1.name(), var3);
         }

         Map var9 = SpriteMask.client.getChatLineMap();
         RSChatChannel var10 = (RSChatChannel)var9.get(Integer.valueOf(var1.getType()));
         RSMessage var11 = var10.getLines()[0];
         ChatMessage var12 = new ChatMessage(var11, var1, var2, var3, var4, var11.getTimestamp());
         SpriteMask.client.getCallbacks().post(var12);
         return var11;
      }
   }

   public RSEvictingDualNodeHashTable getWidgetSpriteCache() {
      return this.getWidgetDefinition() != null?this.getWidgetDefinition().getWidgetSpriteCache():null;
   }

   public RSItemContainer getItemContainer(InventoryID var1) {
      RSNodeHashTable var2 = this.getItemContainers();
      return (RSItemContainer)var2.get((long)var1.getId());
   }

   public RSItemContainer getItemContainer(int var1) {
      RSNodeHashTable var2 = this.getItemContainers();
      Iterator var3 = var2.iterator();

      Object var4;
      RSItemContainer var5;
      do {
         if(!var3.hasNext()) {
            return null;
         }

         var4 = var3.next();
         var5 = (RSItemContainer)var4;
      } while(((RSItemContainer)var4).getId() != var1);

      return var5;
   }

   public RSSpritePixels[] getSprites(IndexDataBase var1, int var2, int var3) {
      RSAbstractArchive var4 = (RSAbstractArchive)var1;
      byte[] var5 = var4.getConfigData(var2, var3);
      if(var5 == null) {
         return null;
      } else {
         this.decodeSprite(var5);
         int var6 = this.getIndexedSpriteCount();
         int var7 = this.getIndexedSpriteWidth();
         int var8 = this.getIndexedSpriteHeight();
         int[] var9 = this.getIndexedSpriteOffsetXs();
         int[] var10 = this.getIndexedSpriteOffsetYs();
         int[] var11 = this.getIndexedSpriteWidths();
         int[] var12 = this.getIndexedSpriteHeights();
         byte[][] var13 = this.getSpritePixels();
         int[] var14 = this.getIndexedSpritePalette();
         SpritePixels[] var15 = new SpritePixels[var6];

         for(int var16 = 0; var16 < var6; ++var16) {
            int var17 = var11[var16];
            int var18 = var12[var16];
            byte[] var19 = var13[var16];
            int[] var20 = new int[var17 * var18];
            RSSpritePixels var21 = this.createSpritePixels(var20, var17, var18);
            var21.setMaxHeight(var8);
            var21.setMaxWidth(var7);
            var21.setOffsetX(var9[var16]);
            var21.setOffsetY(var10[var16]);

            for(int var22 = 0; var22 < var17 * var18; ++var22) {
               var20[var22] = var14[var19[var22] & 255];
            }

            var15[var16] = (SpritePixels) var21;
         }

         this.setIndexedSpriteOffsetXs((int[])null);
         this.setIndexedSpriteOffsetYs((int[])null);
         this.setIndexedSpriteWidths((int[])null);
         this.setIndexedSpriteHeights((int[])null);
         this.setIndexedSpritePalette((int[])null);
         this.setSpritePixels((byte[][])null);
         return var15;
      }
   }

   public net.runelite.api.ItemComposition getItemComposition(int var1) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("getItemComposition must be called on client thread");
      } else {
         return this.getRSItemDefinition(var1);
      }
   }

   public net.runelite.api.Model loadModel(int var1, short[] var2, short[] var3) {
      RSModelData var4 = SpriteMask.client.getModelData(SpriteMask.client.getObjectDefinition_modelsArchive(), var1, 0);
      if(var2 != null) {
         for(int var5 = 0; var5 < var2.length; ++var5) {
            var4.rs$recolor(var2[var5], var3[var5]);
         }
      }

      return var4.toModel(var4.getAmbient() + 64, var4.getContrast() + 850, -30, -50, -30);
   }

   public final void doCycle() {
      SpriteMask.client.getCallbacks().tick();
   }

   public RSModelData mergeModels(net.runelite.api.ModelData... var1) {
      return this.mergeModels(var1, var1.length);
   }

   public RSModelData loadModelData(int var1) {
      RSModelData var2 = (RSModelData)this.tmpModelDataCache.get((long)var1);
      if(var2 == null) {
         var2 = this.getModelData(archives[7], var1, 0);
         if(var2 == null) {
            return null;
         }

         this.tmpModelDataCache.put((RSDualNode)var2, (long)var1);
      }

      return var2.newModelData(var2, true, true, true, true);
   }

   public RSNPC getFollower() {
      int var1 = SpriteMask.client.getFollowerIndex();
      RSNPC[] var2 = this.getCachedNPCs();
      return var1 >= 0 && var1 < var2.length?var2[var1]:null;
   }

   public void setRSModIcons(RSIndexedSprite[] var1) {
      AbstractFont.AbstractFont_modIconSprites = (IndexedSprite[])var1;
   }

   public int getFlags() {
      return worldProperties;
   }

   public void setLowMemory(boolean var1) {
      isLowDetail = var1;
   }

   public int getNpcIndexesCount() {
      return npcCount;
   }

   public RSNodeDeque getProjectilesDeque() {
      return projectiles;
   }

   public RSNodeDeque getGraphicsObjectDeque() {
      return graphicsObjects;
   }

   public int[] getBoostedSkillLevels() {
      return currentLevels;
   }

   public int[] getRealSkillLevels() {
      return levels;
   }

   public int getCycleCntr() {
      return cycleCntr;
   }

   public RSClanChannel[] getCurrentClanChannels() {
      return currentClanChannels;
   }

   public int getDestinationX() {
      return destinationX;
   }

   public void setStopTimeMs(long var1) {
      GameEngine.stopTimeMs = var1;
   }

   public RSEvictingDualNodeHashTable getHealthBarCache() {
      return HealthBarDefinition.HealthBarDefinition_cached;
   }

   public int getPlayerIndexesCount() {
      return Players.Players_count;
   }

   public int getSelectedSceneTileX() {
      return Scene.Scene_selectedX;
   }

   public RSLoginType getLoginType() {
      return class89.loginType;
   }

   public RSScriptEvent createRSScriptEvent(Object... var1) {
      RSScriptEvent var2 = this.createScriptEvent();
      var2.setArguments(var1);
      return var2;
   }

   public void playSoundEffect(int var1, int var2, int var3, int var4, int var5) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("playSoundEffect must be called on client thread!");
      } else {
         int var6 = ((var2 & 255) << 16) + ((var3 & 255) << 8) + (var4 & 255);
         int[] var7 = this.getQueuedSoundEffectIDs();
         int[] var8 = this.getQueuedSoundEffectLoops();
         int[] var9 = this.getQueuedSoundEffectDelays();
         RSSoundEffect[] var10 = this.getAudioEffects();
         int[] var11 = this.getSoundLocations();
         int var12 = this.getQueuedSoundEffectCount();
         var7[var12] = var1;
         var8[var12] = 1;
         var9[var12] = var5;
         var10[var12] = null;
         var11[var12] = var6;
         this.setQueuedSoundEffectCount(var12 + 1);
         lastSoundEffectCount = var12 + 1;
      }
   }

   public boolean isStretchedEnabled() {
      return stretchedEnabled;
   }

   public int getVarbitValue(int var1) {
      return this.getVarbitValue(this.getVarps(), var1);
   }

   public RSClanSettings[] getCurrentClanSettingsAry() {
      return currentClanSettings;
   }

   public int getMenuX() {
      return FriendSystem.menuX;
   }

   public int getHintArrowType() {
      int var1 = SpriteMask.client.getHintArrowTargetType();
      return var1 == 1?1:(var1 == 10?10:(var1 == 2?2:0));
   }

   public RSModelData mergeModels(net.runelite.api.ModelData[] var1, int var2) {
      return this.newModelData((net.runelite.api.ModelData[])Arrays.copyOf(var1, var2, this.getModelDataArray().getClass()), var2);
   }

   public RSScriptEvent createScriptEvent() {
      return new ScriptEvent();
   }

   public int getRSGameState() {
      return gameState;
   }

   public int[] getSkillExperiences() {
      return experience;
   }

   public RSKeyHandler getKeyHandler() {
      return GameEngine.keyHandler;
   }

   public int getMouseX() {
      return MouseHandler.MouseHandler_xVolatile;
   }

   public RSModelData[] getModelDataArray() {
      return ObjectComposition.modelDataArray;
   }

   public int[] getServerVarps() {
      return Varps.Varps_temp;
   }

   public Map getVarcMap() {
      return this.getVarcs().getVarcMap();
   }

   public RSNodeHashTable getItemContainers() {
      return ItemContainer.itemContainers;
   }

   public RSVarcs getVarcs() {
      return class176.varcs;
   }

   public RSSpritePixels createSpritePixels(int[] var1, int var2, int var3) {
      return new SpritePixels(var1, var2, var3);
   }

   @ObfuscatedSignature(
      descriptor = "(I)Z",
      garbageValue = "-1230030345"
   )
   public final boolean copy$shouldLeftClickOpenMenu(int var1) {
      int var2 = menuOptionsCount - 1;
      return (leftClickOpensMenu && menuOptionsCount > 2 || class514.method9121_base(var2)) && !menuShiftClick[var2];
   }

   public int getTopLevelInterfaceId() {
      return rootInterface;
   }

   public int[] getVarps() {
      return Varps.Varps_main;
   }

   public RSFriendSystem getFriendManager() {
      return class12.friendSystem;
   }

   public RSVarbitComposition getVarbitComposition(int var1) {
      if(!$assertionsDisabled && !SpriteMask.client.isClientThread()) {
         throw new AssertionError("getVarbitDefinition must be called on client thread");
      } else {
         RSVarbitComposition var2 = (RSVarbitComposition)this.varbitCache.getIfPresent(Integer.valueOf(var1));
         if(var2 == null) {
            SpriteMask.client.getLogger().trace("Cache miss for varbit {}", Integer.valueOf(var1));
            SpriteMask.client.rs$getVarbit(var1);
            var2 = (RSVarbitComposition)this.getVarbitCache().get((long)var1);
            this.varbitCache.put(Integer.valueOf(var1), var2);
         }

         return var2.getIndex() == 0 && var2.getLeastSignificantBit() == 0 && var2.getMostSignificantBit() == 0?null:var2;
      }
   }

   public RSNodeHashTable getComponentTable() {
      return interfaceParents;
   }

   public RSWidgetDefinition getWidgetDefinition() {
      return HealthBarDefinition.widgetDefinition;
   }

   public MenuEntry[] getMenuEntries() {
      RSRuneLiteMenuEntry[] var1 = (RSRuneLiteMenuEntry[])Arrays.copyOf(rl$menuEntries, SpriteMask.client.getMenuOptionCount());
      RSRuneLiteMenuEntry[] var2 = var1;
      int var3 = var1.length;

      for(int var4 = 0; var4 < var3; ++var4) {
         RSRuneLiteMenuEntry var5 = var2[var4];
         if(var5.getOption() == null) {
            var5.setOption("null");
         }

         if(var5.getTarget() == null) {
            var5.setTarget("null");
         }
      }

      return var1;
   }

   public void invokeMenuAction(String var1, String var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("invokeMenuAction must be called on client thread");
      } else {
         SpriteMask.client.sendMenuAction(var5, var6, var4, var3, var7, var1, var2, var8, var9);
      }
   }

   public int getVarpValue(int[] var1, int var2) {
      return var1[var2];
   }

   public void updateCamera() {
      if(unlockedFps) {
         long var1 = System.nanoTime();
         long var3 = var1 - this.lastNanoTime;
         this.lastNanoTime = var1;
         if(this.getGameState() == GameState.LOGGED_IN) {
            this.interpolateCamera(var3);
         }
      }

   }

   public void runScriptEvent(RSScriptEvent var1) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("runScriptEvent must be called on client thread");
      } else if(!$assertionsDisabled && currentScript != null) {
         throw new AssertionError("scripts are not reentrant");
      } else {
         this.runScript(var1, 5000000, 0);
         boolean var2 = false;
         if(!$assertionsDisabled) {
            var2 = true;
            if(false) {
               throw new AssertionError();
            }
         }

         Object[] var3 = var1.getArguments();
         if(var2 && var3[0] instanceof Integer) {
            int var4 = ((Integer)var3[0]).intValue();
            RSScript var5 = (RSScript)SpriteMask.client.getScriptCache().get((long)var4);
            if(var5 != null) {
               int var6 = 0;
               int var7 = 0;

               for(int var8 = 1; var8 < var3.length; ++var8) {
                  if(var3[var8] instanceof Integer) {
                     ++var6;
                  } else {
                     ++var7;
                  }
               }

               if(!$assertionsDisabled && (var5.getIntArgumentCount() != var6 || var5.getStringArgumentCount() != var7)) {
                  throw new AssertionError("Script " + var4 + " was called with the incorrect number of arguments; takes " + var5.getIntArgumentCount() + "+" + var5.getStringArgumentCount() + ", got " + var6 + "+" + var7);
               }
            }
         }

      }
   }

   public void setVarbitValue(int[] var1, int var2, int var3) {
      RSVarbitComposition var4 = this.getVarbitComposition(var2);
      if(var4 == null) {
         throw new IndexOutOfBoundsException(String.format("Varbit %d does not exist!", new Object[]{Integer.valueOf(var2)}));
      } else {
         int var5 = var4.getLeastSignificantBit();
         int var6 = var4.getMostSignificantBit();
         int var7 = (1 << var6 - var5 + 1) - 1;
         var1[var4.getIndex()] = var1[var4.getIndex()] & ~(var7 << var5) | (var3 & var7) << var5;
      }
   }

   public RSUsername createName(String var1, RSLoginType var2) {
      return new Username(var1, (LoginType)var2);
   }

   public int[] getNpcIndices() {
      return npcIndices;
   }

   public void setChatCycle(int var1) {
      chatCycle = var1;
   }

   public int getDestinationY() {
      return destinationY;
   }

   public int[] getPlayerIndices() {
      return Players.Players_indices;
   }

   public void setSceneLowMemory(boolean var1) {
      Scene.Scene_isLowDetail = var1;
   }

   public int getSelectedSceneTileY() {
      return Scene.Scene_selectedY;
   }

   public net.runelite.api.widgets.Widget getWidget(int var1) {
      return this.getWidget(WidgetUtil.componentToInterface(var1), WidgetUtil.componentToId(var1));
   }

   public int get3dZoom() {
      return Rasterizer3D.get3dZoom_base();
   }

   public RSEvictingDualNodeHashTable getRSStructCompositionCache() {
      return StructComposition.StructDefinition_cached;
   }

   public RSStructComposition getRSStructComposition(int var1) {
      return UserList.method8260(var1);
   }

   public RSNPCComposition getRSNpcComposition(int var1) {
      return VerticalAlignment.method3757(var1);
   }

   public RSObjectComposition getRSObjectComposition(int var1) {
      return WorldMapSection2.method4515(var1);
   }

   public RSSpritePixels getMinimapSprite() {
      return class102.sceneMinimapSprite;
   }

   public void decodeSprite(byte[] var1) {
      class162.SpriteBuffer_decode_base(var1);
   }

   public RSArchive getIndexCache4() {
      return class313.archive4;
   }

   public int getMenuY() {
      return class60.menuY;
   }

   public net.runelite.api.widgets.Widget getWidget(int var1, int var2) {
      if(SpriteMask.client.getWidgetDefinition() == null) {
         return null;
      } else {
         RSWidget[][] var3 = SpriteMask.client.getWidgetDefinition().getWidgets();
         if(var3 != null && var3.length > var1) {
            RSWidget[] var4 = var3[var1];
            return var4 != null && var4.length > var2?var4[var2]:null;
         } else {
            return null;
         }
      }
   }

   public RSNPC[] getCachedNPCs() {
      return npcs;
   }

   public int getMouseY() {
      return MouseHandler.MouseHandler_yVolatile;
   }

   public RSItemComposition getRSItemDefinition(int var1) {
      return class214.method4226(var1);
   }

   public RSSpritePixels createRSItemSprite(int var1, int var2, int var3, int var4, int var5, boolean var6) {
      return class6.method49(var1, var2, var3, var4, var5, var6);
   }

   public int getVarbitValue(int[] var1, int var2) {
      if(!$assertionsDisabled && !SpriteMask.client.isClientThread()) {
         throw new AssertionError("getVarbitValue must be called on client thread");
      } else {
         RSVarbitComposition var3 = this.getVarbitComposition(var2);
         if(var3 == null) {
            throw new IndexOutOfBoundsException("Varbit " + var2 + " does not exist!");
         } else {
            int var4 = var1[var3.getIndex()];
            int var5 = var3.getLeastSignificantBit();
            int var6 = var3.getMostSignificantBit();
            int var7 = (1 << var6 - var5 + 1) - 1;
            return var4 >> var5 & var7;
         }
      }
   }

   public RSEvictingDualNodeHashTable getHealthBarSpriteCache() {
      return HealthBarDefinition.HealthBarDefinition_cachedSprites;
   }

   public void setGameState(int var1) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("setGameState must be called on client thread");
      } else {
         SpriteMask.client.setRSGameState(var1);
      }
   }

   @ObfuscatedSignature(
      descriptor = "(ZI)V",
      garbageValue = "-851092167"
   )
   public final void copy$draw(boolean var1, int var2) {
      if((gameState == 10 || gameState == 20 || gameState == 30) && field716 != 0L && SpotAnimationDefinition.method3775_base() > field716) {
         class9.setWindowedMode_base(ApproximateRouteStrategy.getWindowedMode_base());
      }

      int var3;
      if(var1) {
         for(var3 = 0; var3 < 100; ++var3) {
            validRootWidgets[var3] = true;
         }
      }

      if(gameState == 0) {
         this.drawInitial_base(Login.Login_loadingPercent, Login.Login_loadingText, var1);
      } else if(gameState == 5) {
         UrlRequest.method2920(GrandExchangeOfferTotalQuantityComparator.fontBold12, class369.fontPlain11, ItemLayer.fontPlain12);
      } else if(gameState != 10 && gameState != 11) {
         if(gameState == 20) {
            UrlRequest.method2920(GrandExchangeOfferTotalQuantityComparator.fontBold12, class369.fontPlain11, ItemLayer.fontPlain12);
         } else if(gameState == 50) {
            UrlRequest.method2920(GrandExchangeOfferTotalQuantityComparator.fontBold12, class369.fontPlain11, ItemLayer.fontPlain12);
         } else if(gameState == 25) {
            if(field559 == 1) {
               if(field555 > field678) {
                  field678 = field555;
               }

               var3 = (field678 * 50 - field555 * 50) / field678;
               LoginPacket.drawLoadingMessage_base("Loading - please wait." + "<br>" + " (" + var3 + "%" + ")", false);
            } else if(field559 == 2) {
               if(field521 > field558) {
                  field558 = field521;
               }

               var3 = (field558 * 50 - field521 * 50) / field558 + 50;
               LoginPacket.drawLoadingMessage_base("Loading - please wait." + "<br>" + " (" + var3 + "%" + ")", false);
            } else {
               LoginPacket.drawLoadingMessage_base("Loading - please wait.", false);
            }
         } else if(gameState == 30) {
            this.drawLoggedIn_base();
         } else if(gameState == 40) {
            LoginPacket.drawLoadingMessage_base("Connection lost" + "<br>" + "Please wait - attempting to reestablish", false);
         } else if(gameState == 45) {
            LoginPacket.drawLoadingMessage_base("Please wait...", false);
         }
      } else {
         UrlRequest.method2920(GrandExchangeOfferTotalQuantityComparator.fontBold12, class369.fontPlain11, ItemLayer.fontPlain12);
      }

      if(gameState == 30 && gameDrawingMode == 0 && !var1 && !isResizable) {
         for(var3 = 0; var3 < rootWidgetCount; ++var3) {
            if(field785[var3]) {
               class338.rasterProvider.draw_base(rootWidgetXs[var3], rootWidgetYs[var3], rootWidgetWidths[var3], rootWidgetHeights[var3]);
               field785[var3] = false;
            }
         }
      } else if(gameState > 0) {
         class338.rasterProvider.drawFull_base(0, 0);

         for(var3 = 0; var3 < rootWidgetCount; ++var3) {
            field785[var3] = false;
         }
      }

   }

   public RSPlayer[] getCachedPlayers() {
      return players;
   }

   public void setAudioHighMemory(boolean var1) {
      WorldMapRectangle.PcmPlayer_stereo = var1;
   }

   public RSSoundEffect getTrack(RSAbstractArchive var1, int var2, int var3) {
      return SoundEffect.method761((AbstractArchive)var1, var2, var3);
   }

   public int getMenuWidth() {
      return class428.menuWidth;
   }

   public int getIndexedSpriteCount() {
      return class541.SpriteBuffer_spriteCount;
   }

   public RSModelData newModelData(net.runelite.api.ModelData[] var1, int var2) {
      return new ModelData((ModelData[])var1, var2);
   }

   public RSScene getScene() {
      return class36.scene;
   }

   public void runScript(RSScriptEvent var1, int var2, int var3) {
      class323.method6209((ScriptEvent)var1, var2, var3);
   }

   public int[] getQueuedSoundEffectIDs() {
      return soundEffectIds;
   }

   public void set3dZoom(int var1) {
      SpriteMask.client.getClips().setViewportZoom(var1);
      SpriteMask.client.setScale(var1);
   }

   public long getOverallExperience() {
      int[] var1 = this.getSkillExperiences();
      long var2 = 0L;
      int[] var4 = var1;
      int var5 = var1.length;

      for(int var6 = 0; var6 < var5; ++var6) {
         int var7 = var4[var6];
         var2 += (long)var7;
      }

      return var2;
   }

   public RSModelData getModelData(RSAbstractArchive var1, int var2, int var3) {
      return ModelData.method5100((AbstractArchive)var1, var2, var3);
   }

   public boolean isResized() {
      return isResizable;
   }

   public void closeRSInterface(WidgetNode var1, boolean var2) {
      class302.method5909((InterfaceParent)var1, var2);
   }

   public void setObjectDefinitionLowDetail(boolean var1) {
      ObjectComposition.ObjectDefinition_isLowDetail = var1;
   }

   public RSEnumComposition getRsEnum(int var1) {
      return ObjectComposition.method3947(var1);
   }

   public RSSpritePixels createItemSprite(int var1, int var2, int var3, int var4, int var5, boolean var6) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("createItemSprite must be called on client thread");
      } else {
         return this.createRSItemSprite(var1, var2, var3, var4, var5, var6);
      }
   }

   public int getMenuHeight() {
      return class515.menuHeight;
   }

   public int getIndexedSpriteWidth() {
      return class541.SpriteBuffer_spriteWidth;
   }

   public int[] getQueuedSoundEffectLoops() {
      return queuedSoundEffectLoops;
   }

   public void posToCameraAngle(int var1, int var2) {
      tmpCamAngleY = (double)var1 * 0.0030679615757712823D;
      tmpCamAngleX = (double)var2 * 0.0030679615757712823D;
   }

   public Dimension getRealDimensions() {
      if(!this.isStretchedEnabled()) {
         return this.getCanvas().getSize();
      } else {
         if(cachedRealDimensions == null) {
            if(this.isResized()) {
               Container var1 = this.getCanvas().getParent();
               int var2 = var1.getWidth();
               int var3 = var1.getHeight();
               int var4 = (int)((double)var2 / scalingFactor);
               int var5 = (int)((double)var3 / scalingFactor);
               if(var4 < 765 || var5 < 503) {
                  double var6 = (double)var2 / 765.0D;
                  double var8 = (double)var3 / 503.0D;
                  double var10 = Math.min(var6, var8);
                  var4 = (int)((double)var2 / var10);
                  var5 = (int)((double)var3 / var10);
               }

               cachedRealDimensions = new Dimension(var4, var5);
            } else {
               cachedRealDimensions = Constants.GAME_FIXED_SIZE;
            }
         }

         return cachedRealDimensions;
      }
   }

   public byte[][][] getTileSettings() {
      return Tiles.Tiles_renderFlags;
   }

   public GameState getGameState() {
      return GameState.of(this.getRSGameState());
   }

   public int getIndexedSpriteHeight() {
      return GrandExchangeOfferWorldComparator.SpriteBuffer_spriteHeight;
   }

   @ObfuscatedSignature(
      descriptor = "(IIB)V",
      garbageValue = "-26"
   )
   public final void copy$openMenu(int var1, int var2, byte var3) {
      Decimator.method1151_base(var1, var2);
      var1 -= viewportOffsetX;
      var2 -= viewportOffsetY;
      class36.scene.menuOpen_base(ItemLayer.Client_plane, var1, var2, false);
      isMenuOpen = true;
   }

   public int[] getQueuedSoundEffectDelays() {
      return queuedSoundEffectDelays;
   }

   public void rasterizerFillRectangleAlpha(int var1, int var2, int var3, int var4, int var5, int var6) {
      Rasterizer2D.Rasterizer2D_fillRectangleAlpha_base(var1, var2, var3, var4, var5, var6);
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public void onAccountHashChanged(int var1) {
      if(this.callbacks != null) {
         this.callbacks.post(new AccountHashChanged());
      }

   }

   public int getPlane() {
      return ItemLayer.Client_plane;
   }

   public void setMenuEntries(MenuEntry[] var1) {
      boolean var2 = false;
      if(SpriteMask.client.getTempMenuAction() != null && SpriteMask.client.getMenuOptionCount() > 0) {
         var2 = SpriteMask.client.getTempMenuAction().getParam0() == SpriteMask.client.getMenuArguments1()[SpriteMask.client.getMenuOptionCount() - 1] && SpriteMask.client.getTempMenuAction().getParam1() == SpriteMask.client.getMenuArguments2()[SpriteMask.client.getMenuOptionCount() - 1] && SpriteMask.client.getTempMenuAction().getOption().equals(SpriteMask.client.getMenuOptions()[SpriteMask.client.getMenuOptionCount() - 1]) && SpriteMask.client.getTempMenuAction().getIdentifier() == SpriteMask.client.getMenuIdentifiers()[SpriteMask.client.getMenuOptionCount() - 1] && SpriteMask.client.getTempMenuAction().getOpcode() == SpriteMask.client.getMenuOpcodes()[SpriteMask.client.getMenuOptionCount() - 1] && SpriteMask.client.getTempMenuAction().getItemId() == SpriteMask.client.getMenuItemIds()[SpriteMask.client.getMenuOptionCount() - 1];
      }

      for(int var3 = 0; var3 < var1.length; ++var3) {
         RSRuneLiteMenuEntry var4 = (RSRuneLiteMenuEntry)var1[var3];
         if(var4.getIdx() != var3) {
            sortMenuEntries(var4.getIdx(), var3);
         }
      }

      SpriteMask.client.setMenuOptionCount(var1.length);
      tmpMenuOptionsCount = var1.length;
      if(var2 && SpriteMask.client.getMenuOptionCount() > 0) {
         SpriteMask.client.getTempMenuAction().setParam0(SpriteMask.client.getMenuArguments1()[SpriteMask.client.getMenuOptionCount() - 1]);
         SpriteMask.client.getTempMenuAction().setParam1(SpriteMask.client.getMenuArguments2()[SpriteMask.client.getMenuOptionCount() - 1]);
         SpriteMask.client.getTempMenuAction().setOption(SpriteMask.client.getMenuOptions()[SpriteMask.client.getMenuOptionCount() - 1]);
         SpriteMask.client.getTempMenuAction().setIdentifier(SpriteMask.client.getMenuIdentifiers()[SpriteMask.client.getMenuOptionCount() - 1]);
         SpriteMask.client.getTempMenuAction().setOpcode(SpriteMask.client.getMenuOpcodes()[SpriteMask.client.getMenuOptionCount() - 1]);
         SpriteMask.client.getTempMenuAction().setItemId(SpriteMask.client.getMenuItemIds()[SpriteMask.client.getMenuOptionCount() - 1]);
      }

   }

   public int getMenuOptionCount() {
      return menuOptionsCount;
   }

   public RSAbstractRasterProvider getBufferProvider() {
      return class338.rasterProvider;
   }

   public void setMinimapSprite(net.runelite.api.SpritePixels var1) {
      class102.sceneMinimapSprite = (SpritePixels)var1;
   }

   private void rl$$init() {
   }

   public boolean boundingboxCheck(net.runelite.api.Model var1, int var2, int var3, int var4, int var5) {
      int var6 = SpriteMask.client.getCameraPitch();
      int var7 = SpriteMask.client.getCameraYaw();
      int var8 = Perspective.SINE[var6];
      int var9 = Perspective.COSINE[var6];
      int var10 = Perspective.SINE[var7];
      int var11 = Perspective.COSINE[var7];
      int var12 = SpriteMask.client.getCenterX();
      int var13 = SpriteMask.client.getCenterY();
      int var14 = SpriteMask.client.getViewportMouseX();
      int var15 = SpriteMask.client.getViewportMouseY();
      int var16 = SpriteMask.client.get3dZoom();
      int var17 = (var14 - var12) * 50 / var16;
      int var18 = (var15 - var13) * 50 / var16;
      int var19 = (var14 - var12) * 10000 / var16;
      int var20 = (var15 - var13) * 10000 / var16;
      int var21 = rl$rot1(var18, 50, var9, var8);
      int var22 = rl$rot2(var18, 50, var9, var8);
      var18 = var21;
      var21 = rl$rot1(var20, 10000, var9, var8);
      int var23 = rl$rot2(var20, 10000, var9, var8);
      var20 = var21;
      var21 = rl$rot3(var17, var22, var11, var10);
      var22 = rl$rot4(var17, var22, var11, var10);
      var17 = var21;
      var21 = rl$rot3(var19, var23, var11, var10);
      var23 = rl$rot4(var19, var23, var11, var10);
      int var24 = (var21 - var17) / 2;
      int var25 = (var20 - var18) / 2;
      int var26 = (var23 - var22) / 2;
      int var27 = Math.abs(var24);
      int var28 = Math.abs(var25);
      int var29 = Math.abs(var26);
      net.runelite.api.AABB var30 = var1.getAABB(var2);
      int var31 = var3 + var30.getCenterX();
      int var32 = var4 + var30.getCenterY();
      int var33 = var5 + var30.getCenterZ();
      int var34 = var30.getExtremeX();
      int var35 = var30.getExtremeY();
      int var36 = var30.getExtremeZ();
      int var37 = (var17 + var21) / 2;
      int var38 = (var18 + var20) / 2;
      int var39 = (var23 + var22) / 2;
      int var40 = var37 - var31;
      int var41 = var38 - var32;
      int var42 = var39 - var33;
      boolean var43;
      if(Math.abs(var40) > var34 + var27) {
         var43 = false;
      } else if(Math.abs(var41) > var35 + var28) {
         var43 = false;
      } else if(Math.abs(var42) > var36 + var29) {
         var43 = false;
      } else if(Math.abs(var42 * var25 - var41 * var26) > var35 * var29 + var36 * var28) {
         var43 = false;
      } else if(Math.abs(var40 * var26 - var42 * var24) > var36 * var27 + var34 * var29) {
         var43 = false;
      } else if(Math.abs(var41 * var24 - var40 * var25) > var35 * var27 + var34 * var28) {
         var43 = false;
      } else {
         var43 = true;
      }

      return var43;
   }

   public void interpolateCamera(long var1) {
      double var3 = diffToDangle(SpriteMask.client.getCamAngleDY(), var1);
      double var5 = diffToDangle(SpriteMask.client.getCamAngleDX(), var1);
      tmpCamAngleY += var3 / 2.0D;
      tmpCamAngleX += var5 / 2.0D;
      tmpCamAngleX = Doubles.constrainToRange(tmpCamAngleX, 0.39269908169872414D, SpriteMask.client.getCameraPitchRelaxerEnabled()?1.5707963267948966D:1.175029283520401D);
      int var7 = toCameraPos(tmpCamAngleY);
      int var8 = toCameraPos(tmpCamAngleX);
      SpriteMask.client.setCameraYawTarget(var7);
      SpriteMask.client.setCameraPitchTarget(var8);
   }

   public RSEvictingDualNodeHashTable newEvictingDualNodeHashTable(int var1) {
      return new EvictingDualNodeHashTable(var1);
   }

   public int[] getIndexedSpriteOffsetXs() {
      return class541.SpriteBuffer_xOffsets;
   }

   public void rasterizerDrawRectangleAlpha(int var1, int var2, int var3, int var4, int var5, int var6) {
      Rasterizer2D.Rasterizer2D_drawRectangleAlpha_base(var1, var2, var3, var4, var5, var6);
   }

   public void rasterizerDrawHorizontalLineAlpha(int var1, int var2, int var3, int var4, int var5) {
      Rasterizer2D.Rasterizer2D_drawHorizontalLineAlpha_base(var1, var2, var3, var4, var5);
   }

   public RSSoundEffect[] getAudioEffects() {
      return soundEffects;
   }

   public void setGameState(GameState var1) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("setGameState must be called on client thread");
      } else {
         this.setGameState(var1.getState());
      }
   }

   private void rl$$init1() {
      this.varbitCache = CacheBuilder.newBuilder().maximumSize(128L).build();
   }

   public RSDecimator getSoundEffectResampler() {
      return class521.decimator;
   }

   public int[] getIndexedSpriteOffsetYs() {
      return class541.SpriteBuffer_yOffsets;
   }

   public int[] getMenuOpcodes() {
      return menuOpcodes;
   }

   public int[] getSoundLocations() {
      return soundLocations;
   }

   public RSEvictingDualNodeHashTable getVarbitCache() {
      return VarbitComposition.VarbitDefinition_cached;
   }

   public void closeInterface(WidgetNode var1, boolean var2) {
      if(var1 != this.getComponentTable().get(var1.getHash())) {
         throw new IllegalArgumentException("WidgetNode is no longer valid");
      } else {
         this.closeRSInterface(var1, var2);
      }
   }

   public int[] getIndexedSpriteWidths() {
      return class541.SpriteBuffer_spriteWidths;
   }

   public int getQueuedSoundEffectCount() {
      return soundEffectCount;
   }

   public RSRawPcmStream createRawPcmStream(RSRawSound var1, int var2, int var3) {
      return RawPcmStream.method949((RawSound)var1, var2, var3);
   }

   public int[] getIndexedSpriteHeights() {
      return class520.SpriteBuffer_spriteHeights;
   }

   public RSInterfaceParent newInterfaceParent() {
      return new InterfaceParent();
   }

   public RSPcmStreamMixer getSoundEffectAudioQueue() {
      return LoginScreenAnimation.pcmStreamMixer;
   }

   public byte[][] getSpritePixels() {
      return class396.SpriteBuffer_pixels;
   }

   public void addHashAtMouse(long var1) {
      long[] var3 = SpriteMask.client.getEntitiesAtMouse();
      int var4 = SpriteMask.client.getEntitiesAtMouseCount();
      if(var4 < 1000) {
         var3[var4] = var1;
         SpriteMask.client.setEntitiesAtMouseCount(var4 + 1);
      }

   }

   public int[] getIndexedSpritePalette() {
      return class541.SpriteBuffer_spritePalette;
   }

   public void rasterizerDrawVerticalLineAlpha(int var1, int var2, int var3, int var4, int var5) {
      Rasterizer2D.Rasterizer2D_drawVerticalLineAlpha_base(var1, var2, var3, var4, var5);
   }

   public void setQueuedSoundEffectCount(int var1) {
      soundEffectCount = var1;
   }

   public void writeCredentials() {
      try {
         OutputStreamWriter var1 = new OutputStreamWriter(Files.newOutputStream(this.credentialsFile.toPath(), new OpenOption[0]), StandardCharsets.UTF_8);

         try {
            this.credentialsProperties.store(var1, "Do not share this file with anyone");
         } catch (Throwable var5) {
            try {
               var1.close();
            } catch (Throwable var4) {
               var5.addSuppressed(var4);
            }

            throw var5;
         }

         var1.close();
      } catch (IOException var6) {
         SpriteMask.client.getLogger().warn("unable to write credentials to disk", var6);
      }

   }

   public RSFont getFontBold12() {
      return GrandExchangeOfferTotalQuantityComparator.fontBold12;
   }

   public void setIndexedSpriteOffsetXs(int[] var1) {
      class541.SpriteBuffer_xOffsets = var1;
   }

   public void setIndexedSpriteOffsetYs(int[] var1) {
      class541.SpriteBuffer_yOffsets = var1;
   }

   public void setIndexedSpriteWidths(int[] var1) {
      class541.SpriteBuffer_spriteWidths = var1;
   }

   public void setIndexedSpriteHeights(int[] var1) {
      class520.SpriteBuffer_spriteHeights = var1;
   }

   public void revalidateWidgetScroll(net.runelite.api.widgets.Widget[] var1, net.runelite.api.widgets.Widget var2, boolean var3) {
      class132.method3138((Widget[])var1, (Widget)var2, var3);
   }

   public void setIndexedSpritePalette(int[] var1) {
      class541.SpriteBuffer_spritePalette = var1;
   }

   public void openMenu(int var1, int var2) {
      this.openMenu_base(var1, var2);
   }

   public void setSpritePixels(byte[][] var1) {
      class396.SpriteBuffer_pixels = var1;
   }

   public void drawObject(int var1, int var2, int var3, int var4, int var5) {
      class511.drawObject_base(var1, var2, var3, var4, var5);
   }

   public String[] getMenuTargets() {
      return menuTargets;
   }

   public String[] getMenuOptions() {
      return menuActions;
   }

   public void rasterizerDrawCircleAlpha(int var1, int var2, int var3, int var4, int var5) {
      Rasterizer2D.Rasterizer2D_drawCircleAlpha_base(var1, var2, var3, var4, var5);
   }

   public void runComponentCloseListeners(net.runelite.api.widgets.Widget[] var1, int var2) {
      UserComparator5.method2971((Widget[])var1, var2);
   }

   public void rasterizerDrawGradientAlpha(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      Rasterizer2D.Rasterizer2D_fillRectangleGradientAlpha_base(var1, var2, var3, var4, var5, var6, var7, var8);
   }

   public final void doCycleEnd() {
      SpriteMask.client.getCallbacks().tickEnd();
   }

   public final void init() {
      try {
         if(this.checkHost_base()) {
            for(int var1 = 0; var1 <= 28; ++var1) {
               String var2 = this.getParameter(Integer.toString(var1));
               if(var2 != null) {
                  switch(var1) {
                  case 3:
                     if(var2.equalsIgnoreCase("true")) {
                        isMembersWorld = true;
                     } else {
                        isMembersWorld = false;
                     }
                     break;
                  case 4:
                     if(clientType == -1) {
                        clientType = Integer.parseInt(var2);
                     }
                     break;
                  case 5:
                     worldProperties = Integer.parseInt(var2);
                     break;
                  case 6:
                     class85.clientLanguage = Language.method7192(Integer.parseInt(var2));
                     break;
                  case 7:
                     int var4 = Integer.parseInt(var2);
                     GameBuild[] var5 = class13.method173();
                     int var6 = 0;

                     GameBuild var8;
                     while(true) {
                        if(var6 >= var5.length) {
                           var8 = null;
                           break;
                        }

                        GameBuild var7 = var5[var6];
                        if(var4 == var7.buildId) {
                           var8 = var7;
                           break;
                        }

                        ++var6;
                     }

                     class191.field1978 = var8;
                     break;
                  case 8:
                     if(var2.equalsIgnoreCase("true")) {
                        ;
                     }
                     break;
                  case 9:
                     MenuAction.field878 = var2;
                     break;
                  case 10:
                     Messages.field1401 = (StudioGame)class12.method170(VerticalAlignment.method3755(), Integer.parseInt(var2));
                     if(Messages.field1401 == StudioGame.oldscape) {
                        class89.loginType = LoginType.oldscape;
                     } else {
                        class89.loginType = LoginType.field5027;
                     }
                     break;
                  case 11:
                     class314.field3401 = var2;
                     break;
                  case 12:
                     worldId = Integer.parseInt(var2);
                  case 13:
                  case 16:
                  case 18:
                  case 19:
                  case 20:
                  case 23:
                  case 24:
                  default:
                     break;
                  case 14:
                     DevicePcmPlayerProvider.field111 = Integer.parseInt(var2);
                     break;
                  case 15:
                     gameBuild = Integer.parseInt(var2);
                     break;
                  case 17:
                     class228.field2415 = var2;
                     break;
                  case 21:
                     field488 = Integer.parseInt(var2);
                     break;
                  case 22:
                     FriendsChat.field4677 = var2;
                     break;
                  case 25:
                     int var3 = var2.indexOf(".");
                     if(var3 == -1) {
                        revision = Integer.parseInt(var2);
                     } else {
                        revision = Integer.parseInt(var2.substring(0, var3));
                        Integer.parseInt(var2.substring(var3 + 1));
                     }
                  }
               }
            }

            Scene.Scene_isLowDetail = false;
            isLowDetail = false;
            Friend.worldHost = this.getCodeBase().getHost();
            WorldMapSectionType.field2556 = new JagNetThread();
            String var9 = class191.field1978.name;
            byte var10 = 0;
            if((worldProperties & class522.field5109.rsOrdinal_base()) != 0) {
               ItemLayer.field2655 = "beta";
            }

            try {
               class339.method6310_base("oldschool", ItemLayer.field2655, var9, var10, 23);
            } catch (Exception var12) {
               GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base((String)null, var12);
            }

            SpriteMask.client = this;
            RunException.field5299 = clientType;
            Messages.accessToken = getStaticCredentialsProperty("JX_ACCESS_TOKEN");
            ObjectComposition.refreshToken = getStaticCredentialsProperty("JX_REFRESH_TOKEN");
            onRefreshToken(-1);
            class369.sessionId = getStaticCredentialsProperty("JX_SESSION_ID");
            InterfaceParent.characterId = getStaticCredentialsProperty("JX_CHARACTER_ID");
            String var14 = getStaticCredentialsProperty("JX_DISPLAY_NAME");
            String var11;
            if(var14 != null && !var14.isEmpty() && var14.charAt(0) != '#') {
               var11 = var14;
            } else {
               var11 = "";
            }

            Login.displayName = var11;
            if(Boolean.parseBoolean(System.getProperty("jagex.disableBouncyCastle"))) {
               this.field532 = true;
            }

            if(field490 == -1) {
               if(!this.containsAccessAndRefreshToken_base() && !this.containsSessionAndCharacterId_base()) {
                  field490 = 0;
               } else {
                  field490 = 5;
               }
            }

            this.startThread_base(765, 503, 218, 1);
         }
      } catch (RuntimeException var13) {
         throw CollisionMap.method4371(var13, "client.init(" + ')');
      }
   }

   protected void finalize() throws Throwable {
      InterfaceParent.method2353_base(this);
      super.finalize();
   }

   public void setOtlTokenRequester(OtlTokenRequester var1) {
      if(var1 != null) {
         this.field530 = var1;
         UserComparator7.method2966_base(10);
      }
   }

   public void setRefreshTokenRequester(RefreshAccessTokenRequester var1) {
      if(var1 != null) {
         this.field535 = var1;
      }
   }

   public long getAccountHash() {
      return this.accountHash;
   }

   public void setClient(int var1) {
      this.field545 = var1;
   }

   public boolean isOnLoginScreen() {
      return gameState == 10;
   }

   public net.runelite.api.RuneLiteObject createRuneLiteObject() {
      return new RuneLiteObject();
   }

   public Rasterizer getRasterizer() {
      return AbstractRasterizer.rasterizer;
   }

   public boolean getCameraPitchRelaxerEnabled() {
      return pitchRelaxEnabled;
   }

   public void setCameraPitchRelaxerEnabled(boolean var1) {
      if(pitchRelaxEnabled != var1) {
         pitchRelaxEnabled = var1;
         if(!var1) {
            int var2 = SpriteMask.client.getCameraPitchTarget();
            if(var2 > 383) {
               SpriteMask.client.setCameraPitchTarget(383);
            }
         }

      }
   }

   public void checkClickbox(net.runelite.api.Model var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, long var10) {
      RSModel var12 = (RSModel)var1;
      boolean var13 = var10 != 0L && (int)(var10 >>> 16 & 1L) != 1;
      boolean var14 = SpriteMask.client.getViewportContainsMouse();
      if(var13 && var14 && (SpriteMask.client.getOculusOrbState() == 0 || SpriteMask.client.getComplianceValue("orbInteraction"))) {
         if(this.boundingboxCheck(var12, var2, var7, var8, var9)) {
            if(Math.sqrt((double)(var7 * var7 + var9 * var9)) <= 12800.0D) {
               if(var12.isClickable()) {
                  this.addHashAtMouse(var10);
               } else {
                  int var15 = var12.getVerticesCount();
                  int var16 = var12.getFaceCount();
                  int[] var17 = var12.getVerticesX();
                  int[] var18 = var12.getVerticesY();
                  int[] var19 = var12.getVerticesZ();
                  int[] var20 = var12.getFaceIndices1();
                  int[] var21 = var12.getFaceIndices2();
                  int[] var22 = var12.getFaceIndices3();
                  int[] var23 = var12.getFaceColors3();
                  int var24 = SpriteMask.client.get3dZoom();
                  int var25 = SpriteMask.client.getCenterX();
                  int var26 = SpriteMask.client.getCenterY();
                  int var27 = 0;
                  int var28 = 0;
                  if(var2 != 0) {
                     var27 = Perspective.SINE[var2];
                     var28 = Perspective.COSINE[var2];
                  }

                  int var29;
                  int var30;
                  int var31;
                  int var32;
                  int var33;
                  for(var29 = 0; var29 < var15; ++var29) {
                     var30 = var17[var29];
                     var31 = var18[var29];
                     var32 = var19[var29];
                     if(var2 != 0) {
                        var33 = var32 * var27 + var30 * var28 >> 16;
                        var32 = var32 * var28 - var30 * var27 >> 16;
                        var30 = var33;
                     }

                     var30 += var7;
                     var31 += var8;
                     var32 += var9;
                     var33 = var30 * var6 + var5 * var32 >> 16;
                     var32 = var32 * var6 - var5 * var30 >> 16;
                     var30 = var33;
                     var33 = var31 * var4 - var3 * var32 >> 16;
                     var32 = var32 * var4 + var3 * var31 >> 16;
                     if(var32 >= 50) {
                        rl$modelViewportYs[var29] = var30 * var24 / var32 + var25;
                        rl$modelViewportXs[var29] = var33 * var24 / var32 + var26;
                     } else {
                        rl$modelViewportYs[var29] = -5000;
                     }
                  }

                  var29 = SpriteMask.client.getViewportMouseX();
                  var30 = SpriteMask.client.getViewportMouseY();

                  for(var31 = 0; var31 < var16; ++var31) {
                     if(var23[var31] != -2) {
                        var32 = var20[var31];
                        var33 = var21[var31];
                        int var34 = var22[var31];
                        int var35 = rl$modelViewportYs[var32];
                        int var36 = rl$modelViewportYs[var33];
                        int var37 = rl$modelViewportYs[var34];
                        int var38 = rl$modelViewportXs[var32];
                        int var39 = rl$modelViewportXs[var33];
                        int var40 = rl$modelViewportXs[var34];
                        if(var35 != -5000 && var36 != -5000 && var37 != -5000) {
                           int var41 = var12.isClickable()?20:5;
                           int var42 = var41 + var30;
                           boolean var43;
                           if(var42 < var38 && var42 < var39 && var42 < var40) {
                              var43 = false;
                           } else {
                              var42 = var30 - var41;
                              if(var42 > var38 && var42 > var39 && var42 > var40) {
                                 var43 = false;
                              } else {
                                 var42 = var41 + var29;
                                 if(var42 < var35 && var42 < var36 && var42 < var37) {
                                    var43 = false;
                                 } else {
                                    var42 = var29 - var41;
                                    if(var42 > var35 && var42 > var36 && var42 > var37) {
                                       var43 = false;
                                    } else {
                                       var43 = true;
                                    }
                                 }
                              }
                           }

                           if(var43) {
                              this.addHashAtMouse(var10);
                              break;
                           }
                        }
                     }
                  }

               }
            }
         }
      }
   }

   public boolean getComplianceValue(String var1) {
      return var1 == null?false:(complianceMap.containsKey(var1)?((Boolean)complianceMap.get(var1)).booleanValue():false);
   }

   public void setComplianceValue(String var1, boolean var2) {
      if(var1 != null) {
         SpriteMask.client.getLogger().debug("Compliance: {} being set to {}", var1, Boolean.valueOf(var2));
         complianceMap.put(var1, Boolean.valueOf(var2));
      }
   }

   public boolean isKeyPressed(int var1) {
      boolean[] var2 = SpriteMask.client.getPressedKeys();
      return var2[var1];
   }

   public void setShouldRenderLoginScreenFire(boolean var1) {
      shouldRenderLoginScreenFire = var1;
   }

   public boolean shouldRenderLoginScreenFire() {
      return shouldRenderLoginScreenFire;
   }

   public void setLoginScreen(net.runelite.api.SpritePixels var1) {
      if(!$assertionsDisabled && !SpriteMask.client.isClientThread()) {
         throw new AssertionError("setLoginScreen must be called on client thread");
      } else {
         loginScreenBackground = var1;
         SpriteMask.client.clearLoginScreen(false);
         if(SpriteMask.client.getGameState() == GameState.LOGIN_SCREEN) {
            try {
               SpriteMask.client.setGameState(GameState.UNKNOWN);
            } finally {
               SpriteMask.client.setGameState(GameState.LOGIN_SCREEN);
            }
         }

      }
   }

   public void setLoginScreenBackground(net.runelite.api.SpritePixels var1) {
      if(!$assertionsDisabled && !SpriteMask.client.isClientThread()) {
         throw new AssertionError("setLoginScreen must be called on client thread");
      } else {
         loginScreenBackground = var1;
         SpriteMask.client.clearLoginScreen(false);
      }
   }

   public void setLoginScreenLeftTitleSprite() {
      setLeftTitleSprite(0);
   }

   public void setLoginScreenRightTitleSprite() {
      setRightTitleSprite(0);
   }

   public void draw2010Menu(int var1) {
      int var2 = this.getMenuX();
      int var3 = this.getMenuY();
      int var4 = this.getMenuWidth();
      int var5 = this.getMenuHeight();
      this.rasterizerDrawHorizontalLineAlpha(var2 + 2, var3, var4 - 4, 7170651, var1);
      this.rasterizerDrawHorizontalLineAlpha(var2 + 2, var3 + var5 - 1, var4 - 4, 7170651, var1);
      this.rasterizerDrawVerticalLineAlpha(var2, var3 + 2, var5 - 4, 7170651, var1);
      this.rasterizerDrawVerticalLineAlpha(var2 + var4 - 1, var3 + 2, var5 - 4, 7170651, var1);
      this.rasterizerDrawRectangleAlpha(var2 + 1, var3 + 5, var4 - 2, var5 - 6, 2827810, var1);
      this.rasterizerDrawHorizontalLineAlpha(var2 + 1, var3 + 17, var4 - 2, 2827810, var1);
      this.rasterizerDrawCircleAlpha(var2 + 2, var3 + var5 - 3, 0, 2827810, var1);
      this.rasterizerDrawCircleAlpha(var2 + var4 - 3, var3 + var5 - 3, 0, 2827810, var1);
      this.rasterizerDrawGradientAlpha(var2 + 2, var3 + 1, var4 - 4, 16, 3288610, 592388, var1, var1);
      this.rasterizerFillRectangleAlpha(var2 + 1, var3 + 1, 2, 4, 2827810, var1);
      this.rasterizerFillRectangleAlpha(var2 + var4 - 3, var3 + 1, 2, 4, 2827810, var1);
      this.rasterizerDrawHorizontalLineAlpha(var2 + 2, var3 + 18, var4 - 4, 5392957, var1);
      this.rasterizerDrawHorizontalLineAlpha(var2 + 3, var3 + var5 - 3, var4 - 6, 5392957, var1);
      this.rasterizerDrawVerticalLineAlpha(var2 + 2, var3 + 18, var5 - 21, 5392957, var1);
      this.rasterizerDrawVerticalLineAlpha(var2 + var4 - 3, var3 + 18, var5 - 21, 5392957, var1);
      this.rasterizerFillRectangleAlpha(var2 + 3, var3 + 19, var4 - 6, var5 - 22, 2828060, var1);
      this.rasterizerDrawCircleAlpha(var2 + 1, var3 + 1, 0, 7170651, var1);
      this.rasterizerDrawCircleAlpha(var2 + var4 - 2, var3 + 1, 0, 7170651, var1);
      this.rasterizerDrawCircleAlpha(var2 + 1, var3 + var5 - 2, 0, 7170651, var1);
      this.rasterizerDrawCircleAlpha(var2 + var4 - 2, var3 + var5 - 2, 0, 7170651, var1);
      RSFont var6 = this.getFontBold12();
      var6.drawTextLeftAligned("Choose Option", var2 + 3, var3 + 14, 13023381, -1);
      int var7 = this.getMouseX();
      int var8 = this.getMouseY();
      int var9 = this.getMenuOptionCount();
      String[] var10 = this.getMenuTargets();
      String[] var11 = this.getMenuOptions();

      for(int var12 = 0; var12 < var9; ++var12) {
         int var13 = (var9 - 1 - var12) * 15 + var3 + 31;
         String var14 = var11[var12];
         if(!var10[var12].isEmpty()) {
            var14 = var14 + " " + var10[var12];
         }

         var6.drawTextLeftAligned(var14, var2 + 3, var13, 13023381, -1);
         if(var7 > var2 && var7 < var4 + var2 && var8 > var13 - 13 && var8 < var13 + 3) {
            this.rasterizerFillRectangleAlpha(var2 + 3, var13 - 12, var4 - 6, 15, 16777215, 80);
         }
      }

   }

   public void drawOriginalMenu(int var1) {
      int var2 = this.getMenuX();
      int var3 = this.getMenuY();
      int var4 = this.getMenuWidth();
      int var5 = this.getMenuHeight();
      this.rasterizerFillRectangleAlpha(var2, var3, var4, var5, 6116423, var1);
      this.rasterizerDrawRectangleAlpha(var2, var3, var4, var5, 6116423, var1);
      this.rasterizerFillRectangleAlpha(var2 + 1, var3 + 1, var4 - 2, 16, 0, var1);
      this.rasterizerDrawRectangleAlpha(var2 + 1, var3 + 18, var4 - 2, var5 - 19, 0, var1);
      RSFont var6 = this.getFontBold12();
      var6.drawTextLeftAligned("Choose Option", var2 + 3, var3 + 14, 6116423, -1);
      int var7 = this.getMouseX();
      int var8 = this.getMouseY();
      int var9 = this.getMenuOptionCount();
      String[] var10 = this.getMenuTargets();
      String[] var11 = this.getMenuOptions();

      for(int var12 = 0; var12 < var9; ++var12) {
         int var13 = (var9 - 1 - var12) * 15 + var3 + 31;
         String var14 = var11[var12];
         if(!var10[var12].isEmpty()) {
            var14 = var14 + " " + var10[var12];
         }

         int var15 = 16777215;
         if(var7 > var2 && var7 < var4 + var2 && var8 > var13 - 13 && var8 < var13 + 3) {
            var15 = 16776960;
         }

         var6.drawTextLeftAligned(var14, var2 + 3, var13, var15, -1);
      }

   }

   public void setTempMenuEntry(MenuEntry var1) {
      if(var1 != null && class174.tempMenuAction != null) {
         class174.tempMenuAction.setOption(var1.getOption());
         class174.tempMenuAction.setOpcode(var1.getType().getId());
         class174.tempMenuAction.setIdentifier(var1.getIdentifier());
         class174.tempMenuAction.setParam0(var1.getParam0());
         class174.tempMenuAction.setParam1(var1.getParam1());
      }
   }

   public void setMinimapReceivesClicks(boolean var1) {
      rl$minimapReceivesClicks = var1;
   }

   public boolean isMinimapZoom() {
      return rl$minimapZoom;
   }

   public void setMinimapZoom(boolean var1) {
      rl$minimapZoom = var1;
   }

   public double getMinimapZoom() {
      return rl$minimapZoomValue;
   }

   public void setMinimapZoom(double var1) {
      rl$minimapZoomValue = var1;
   }

   public final void copy$menu(int var1) {
      boolean var2 = false;

      int var3;
      int var6;
      while(!var2) {
         if(var1 == 840126884) {
            return;
         }

         var2 = true;

         for(var3 = 0; var3 < menuOptionsCount - 1; ++var3) {
            if(var1 == 840126884) {
               return;
            }

            if(menuOpcodes[var3] < 1000) {
               if(var1 == 840126884) {
                  return;
               }

               if(menuOpcodes[var3 + 1] > 1000) {
                  if(var1 == 840126884) {
                     return;
                  }

                  String var4 = menuTargets[var3];
                  menuTargets[var3] = menuTargets[var3 + 1];
                  menuTargets[var3 + 1] = var4;
                  String var5 = menuActions[var3];
                  menuActions[var3] = menuActions[var3 + 1];
                  menuActions[var3 + 1] = var5;
                  var6 = menuOpcodes[var3];
                  menuOpcodes[var3] = menuOpcodes[var3 + 1];
                  menuOpcodes[var3 + 1] = var6;
                  var6 = menuArguments1[var3];
                  menuArguments1[var3] = menuArguments1[var3 + 1];
                  menuArguments1[var3 + 1] = var6;
                  var6 = menuArguments2[var3];
                  menuArguments2[var3] = menuArguments2[var3 + 1];
                  menuArguments2[var3 + 1] = var6;
                  var6 = menuIdentifiers[var3];
                  menuIdentifiers[var3] = menuIdentifiers[var3 + 1];
                  menuIdentifiers[var3 + 1] = var6;
                  var6 = menuItemIds[var3];
                  menuItemIds[var3] = menuItemIds[var3 + 1];
                  menuItemIds[var3 + 1] = var6;
                  boolean var7 = menuShiftClick[var3];
                  menuShiftClick[var3] = menuShiftClick[var3 + 1];
                  menuShiftClick[var3 + 1] = var7;
                  var2 = false;
               }
            }
         }
      }

      if(clickedWidget == null) {
         int var20 = MouseHandler.MouseHandler_lastButton;
         int var8;
         int var9;
         int var17;
         int var21;
         if(isMenuOpen) {
            int var16;
            if(var20 != 1 && (class19.mouseCam || var20 != 4)) {
               var3 = MouseHandler.MouseHandler_x;
               var16 = MouseHandler.MouseHandler_y;
               if(var3 < FriendSystem.menuX - 10 || var3 > FriendSystem.menuX + class428.menuWidth + 10 || var16 < class60.menuY - 10 || var16 > class515.menuHeight + class60.menuY + 10) {
                  isMenuOpen = false;
                  var17 = FriendSystem.menuX;
                  var6 = class60.menuY;
                  var21 = class428.menuWidth;
                  var8 = class515.menuHeight;

                  for(var9 = 0; var9 < rootWidgetCount; ++var9) {
                     if(rootWidgetWidths[var9] + rootWidgetXs[var9] > var17 && rootWidgetXs[var9] < var21 + var17 && rootWidgetHeights[var9] + rootWidgetYs[var9] > var6 && rootWidgetYs[var9] < var6 + var8) {
                        validRootWidgets[var9] = true;
                     }
                  }
               }
            }

            if(var20 == 1 || !class19.mouseCam && var20 == 4) {
               var3 = FriendSystem.menuX;
               var16 = class60.menuY;
               var17 = class428.menuWidth;
               var6 = MouseHandler.MouseHandler_lastPressedX;
               var21 = MouseHandler.MouseHandler_lastPressedY;
               var8 = -1;

               int var10;
               for(var9 = 0; var9 < menuOptionsCount; ++var9) {
                  var10 = var16 + (menuOptionsCount - 1 - var9) * 15 + 31;
                  if(var6 > var3 && var6 < var3 + var17 && var21 > var10 - 13) {
                     if(var1 == 840126884) {
                        return;
                     }

                     if(var21 < var10 + 3) {
                        if(var1 == 840126884) {
                           return;
                        }

                        var8 = var9;
                     }
                  }
               }

               int var11;
               int var12;
               int var13;
               if(var8 != -1 && var8 >= 0) {
                  var9 = menuArguments1[var8];
                  var10 = menuArguments2[var8];
                  var11 = menuOpcodes[var8];
                  var12 = menuIdentifiers[var8];
                  var13 = menuItemIds[var8];
                  String var14 = menuActions[var8];
                  String var15 = menuTargets[var8];
                  class407.menuAction_base(var9, var10, var11, var12, var13, var14, var15, MouseHandler.MouseHandler_lastPressedX, MouseHandler.MouseHandler_lastPressedY);
               }

               isMenuOpen = false;
               var9 = FriendSystem.menuX;
               var10 = class60.menuY;
               var11 = class428.menuWidth;
               var12 = class515.menuHeight;

               for(var13 = 0; var13 < rootWidgetCount; ++var13) {
                  if(rootWidgetWidths[var13] + rootWidgetXs[var13] > var9 && rootWidgetXs[var13] < var9 + var11) {
                     if(var1 == 840126884) {
                        return;
                     }

                     if(rootWidgetYs[var13] + rootWidgetHeights[var13] > var10) {
                        if(var1 == 840126884) {
                           return;
                        }

                        if(rootWidgetYs[var13] < var12 + var10) {
                           validRootWidgets[var13] = true;
                        }
                     }
                  }
               }
            }
         } else {
            label203: {
               var3 = menuOptionsCount - 1;
               if(var20 != 1) {
                  if(class19.mouseCam || var20 != 4) {
                     break label203;
                  }

                  if(var1 == 840126884) {
                     return;
                  }
               }

               if(this.shouldLeftClickOpenMenu_base()) {
                  var20 = 2;
               }
            }

            if((var20 == 1 || !class19.mouseCam && var20 == 4) && menuOptionsCount > 0) {
               if(var1 == 840126884) {
                  return;
               }

               if(var3 < 0) {
                  if(var1 == 840126884) {
                     return;
                  }
               } else {
                  var17 = menuArguments1[var3];
                  var6 = menuArguments2[var3];
                  var21 = menuOpcodes[var3];
                  var8 = menuIdentifiers[var3];
                  var9 = menuItemIds[var3];
                  String var18 = menuActions[var3];
                  String var19 = menuTargets[var3];
                  class407.menuAction_base(var17, var6, var21, var8, var9, var18, var19, MouseHandler.MouseHandler_lastPressedX, MouseHandler.MouseHandler_lastPressedY);
               }
            }

            if(var20 == 2) {
               if(var1 == 840126884) {
                  return;
               }

               if(menuOptionsCount > 0) {
                  this.openMenu_base(MouseHandler.MouseHandler_lastPressedX, MouseHandler.MouseHandler_lastPressedY);
               }
            }
         }

      }
   }

   public void setPrintMenuActions(boolean var1) {
      printMenuActions = var1;
   }

   public void setHideDisconnect(boolean var1) {
      hideDisconnect = var1;
   }

   public void setHideFriendAttackOptions(boolean var1) {
      hideFriendAttackOptions = var1;
   }

   public void setHideFriendCastOptions(boolean var1) {
      hideFriendCastOptions = var1;
   }

   public void setHideClanmateAttackOptions(boolean var1) {
      hideClanmateAttackOptions = var1;
   }

   public void setHideClanmateCastOptions(boolean var1) {
      hideClanmateCastOptions = var1;
   }

   public void setAllWidgetsAreOpTargetable(boolean var1) {
      allWidgetsAreOpTargetable = var1;
   }

   public void setUnhiddenCasts(Set var1) {
      unhiddenCasts = var1;
   }

   public String getBuildID() {
      return "Ash";
   }

   public Callbacks getCallbacks() {
      return this.callbacks;
   }

   public DrawCallbacks getDrawCallbacks() {
      return this.drawCallbacks;
   }

   public void setDrawCallbacks(DrawCallbacks var1) {
      this.drawCallbacks = var1;
   }

   public Logger getLogger() {
      return rl$logger;
   }

   public boolean isInterpolatePlayerAnimations() {
      return interpolatePlayerAnimations;
   }

   public void setInterpolatePlayerAnimations(boolean var1) {
      interpolatePlayerAnimations = var1;
   }

   public boolean isInterpolateNpcAnimations() {
      return interpolateNpcAnimations;
   }

   public void setInterpolateNpcAnimations(boolean var1) {
      interpolateNpcAnimations = var1;
   }

   public boolean isInterpolateObjectAnimations() {
      return interpolateObjectAnimations;
   }

   public void setInterpolateObjectAnimations(boolean var1) {
      interpolateObjectAnimations = var1;
   }

   public boolean isInterpolateWidgetAnimations() {
      return interpolateWidgetAnimations;
   }

   public void setInterpolateWidgetAnimations(boolean var1) {
      interpolateWidgetAnimations = var1;
   }

   public void setInventoryDragDelay(int var1) {
      inventoryDragDelay = var1;
   }

   public boolean isHdMinimapEnabled() {
      return hdMinimapEnabled;
   }

   public void setHdMinimapEnabled(boolean var1) {
      hdMinimapEnabled = var1;
   }

   public AccountType getAccountType() {
      int var1 = this.getVarbitValue(1777);
      switch(var1) {
      case 1:
         return AccountType.IRONMAN;
      case 2:
         return AccountType.ULTIMATE_IRONMAN;
      case 3:
         return AccountType.HARDCORE_IRONMAN;
      case 4:
         return AccountType.GROUP_IRONMAN;
      case 5:
         return AccountType.HARDCORE_GROUP_IRONMAN;
      case 6:
         return AccountType.UNRANKED_GROUP_IRONMAN;
      default:
         return AccountType.NORMAL;
      }
   }

   public net.runelite.api.Tile getSelectedSceneTile() {
      int var1 = this.getSelectedSceneTileX();
      int var2 = this.getSelectedSceneTileY();
      return var1 != -1 && var2 != -1?this.getScene().getTiles()[this.getPlane()][var1][var2]:null;
   }

   public List getPlayers() {
      int var1 = this.getPlayerIndexesCount();
      int[] var2 = this.getPlayerIndices();
      RSPlayer[] var3 = this.getCachedPlayers();
      ArrayList var4 = new ArrayList(var1);

      for(int var5 = 0; var5 < var1; ++var5) {
         var4.add(var3[var2[var5]]);
      }

      return var4;
   }

   public List getNpcs() {
      int var1 = this.getNpcIndexesCount();
      int[] var2 = this.getNpcIndices();
      RSNPC[] var3 = this.getCachedNPCs();
      ArrayList var4 = new ArrayList(var1);

      for(int var5 = 0; var5 < var1; ++var5) {
         var4.add(var3[var2[var5]]);
      }

      return var4;
   }

   public int getBoostedSkillLevel(Skill var1) {
      int[] var2 = this.getBoostedSkillLevels();
      return var2[var1.ordinal()];
   }

   public int getRealSkillLevel(Skill var1) {
      int[] var2 = this.getRealSkillLevels();
      return var2[var1.ordinal()];
   }

   public int getTotalLevel() {
      int var1 = 0;
      int[] var2 = SpriteMask.client.getRealSkillLevels();
      int var3 = Skill.CONSTRUCTION.ordinal();

      for(int var4 = 0; var4 < var2.length; ++var4) {
         if(var4 <= var3) {
            var1 += var2[var4];
         }
      }

      return var1;
   }

   public MessageNode addChatMessage(ChatMessageType var1, String var2, String var3, String var4) {
      return this.addChatMessage(var1, var2, var3, var4, true);
   }

   public Point getMouseCanvasPosition() {
      return new Point(this.getMouseX(), this.getMouseY());
   }

   public net.runelite.api.widgets.Widget[] getWidgetRoots() {
      int var1 = this.getTopLevelInterfaceId();
      if(var1 == -1) {
         return new net.runelite.api.widgets.Widget[0];
      } else {
         ArrayList var2 = new ArrayList();
         RSWidget[] var3 = SpriteMask.client.getWidgetDefinition().getWidgets()[var1];
         int var4 = var3.length;

         for(int var5 = 0; var5 < var4; ++var5) {
            RSWidget var6 = var3[var5];
            if(var6 != null && var6.getRSParentId() == -1) {
               var2.add(var6);
            }
         }

         return (net.runelite.api.widgets.Widget[])var2.toArray(new net.runelite.api.widgets.Widget[var2.size()]);
      }
   }

   public net.runelite.api.widgets.Widget getWidget(WidgetInfo var1) {
      int var2 = var1.getGroupId();
      int var3 = var1.getChildId();
      return this.getWidget(var2, var3);
   }

   public RSWidget[] getGroup(int var1) {
      if(SpriteMask.client.getWidgetDefinition() == null) {
         return null;
      } else {
         RSWidget[][] var2 = SpriteMask.client.getWidgetDefinition().getWidgets();
         return var2 != null && var1 >= 0 && var1 < var2.length && var2[var1] != null?var2[var1]:null;
      }
   }

   public int getServerVarpValue(int var1) {
      int[] var2 = this.getServerVarps();
      return var2[var1];
   }

   public int getVarpValue(VarPlayer var1) {
      int[] var2 = this.getServerVarps();
      return var2[var1.getId()];
   }

   public int getServerVarbitValue(int var1) {
      return this.getVarbitValue(this.getServerVarps(), var1);
   }

   public int getVar(VarPlayer var1) {
      int[] var2 = this.getVarps();
      return var2[var1.getId()];
   }

   public int getVarpValue(int var1) {
      return this.getVarpValue(this.getVarps(), var1);
   }

   public boolean isPrayerActive(Prayer var1) {
      return this.getVarbitValue(var1.getVarbit()) == 1;
   }

   public int getSkillExperience(Skill var1) {
      int[] var2 = this.getSkillExperiences();
      if(var1 == Skill.OVERALL) {
         rl$logger.debug("getSkillExperience called for {}!", var1);
         return (int)this.getOverallExperience();
      } else {
         int var3 = var1.ordinal();
         return var3 >= var2.length?-1:var2[var3];
      }
   }

   public void refreshChat() {
      this.setChatCycle(this.getCycleCntr());
   }

   public MenuEntry createMenuEntry(String var1, String var2, int var3, int var4, int var5, int var6, int var7, boolean var8) {
      RSRuneLiteMenuEntry var9 = newBareRuneliteMenuEntry();
      var9.setOption(var1);
      var9.setTarget(var2);
      var9.setIdentifier(var3);
      var9.setType(net.runelite.api.MenuAction.of(var4));
      var9.setParam0(var5);
      var9.setParam1(var6);
      var9.setConsumer((Consumer)null);
      var9.setForceLeftClick(var8);
      var9.setItemId(var7);
      return var9;
   }

   public MenuEntry createMenuEntry(int var1) {
      if(SpriteMask.client.getMenuOptionCount() >= 500) {
         throw new IllegalStateException();
      } else {
         if(var1 < 0) {
            var1 = SpriteMask.client.getMenuOptionCount() + var1 + 1;
            if(var1 < 0) {
               throw new IllegalArgumentException();
            }
         }

         RSRuneLiteMenuEntry var2;
         if(var1 < SpriteMask.client.getMenuOptionCount()) {
            RSRuneLiteMenuEntry var3 = rl$menuEntries[SpriteMask.client.getMenuOptionCount()];
            if(var3 == null) {
               var3 = rl$menuEntries[SpriteMask.client.getMenuOptionCount()] = newRuneliteMenuEntry(SpriteMask.client.getMenuOptionCount());
            }

            int var4 = SpriteMask.client.getMenuOptionCount();

            while(var4 > var1) {
               SpriteMask.client.getMenuOptions()[var4] = SpriteMask.client.getMenuOptions()[var4 - 1];
               SpriteMask.client.getMenuTargets()[var4] = SpriteMask.client.getMenuTargets()[var4 - 1];
               SpriteMask.client.getMenuIdentifiers()[var4] = SpriteMask.client.getMenuIdentifiers()[var4 - 1];
               SpriteMask.client.getMenuOpcodes()[var4] = SpriteMask.client.getMenuOpcodes()[var4 - 1];
               SpriteMask.client.getMenuArguments1()[var4] = SpriteMask.client.getMenuArguments1()[var4 - 1];
               SpriteMask.client.getMenuArguments2()[var4] = SpriteMask.client.getMenuArguments2()[var4 - 1];
               SpriteMask.client.getMenuItemIds()[var4] = SpriteMask.client.getMenuItemIds()[var4 - 1];
               SpriteMask.client.getMenuForceLeftClick()[var4] = SpriteMask.client.getMenuForceLeftClick()[var4 - 1];
               rl$menuEntries[var4] = rl$menuEntries[var4 - 1];
               rl$menuEntries[var4].setIdx(var4--);
            }

            SpriteMask.client.setMenuOptionCount(SpriteMask.client.getMenuOptionCount() + 1);
            tmpMenuOptionsCount = SpriteMask.client.getMenuOptionCount();
            var2 = var3;
            rl$menuEntries[var1] = var3;
            var3.setIdx(var1);
         } else {
            if(var1 != SpriteMask.client.getMenuOptionCount()) {
               throw new IllegalArgumentException();
            }

            var2 = rl$menuEntries[SpriteMask.client.getMenuOptionCount()];
            if(var2 == null) {
               var2 = rl$menuEntries[SpriteMask.client.getMenuOptionCount()] = newRuneliteMenuEntry(SpriteMask.client.getMenuOptionCount());
            }

            SpriteMask.client.setMenuOptionCount(SpriteMask.client.getMenuOptionCount() + 1);
            tmpMenuOptionsCount = SpriteMask.client.getMenuOptionCount();
         }

         var2.setOption("");
         var2.setTarget("");
         var2.setIdentifier(0);
         var2.setType(net.runelite.api.MenuAction.RUNELITE);
         var2.setParam0(0);
         var2.setParam1(0);
         var2.setItemId(-1);
         var2.setConsumer((Consumer)null);
         return var2;
      }
   }

   public net.runelite.api.Projectile createProjectile(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, net.runelite.api.Actor var11, int var12, int var13) {
      int var14 = 0;
      if(var11 instanceof net.runelite.api.NPC) {
         var14 = ((net.runelite.api.NPC)var11).getIndex() + 1;
      } else if(var11 instanceof net.runelite.api.Player) {
         var14 = -(((net.runelite.api.Player)var11).getId() + 1);
      }

      RSProjectile var15 = SpriteMask.client.newProjectile(var1, var2, var3, var4, var5, var6, var7, var8, var9, var14, var10);
      var15.setDestination(var12, var13, Perspective.getTileHeight(SpriteMask.client, new LocalPoint(var12, var13), SpriteMask.client.getPlane()), var6 + SpriteMask.client.getGameCycle());
      return var15;
   }

   public Deque getProjectiles() {
      return this.getProjectilesDeque();
   }

   public Deque getGraphicsObjects() {
      return this.getGraphicsObjectDeque();
   }

   public void setModIcons(net.runelite.api.IndexedSprite[] var1) {
      this.setRSModIcons((RSIndexedSprite[])var1);
   }

   public LocalPoint getLocalDestinationLocation() {
      int var1 = this.getDestinationX();
      int var2 = this.getDestinationY();
      return var1 != 0 && var2 != 0?LocalPoint.fromScene(var1, var2):null;
   }

   public void changeMemoryMode(boolean var1) {
      this.setLowMemory(var1);
      this.setSceneLowMemory(var1);
      this.setAudioHighMemory(true);
      this.setObjectDefinitionLowDetail(var1);
      if(this.getGameState() == GameState.LOGGED_IN) {
         this.setGameState(GameState.LOADING);
      }

   }

   public boolean isFriended(String var1, boolean var2) {
      RSUsername var3 = this.createName(var1, this.getLoginType());
      return this.getFriendManager().isFriended(var3, var2);
   }

   public FriendContainer getFriendContainer() {
      return this.getFriendManager().getFriendContainer();
   }

   public NameableContainer getIgnoreContainer() {
      return this.getFriendManager().getIgnoreContainer();
   }

   public net.runelite.api.SpritePixels createItemSprite(int var1, int var2, int var3, int var4, int var5, boolean var6, int var7) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("createItemSprite must be called on client thread");
      } else {
         int var8 = this.get3dZoom();
         this.set3dZoom(var7);

         RSSpritePixels var9;
         try {
            var9 = this.createItemSprite(var1, var2, var3, var4, var5, var6);
         } finally {
            this.set3dZoom(var8);
         }

         return var9;
      }
   }

   public boolean hasHintArrow() {
      return SpriteMask.client.getHintArrowTargetType() != 0;
   }

   public void clearHintArrow() {
      SpriteMask.client.setHintArrowTargetType(0);
   }

   public void setHintArrow(net.runelite.api.NPC var1) {
      SpriteMask.client.setHintArrowTargetType(1);
      SpriteMask.client.setHintArrowNpcTargetIdx(var1.getIndex());
   }

   public void setHintArrow(net.runelite.api.Player var1) {
      SpriteMask.client.setHintArrowTargetType(10);
      SpriteMask.client.setHintArrowPlayerTargetIdx(((RSPlayer)var1).getId());
      hintPlayerChanged(-1);
   }

   public void setHintArrow(WorldPoint var1) {
      SpriteMask.client.setHintArrowTargetType(2);
      SpriteMask.client.setHintArrowX(var1.getX());
      SpriteMask.client.setHintArrowY(var1.getY());
      SpriteMask.client.setHintArrowOffsetX(64);
      SpriteMask.client.setHintArrowOffsetY(64);
   }

   public void setHintArrow(LocalPoint var1) {
      SpriteMask.client.setHintArrowTargetType(2);
      SpriteMask.client.setHintArrowX(var1.getX());
      SpriteMask.client.setHintArrowY(var1.getY());
      SpriteMask.client.setHintArrowOffsetX(64);
      SpriteMask.client.setHintArrowOffsetY(64);
   }

   public WorldPoint getHintArrowPoint() {
      if(this.getHintArrowType() == 2) {
         int var1 = SpriteMask.client.getHintArrowX();
         int var2 = SpriteMask.client.getHintArrowY();
         return new WorldPoint(var1, var2, SpriteMask.client.getPlane());
      } else {
         return null;
      }
   }

   public net.runelite.api.Player getHintArrowPlayer() {
      if(this.getHintArrowType() == 10) {
         int var1 = SpriteMask.client.getHintArrowPlayerTargetIdx();
         RSPlayer[] var2 = SpriteMask.client.getCachedPlayers();
         return var1 >= 0 && var1 < var2.length?var2[var1]:null;
      } else {
         return null;
      }
   }

   public net.runelite.api.NPC getHintArrowNpc() {
      if(this.getHintArrowType() == 1) {
         int var1 = SpriteMask.client.getHintArrowNpcTargetIdx();
         RSNPC[] var2 = SpriteMask.client.getCachedNPCs();
         return var1 >= 0 && var1 < var2.length?var2[var1]:null;
      } else {
         return null;
      }
   }

   public void invokeMenuAction(String var1, String var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      this.invokeMenuAction(var1, var2, var3, var4, var5, var6, getItemId(var3, var4, var5, var6, -1), var7, var8);
   }

   public int getTickCount() {
      return tickCount;
   }

   public void setTickCount(int var1) {
      tickCount = var1;
   }

   public EnumSet getWorldType() {
      int var1 = this.getFlags();
      return WorldType.fromMask(var1);
   }

   public RSTileItem getLastItemDespawn() {
      return lastItemDespawn;
   }

   public void setLastItemDespawn(RSTileItem var1) {
      lastItemDespawn = var1;
   }

   public boolean isGpu() {
      return (this.gpuFlags & 1) == 1;
   }

   public void setGpuFlags(int var1) {
      this.gpuFlags = var1;
   }

   public int getGpuFlags() {
      return this.gpuFlags;
   }

   public void queueChangedSkill(Skill var1) {
      int[] var2 = SpriteMask.client.getChangedSkills();
      int var3 = SpriteMask.client.getChangedSkillsCount();
      ++var3;
      var2[var3 - 1 & 31] = var1.ordinal();
      SpriteMask.client.setChangedSkillsCount(var3);
   }

   public void setSkyboxColor(int var1) {
      skyboxColor = var1;
   }

   public int getSkyboxColor() {
      return skyboxColor;
   }

   public net.runelite.api.EnumComposition getEnum(int var1) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("getEnum must be called on client thread");
      } else {
         RSEnumComposition var2 = (RSEnumComposition)this.enumCache.getIfPresent(Integer.valueOf(var1));
         if(var2 != null) {
            return var2;
         } else {
            var2 = this.getRsEnum(var1);
            this.enumCache.put(Integer.valueOf(var1), var2);
            return var2;
         }
      }
   }

   public void resetHealthBarCaches() {
      this.getHealthBarCache().reset();
      this.getHealthBarSpriteCache().reset();
   }

   public void addFriend(String var1) {
      RSFriendSystem var2 = this.getFriendManager();
      var2.addFriend(var1);
   }

   public void removeFriend(String var1) {
      RSFriendSystem var2 = this.getFriendManager();
      var2.removeFriend(var1);
   }

   public void addIgnore(String var1) {
      RSFriendSystem var2 = this.getFriendManager();
      var2.addIgnore(var1);
   }

   public void removeIgnore(String var1, boolean var2) {
      RSFriendSystem var3 = this.getFriendManager();
      var3.removeIgnore(var1, var2);
   }

   public void setModulus(BigInteger var1) {
      modulus = var1;
   }

   public BigInteger getModulus() {
      return modulus;
   }

   public void setInvertPitch(boolean var1) {
      invertPitch = var1;
   }

   public void setInvertYaw(boolean var1) {
      invertYaw = var1;
   }

   public void stopNow() {
      this.setStopTimeMs(1L);
   }

   public boolean isMirrored() {
      return this.isMirrored;
   }

   public void setMirrored(boolean var1) {
      this.isMirrored = var1;
   }

   public boolean isComparingAppearance() {
      return this.comparingAppearance.intValue() > 0;
   }

   public void setComparingAppearance(boolean var1) {
      this.comparingAppearance = Integer.valueOf(this.comparingAppearance.intValue() + (var1?1:-1));
   }

   public net.runelite.api.ObjectComposition getObjectDefinition(int var1) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("getObjectDefinition must be called on client thread");
      } else {
         return this.getRSObjectComposition(var1);
      }
   }

   public net.runelite.api.ItemComposition getItemDefinition(int var1) {
      return this.getItemComposition(var1);
   }

   public net.runelite.api.NPCComposition getNpcDefinition(int var1) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("getNpcDefinition must be called on client thread");
      } else {
         return this.getRSNpcComposition(var1);
      }
   }

   public void playMusicTrack(int var1, RSAbstractArchive var2, int var3, int var4, int var5, boolean var6) {
      Iterator var7 = SpriteMask.client.getMusicSongs().iterator();

      while(var7.hasNext()) {
         RSMusicSong var8 = (RSMusicSong)var7.next();
         if(var8.getMusicTrackGroupId() == var3) {
            SpriteMask.client.setMusicPlayerStatus(1);
            var8.setMusicTrackArchive(var2);
            var8.setMusicTrackGroupId(var3);
            var8.setMusicTrackFileId(var4);
            var8.setMusicTrackVolume(var5);
            var8.setMusicTrackBoolean(var6);
            break;
         }
      }

   }

   public void setOutdatedScript(String var1) {
      if(!this.outdatedScripts.contains(var1)) {
         this.outdatedScripts.add(var1);
      }

   }

   public List getOutdatedScripts() {
      return this.outdatedScripts;
   }

   public void queueChangedVarp(int var1) {
      if(!$assertionsDisabled && !SpriteMask.client.isClientThread()) {
         throw new AssertionError("queueChangedVarp must be called on client thread");
      } else {
         int[] var2 = SpriteMask.client.getChangedVarps();
         int var3 = SpriteMask.client.getChangedVarpCount();
         var2[var3 & 31] = var1;
         SpriteMask.client.setChangedVarpCount(var3 + 1);
      }
   }

   public net.runelite.api.ScriptEvent createScriptEvent(Object... var1) {
      return this.createRSScriptEvent(var1);
   }

   public NodeCache getStructCompositionCache() {
      if(!$assertionsDisabled && !SpriteMask.client.isClientThread()) {
         throw new AssertionError("getStructCompositionCache must be called on client thread");
      } else {
         return this.getRSStructCompositionCache();
      }
   }

   public net.runelite.api.StructComposition getStructComposition(int var1) {
      if(!$assertionsDisabled && !SpriteMask.client.isClientThread()) {
         throw new AssertionError("getStructComposition must be called on client thread");
      } else {
         return this.getRSStructComposition(var1);
      }
   }

   public int getMusicVolume() {
      return SpriteMask.client.getPreferences().getMusicVolume();
   }

   public void setMusicVolume(int var1) {
      if(var1 != SpriteMask.client.getMusicVolume()) {
         musicVolumeDesync = true;
      }

      SpriteMask.client.setRSMusicVolume(var1);
   }

   public net.runelite.api.clan.ClanChannel getClanChannel() {
      return this.getCurrentClanChannels()[0];
   }

   public net.runelite.api.clan.ClanChannel getClanChannel(int var1) {
      RSClanChannel[] var2 = SpriteMask.client.getCurrentClanChannels();
      return var1 >= 0 && var1 < var2.length?var2[var1]:null;
   }

   public net.runelite.api.clan.ClanSettings getClanSettings() {
      return this.getCurrentClanSettingsAry()[0];
   }

   public net.runelite.api.clan.ClanSettings getClanSettings(int var1) {
      RSClanSettings[] var2 = this.getCurrentClanSettingsAry();
      return var1 >= 0 && var1 < var2.length?var2[var1]:null;
   }

   public ClanRank getClanRankFromRs(int var1) {
      switch(var1) {
      case -1:
         return ClanRank.GUEST;
      case 10:
         return ClanRank.CLAN_RANK_2;
      case 20:
         return ClanRank.CLAN_RANK_3;
      case 30:
         return ClanRank.CLAN_RANK_4;
      case 40:
         return ClanRank.CLAN_RANK_5;
      case 50:
         return ClanRank.CLAN_RANK_6;
      case 60:
         return ClanRank.CLAN_RANK_7;
      case 70:
         return ClanRank.CLAN_RANK_8;
      case 80:
         return ClanRank.CLAN_RANK_9;
      case 90:
         return ClanRank.CLAN_RANK_10;
      case 100:
         return ClanRank.ADMINISTRATOR;
      case 105:
         return ClanRank.CLAN_RANK_11;
      case 110:
         return ClanRank.CLAN_RANK_12;
      case 115:
         return ClanRank.CLAN_RANK_13;
      case 120:
         return ClanRank.CLAN_RANK_14;
      case 125:
         return ClanRank.DEPUTY_OWNER;
      case 126:
         return ClanRank.OWNER;
      case 127:
         return ClanRank.JMOD;
      default:
         return ClanRank.CLAN_RANK_1;
      }
   }

   public net.runelite.api.Model loadModel(int var1) {
      return this.loadModel(var1, (short[])null, (short[])null);
   }

   public net.runelite.api.Animation loadAnimation(int var1) {
      return SpriteMask.client.getSequenceDefinition(var1);
   }

   public boolean isUnlockedFps() {
      return unlockedFps;
   }

   public void setUnlockedFps(boolean var1) {
      unlockedFps = var1;
      if(var1) {
         this.posToCameraAngle(SpriteMask.client.getCameraYawTarget(), SpriteMask.client.getCameraPitch());
      } else {
         this.delayNanoTime = 0L;
      }

   }

   public void setUnlockedFpsTarget(int var1) {
      if(var1 <= 0) {
         this.delayNanoTime = 0L;
      } else {
         this.delayNanoTime = 1000000000L / (long)var1;
      }

   }

   public long getUnlockedFpsTarget() {
      return this.delayNanoTime;
   }

   public IndexDataBase getIndex(int var1) {
      return archives[var1];
   }

   public net.runelite.api.widgets.Widget getSelectedWidget() {
      int var1 = SpriteMask.client.getSelectedSpellWidget();
      int var2 = SpriteMask.client.getSelectedSpellChildIndex();
      net.runelite.api.widgets.Widget var3 = SpriteMask.client.getWidget(var1);
      return var3 != null && var2 > -1?var3.getChild(var2):null;
   }

   public int addClientScript(byte[] var1) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("addClientScript must be called on client thread");
      } else {
         int var2 = -1;
         Iterator var3 = OverlayIndex.getOverlays().iterator();

         while(var3.hasNext()) {
            int var4 = ((Integer)var3.next()).intValue();
            if(var4 >> 16 == 12) {
               int var5 = var4 & 65535;
               if(var5 > var2) {
                  var2 = var5;
               }
            }
         }

         if(var2 == -1) {
            var2 = 10000;
         }

         int var6 = var2 + 1;
         OverlayIndex.getOverlays().add(Integer.valueOf(786432 | var6));
         customClientScripts.put(Integer.valueOf(786432 | var6), var1);
         return var6;
      }
   }

   public List getDBRowsByValue(int var1, int var2, int var3, Object var4) {
      RSDbTable var5 = SpriteMask.client.getDbTable(var1 << 12 | var2 << 4);
      Map var6 = (Map)var5.getColumns().get(var3);
      List var7 = (List)var6.get(var4);
      return var7 == null?Collections.emptyList():Collections.unmodifiableList(var7);
   }

   public Object[] getDBTableField(int var1, int var2, int var3) {
      RSDbRowType var4 = SpriteMask.client.getDbRowType(var1);
      RSDbTableType var5 = SpriteMask.client.getDbTableType(var4.getTableId());
      Object[] var6 = var4.getColumnType(var2);
      int[] var7 = var5.getTypes()[var2];
      if(var6 == null) {
         var6 = var5.getDefaultValues()[var2];
      }

      if(var3 >= var7.length) {
         throw new IllegalArgumentException("tuple index too large");
      } else if(var6 == null) {
         return new Object[0];
      } else {
         int var8 = var6.length / var7.length;
         Object[] var9 = new Object[var8];

         for(int var10 = 0; var10 < var8; ++var10) {
            var9[var10] = var6[var3 + var7.length * var10];
         }

         return var9;
      }
   }

   public void setIdleTimeout(int var1) {
      idleTimeout = var1;
      if(idleTimeout > 75000) {
         idleTimeout = 75000;
      } else if(idleTimeout < 15000) {
         idleTimeout = 15000;
      }

   }

   public int getIdleTimeout() {
      return idleTimeout;
   }

   public int getKeyboardIdleTicks() {
      return this.getKeyHandler().getIdleCycles();
   }

   public void setKeyboardIdleTicks(int var1) {
      this.getKeyHandler().setIdleCycles(var1);
   }

   public boolean[] getPressedKeys() {
      return this.getKeyHandler().getPressedKeys();
   }

   public RenderOverview getRenderOverview() {
      return SpriteMask.client.getWorldMap();
   }

   public int getRasterizer3D_clipNegativeMidX() {
      return SpriteMask.client.getClips().getClipNegativeMidX();
   }

   public int getRasterizer3D_clipNegativeMidY() {
      return SpriteMask.client.getClips().getClipNegativeMidY();
   }

   public WidgetNode openInterface(int var1, int var2, int var3) {
      if(!$assertionsDisabled && !this.isClientThread()) {
         throw new AssertionError("openInterface must be called on client thread");
      } else {
         net.runelite.api.widgets.Widget var4 = this.getWidget(var1);
         if(var4 == null) {
            throw new IllegalStateException("component does not exist");
         } else if(var4.getType() != 0) {
            throw new IllegalStateException("component is not a layer");
         } else {
            RSInterfaceParent var5 = (RSInterfaceParent)this.getComponentTable().get((long)var1);
            if(var5 != null) {
               this.closeInterface(var5, var2 != var5.getId());
            }

            Iterator var6 = this.getComponentTable().iterator();

            while(var6.hasNext()) {
               RSInterfaceParent var7 = (RSInterfaceParent)var6.next();
               if(var7.getId() == var2) {
                  throw new IllegalStateException("interface " + var2 + " is already open");
               }
            }

            var5 = this.newInterfaceParent();
            var5.setId(var2);
            var5.setModalMode(var3);
            this.getComponentTable().put(var5, (long)var1);
            this.getWidgetDefinition().loadInterface(var2);
            this.revalidateWidgetScroll(this.getWidgetDefinition().getWidgets()[var1 >> 16], var4, false);
            copy$runWidgetOnLoadListener(var2, -1624666505);
            int var8 = this.getTopLevelInterfaceId();
            if(var8 != -1 && this.getWidgetDefinition().loadInterface(var8)) {
               this.runComponentCloseListeners(this.getWidgetDefinition().getWidgets()[var8], 1);
            }

            return var5;
         }
      }
   }

   public void setExpandedMapLoading(int var1) {
      this.expandedMapLoadingChunks = Ints.constrainToRange(var1, 0, 5);
   }

   public int getExpandedMapLoading() {
      return this.expandedMapLoadingChunks;
   }

   public String getCredentialsProperty(String var1) {
      if(this.credentialsProperties == null) {
         this.credentialsFile = new File(this.runeLiteDir, System.getProperty("runelite.credentials.path", "credentials.properties"));
         this.credentialsProperties = new Properties();
         if(this.insecureWriteCredentials) {
            String[] var2 = new String[]{"JX_ACCESS_TOKEN", "JX_REFRESH_TOKEN", "JX_CHARACTER_ID", "JX_SESSION_ID", "JX_DISPLAY_NAME"};
            int var3 = var2.length;

            for(int var4 = 0; var4 < var3; ++var4) {
               String var5 = var2[var4];
               String var6 = (String)System.getenv().get(var5);
               if(var6 != null) {
                  this.credentialsProperties.setProperty(var5, var6);
               }
            }

            this.storeCredentials = true;
         }

         if(this.credentialsProperties.isEmpty() && this.credentialsFile.exists()) {
            try {
               InputStreamReader var12 = new InputStreamReader(new FileInputStream(this.credentialsFile), StandardCharsets.UTF_8);

               try {
                  this.credentialsProperties.load(var12);
               } catch (Throwable var10) {
                  try {
                     var12.close();
                  } catch (Throwable var9) {
                     var10.addSuppressed(var9);
                  }

                  throw var10;
               }

               var12.close();
            } catch (IOException var11) {
               SpriteMask.client.getLogger().warn("unable to load credentials from disk", var11);
            }

            if(this.credentialsProperties.size() > 0) {
               SpriteMask.client.getLogger().info("read {} credentials from disk", Integer.valueOf(this.credentialsProperties.size()));
            }
         } else if(this.insecureWriteCredentials) {
            SpriteMask.client.getLogger().info("writing {} credentials to disk", Integer.valueOf(this.credentialsProperties.size()));
            this.writeCredentials();
         }
      }

      String var13 = (String)System.getenv().get(var1);
      if(var13 == null) {
         var13 = this.credentialsProperties.getProperty(var1);
         if(var13 != null && "JX_REFRESH_TOKEN".equals(var1)) {
            this.storeCredentials = true;
         }
      }

      return var13;
   }

   public Properties getCredentialsProperties() {
      return this.credentialsProperties;
   }

   public boolean storeCredentials() {
      return this.storeCredentials;
   }

   public void runScript(Object... var1) {
      this.runScriptEvent(this.createRSScriptEvent(var1));
   }

   public void playSoundEffect(int var1) {
      this.playSoundEffect(var1, 0, 0, 0, 0);
   }

   public void playSoundEffect(int var1, int var2, int var3, int var4) {
      this.playSoundEffect(var1, var2, var3, var4, 0);
   }

   public void playSoundEffect(int var1, int var2) {
      if(!$assertionsDisabled && !SpriteMask.client.isClientThread()) {
         throw new AssertionError("playSoundEffect must be called on client thread");
      } else {
         RSSoundEffect var3 = this.getTrack(this.getIndexCache4(), var1, 0);
         if(var3 != null) {
            int var4 = SpriteMask.client.getPreferences().getSoundEffectVolume();
            if(var4 != 0) {
               var2 = var4;
            }

            RSRawSound var5 = var3.toRawAudioNode().applyResampler(this.getSoundEffectResampler());
            RSRawPcmStream var6 = this.createRawPcmStream(var5, 100, var2);
            var6.setNumLoops(1);
            this.getSoundEffectAudioQueue().addSubStream((RSPcmStream)var6);
         }
      }
   }

   public Map getSpriteOverrides() {
      return spriteOverrides;
   }

   public Map getWidgetSpriteOverrides() {
      return widgetSpriteOverrides;
   }

   public void setStretchedEnabled(boolean var1) {
      stretchedEnabled = var1;
   }

   public boolean isStretchedFast() {
      return stretchedFast;
   }

   public void setStretchedFast(boolean var1) {
      stretchedFast = var1;
   }

   public void setStretchedIntegerScaling(boolean var1) {
      stretchedIntegerScaling = var1;
   }

   public void setStretchedKeepAspectRatio(boolean var1) {
      stretchedKeepAspectRatio = var1;
   }

   public void setScalingFactor(int var1) {
      scalingFactor = 1.0D + (double)var1 / 100.0D;
   }

   public double getScalingFactor() {
      return scalingFactor;
   }

   public Dimension getStretchedDimensions() {
      if(cachedStretchedDimensions == null) {
         Container var1 = this.getCanvas().getParent();
         int var2 = var1.getWidth();
         int var3 = var1.getHeight();
         Dimension var4 = this.getRealDimensions();
         if(stretchedKeepAspectRatio) {
            double var5 = var4.getWidth() / var4.getHeight();
            int var7 = (int)((double)var3 * var5);
            if(var7 > var2) {
               var3 = (int)((double)var2 / var5);
            } else {
               var2 = var7;
            }
         }

         if(stretchedIntegerScaling) {
            if(var2 > var4.width) {
               var2 -= var2 % var4.width;
            }

            if(var3 > var4.height) {
               var3 -= var3 % var4.height;
            }
         }

         cachedStretchedDimensions = new Dimension(var2, var3);
      }

      return cachedStretchedDimensions;
   }

   public void invalidateStretching(boolean var1) {
      cachedRealDimensions = null;
      cachedStretchedDimensions = null;
      if(var1 && this.isResized()) {
         this.setResizeCanvasNextFrame(true);
      }

   }

   public int getVar(int var1) {
      return this.getVarbitValue(this.getVarps(), var1);
   }

   public void setVarbit(int var1, int var2) {
      this.setVarbitValue(this.getVarps(), var1, var2);
   }

   public int getVarcIntValue(int var1) {
      Map var2 = this.getVarcMap();
      Object var3 = var2.get(Integer.valueOf(var1));
      return var3 instanceof Integer?((Integer)var3).intValue():0;
   }

   public String getVarcStrValue(int var1) {
      Map var2 = this.getVarcMap();
      Object var3 = var2.get(Integer.valueOf(var1));
      return var3 instanceof String?(String)var3:"";
   }

   public void setVarcIntValue(int var1, int var2) {
      Map var3 = this.getVarcMap();
      var3.put(Integer.valueOf(var1), Integer.valueOf(var2));
   }

   public void setVarcStrValue(int var1, String var2) {
      Map var3 = this.getVarcMap();
      var3.put(Integer.valueOf(var1), var2);
   }

   public net.runelite.api.VarbitComposition getVarbit(int var1) {
      return this.getVarbitComposition(var1);
   }

   public void openWorldHopper() {
      this.invokeMenuAction("World Switcher", "", 1, net.runelite.api.MenuAction.CC_OP.getId(), -1, WidgetInfo.WORLD_SWITCHER_BUTTON.getId());
   }

   public void hopToWorld(net.runelite.api.World var1) {
      int var2 = var1.getId();
      this.invokeMenuAction("Switch", "<col=ff9040>" + (var2 - 300) + "</col>", 1, net.runelite.api.MenuAction.CC_OP.getId(), var2, WidgetInfo.WORLD_SWITCHER_LIST.getId());
   }

   public RSIndexedSprite createIndexedSprite() {
      return new IndexedSprite();
   }

   public RSWorld createWorld() {
      return new World();
   }

   public RSWidget createWidget() {
      return new Widget();
   }

   public RSFloorOverlayDefinition newFloorOverlayDefinition() {
      return new FloorOverlayDefinition();
   }

   public RSTileItem newTileItem() {
      return new TileItem();
   }

   public RSNodeDeque newNodeDeque() {
      return new NodeDeque();
   }

   public RSBuffer newBuffer(byte[] var1) {
      return new Buffer(var1);
   }

   public RSVarbitComposition newVarbitDefinition() {
      return new VarbitComposition();
   }

   public RSIntegerNode newIntegerNode(int var1) {
      return new IntegerNode(var1);
   }

   public RSObjectNode newObjectNode(Object var1) {
      return new ObjectNode(var1);
   }

   public RSIterableNodeHashTable newIterableNodeHashTable(int var1) {
      return new IterableNodeHashTable(var1);
   }

   public RSBuffer createBuffer(byte[] var1) {
      return new Buffer(var1);
   }

   public RSSceneTilePaint createSceneTilePaint(int var1, int var2, int var3, int var4, int var5, int var6, boolean var7) {
      return new SceneTilePaint(var1, var2, var3, var4, var5, var6, var7);
   }

   public RSIterableNodeHashTable createIterableNodeHashTable(int var1) {
      return new IterableNodeHashTable(var1);
   }

   public RSRuneLiteClanMember runeliteClanMember(net.runelite.api.clan.ClanSettings var1, int var2) {
      return new RuneLiteClanMember((ClanSettings)var1, var2);
   }

   public RSProjectile newProjectile(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11) {
      return new Projectile(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11);
   }

   public RSIndexedSprite[] getModIcons() {
      return AbstractFont.AbstractFont_modIconSprites;
   }

   public void setGeSearchResultIndex(int var1) {
      ApproximateRouteStrategy.foundItemIndex = var1;
   }

   public void runScriptLogic(RSScriptEvent var1, RSScript var2, int var3, int var4) {
      ApproximateRouteStrategy.method1246((ScriptEvent)var1, (Script)var2, var3, var4);
   }

   public void addRSChatMessage(int var1, String var2, String var3, String var4) {
      ArchiveLoader.addChatMessage_base(var1, var2, var3, var4);
   }

   public void setGeSearchResultCount(int var1) {
      BuddyRankComparator.foundItemIdCount = var1;
   }

   public RSSpotAnimationDefinition getSpotAnimationDefinition(int var1) {
      return Canvas.method324(var1);
   }

   public void updateItemPile(int var1, int var2) {
      ClanSettings.updateItemPile_base(var1, var2);
   }

   public int getViewportXOffset() {
      return viewportOffsetX;
   }

   public int getViewportYOffset() {
      return viewportOffsetY;
   }

   public RSGrandExchangeOffer[] getGrandExchangeOffers() {
      return grandExchangeOffers;
   }

   public int getViewportWidth() {
      return viewportWidth;
   }

   public int getViewportHeight() {
      return viewportHeight;
   }

   public RSEvictingDualNodeHashTable getArchive11() {
      return archive11;
   }

   public RSEvictingDualNodeHashTable getDbTableIndexCache() {
      return DBTableIndex_cache;
   }

   public int getWorld() {
      return worldId;
   }

   public boolean isLowMemory() {
      return isLowDetail;
   }

   public int getClientType() {
      return clientType;
   }

   public boolean isOnMobile() {
      return onMobile;
   }

   public int getGameCycle() {
      return cycle;
   }

   public long getClientMouseLastPressedMillis() {
      return mouseLastLastPressedTimeMillis;
   }

   public void setClientMouseLastPressedMillis(long var1) {
      mouseLastLastPressedTimeMillis = var1;
   }

   public boolean hadFocus() {
      return hadFocus;
   }

   public void setHintArrowTargetType(int var1) {
      hintArrowType = var1;
   }

   public int getHintArrowTargetType() {
      return hintArrowType;
   }

   public void setHintArrowNpcTargetIdx(int var1) {
      hintArrowNpcIndex = var1;
   }

   public int getHintArrowNpcTargetIdx() {
      return hintArrowNpcIndex;
   }

   public void setHintArrowPlayerTargetIdx(int var1) {
      hintArrowPlayerIndex = var1;
   }

   public int getHintArrowPlayerTargetIdx() {
      return hintArrowPlayerIndex;
   }

   public void setHintArrowX(int var1) {
      hintArrowX = var1;
   }

   public int getHintArrowX() {
      return hintArrowX;
   }

   public void setHintArrowY(int var1) {
      hintArrowY = var1;
   }

   public int getHintArrowY() {
      return hintArrowY;
   }

   public void setHintArrowOffsetX(int var1) {
      hintArrowSubX = var1;
   }

   public void setHintArrowOffsetY(int var1) {
      hintArrowSubY = var1 * -552169536;
   }

   public boolean getRenderSelf() {
      return renderSelf;
   }

   public void setRenderSelf(boolean var1) {
      renderSelf = var1;
   }

   public RSCollisionMap[] getCollisionMaps() {
      return collisionMaps;
   }

   public boolean isInInstancedRegion() {
      return isInInstance;
   }

   public int[][][] getInstanceTemplateChunks() {
      return instanceChunkTemplates;
   }

   public int getGraphicsCycle() {
      return graphicsCycle;
   }

   public int getCameraPitchTarget() {
      return camAngleX;
   }

   public void setCameraPitchTarget(int var1) {
      camAngleX = var1;
   }

   public int getCamAngleDY() {
      return camAngleDY;
   }

   public void setCamAngleDY(int var1) {
      camAngleDY = var1;
   }

   public int getCamAngleDX() {
      return camAngleDX;
   }

   public void setCamAngleDX(int var1) {
      camAngleDX = var1;
   }

   public int getOculusOrbState() {
      return oculusOrbState;
   }

   public void setOculusOrbState(int var1) {
      oculusOrbState = var1;
   }

   public void setOculusOrbNormalSpeed(int var1) {
      oculusOrbNormalSpeed = var1;
   }

   public int[][] getOccupiedTilesTick() {
      return tileLastDrawnActor;
   }

   public int getMouseCrossColor() {
      return mouseCrossColor;
   }

   public void setMouseCrossColor(int var1) {
      mouseCrossColor = var1;
   }

   public void setShowMouseCross(boolean var1) {
      showMouseCross = var1;
   }

   public boolean getShowLoadingMessages() {
      return showLoadingMessages;
   }

   public void setShowLoadingMessages(boolean var1) {
      showLoadingMessages = var1;
   }

   public int getLocalPlayerIndex() {
      return localPlayerIndex;
   }

   public int[] getPlayerMenuTypes() {
      return playerMenuOpcodes;
   }

   public String[] getPlayerOptions() {
      return playerMenuActions;
   }

   public boolean[] getPlayerOptionsPriorities() {
      return playerOptionsPriorities;
   }

   public int getLocalInteractingIndex() {
      return combatTargetPlayerIndex;
   }

   public void setLocalInteractingIndex(int var1) {
      combatTargetPlayerIndex = var1;
   }

   public RSNodeDeque[][][] getGroundItemDeque() {
      return groundItems;
   }

   public boolean getLeftClickOpensMenu() {
      return leftClickOpensMenu;
   }

   public boolean isMenuOpen() {
      return isMenuOpen;
   }

   public void setMenuOpen(boolean var1) {
      isMenuOpen = var1;
   }

   public void setMenuOptionCount(int var1) {
      menuOptionsCount = var1;
   }

   public int[] getMenuArguments1() {
      return menuArguments1;
   }

   public int[] getMenuArguments2() {
      return menuArguments2;
   }

   public int[] getMenuIdentifiers() {
      return menuIdentifiers;
   }

   public int[] getMenuItemIds() {
      return menuItemIds;
   }

   public boolean[] getMenuForceLeftClick() {
      return menuShiftClick;
   }

   public boolean getShowMouseOverText() {
      return showMouseOverText;
   }

   public void setShowMouseOverText(boolean var1) {
      showMouseOverText = var1;
   }

   public int isItemSelected() {
      return isItemSelected;
   }

   public void setSpellSelected(boolean var1) {
      isSpellSelected = var1;
   }

   public boolean getSpellSelected() {
      return isSpellSelected;
   }

   public int getSelectedSpellChildIndex() {
      return selectedSpellChildIndex;
   }

   public void setSelectedSpellChildIndex(int var1) {
      selectedSpellChildIndex = var1;
   }

   public int getSelectedSpellItemId() {
      return selectedSpellItemId;
   }

   public void setSelectedSpellItemId(int var1) {
      selectedSpellItemId = var1;
   }

   public String getSelectedSpellActionName() {
      return selectedSpellActionName;
   }

   public String getSelectedSpellName() {
      return selectedSpellName;
   }

   public void setSelectedSpellName(String var1) {
      selectedSpellName = var1;
   }

   public net.runelite.api.widgets.Widget getMessageContinueWidget() {
      return meslayerContinueWidget;
   }

   public int getEnergy() {
      return runEnergy;
   }

   public int getWeight() {
      return weight;
   }

   public int getStaffModLevel() {
      return staffModLevel;
   }

   public int getFollowerIndex() {
      return followerIndex;
   }

   public RSWidget getDraggedWidget() {
      return clickedWidget;
   }

   public int getWidgetClickX() {
      return widgetClickX;
   }

   public int getWidgetClickY() {
      return widgetClickY;
   }

   public RSWidget getDraggedOnWidget() {
      return draggedOnWidget;
   }

   public void setDraggedOnWidget(net.runelite.api.widgets.Widget var1) {
      draggedOnWidget = (Widget)var1;
   }

   public boolean isDraggingWidget() {
      return isDraggingWidget;
   }

   public int[] getChangedVarps() {
      return changedVarps;
   }

   public int getChangedVarpCount() {
      return changedVarpCount;
   }

   public void setChangedVarpCount(int var1) {
      changedVarpCount = var1;
   }

   public int[] getChangedSkills() {
      return changedSkills;
   }

   public int[] getChangedSkillLevels() {
      return changedSkills;
   }

   public int getChangedSkillsCount() {
      return changedSkillsCount;
   }

   public void setChangedSkillsCount(int var1) {
      changedSkillsCount = var1;
   }

   public RSNodeDeque getScriptEvents() {
      return scriptEvents;
   }

   public RSNodeDeque getScriptEvents2() {
      return scriptEvents2;
   }

   public RSNodeDeque getScriptEvents3() {
      return scriptEvents3;
   }

   public RSNodeHashTable getWidgetFlags() {
      return widgetFlags;
   }

   public int getRootWidgetCount() {
      return rootWidgetCount;
   }

   public boolean[] getValidRootWidgets() {
      return validRootWidgets;
   }

   public int[] getWidgetPositionsX() {
      return rootWidgetXs;
   }

   public int[] getWidgetPositionsY() {
      return rootWidgetYs;
   }

   public int[] getWidgetWidths() {
      return rootWidgetWidths;
   }

   public int[] getWidgetHeights() {
      return rootWidgetHeights;
   }

   public int getPublicChatMode() {
      return publicChatMode;
   }

   public int getTradeChatMode() {
      return tradeChatMode;
   }

   public long[] getCrossWorldMessageIds() {
      return crossWorldMessageIds;
   }

   public int getCrossWorldMessageIdsIndex() {
      return crossWorldMessageIdsIndex;
   }

   public RSSpritePixels[] getMapIcons() {
      return mapIcons;
   }

   public boolean isPlayingJingle() {
      return playingJingle;
   }

   public boolean isCameraLocked() {
      return isCameraLocked;
   }

   public boolean containsAccessAndRefreshToken() {
      return this.containsAccessAndRefreshToken_base();
   }

   public boolean containsSessionAndCharacterId() {
      return this.containsSessionAndCharacterId_base();
   }

   public void revalidateWidget(net.runelite.api.widgets.Widget var1) {
      this.method1536((Widget)var1);
   }

   public RSEvictingDualNodeHashTable getDbRowTypeCache() {
      return DbRowType.DBRowType_cache;
   }

   public RSAbstractArchive getItemDefinition_archive() {
      return DbRowType.ItemDefinition_archive;
   }

   public RSEvictingDualNodeHashTable getDbTableTypeCache() {
      return DbTableType.DBTableType_cache;
   }

   public int getIntStackSize() {
      return DbTableType.Interpreter_intStackSize;
   }

   public void setIntStackSize(int var1) {
      DbTableType.Interpreter_intStackSize = var1;
   }

   public void setRSMusicVolume(int var1) {
      Decimator.setMusicVolume_base(var1);
   }

   public RSSequenceDefinition getSequenceDefinition(int var1) {
      return DynamicObject.method2245(var1);
   }

   public RSEvictingDualNodeHashTable getEnumDefinitionCache() {
      return EnumComposition.EnumDefinition_cached;
   }

   public RSDbTableType getDbTableType(int var1) {
      return FadeOutTask.method7827(var1);
   }

   public RSAbstractArchive getFloorOverlayDefinitionArchive() {
      return FloorOverlayDefinition.FloorOverlayDefinition_archive;
   }

   public RSEvictingDualNodeHashTable getFloorOverlayDefinitionCache() {
      return FloorOverlayDefinition.FloorOverlayDefinition_cached;
   }

   public RSVarpDefinition getVarpDefinition(int var1) {
      return FloorOverlayDefinition.method4037(var1);
   }

   public RSEvictingDualNodeHashTable getFloorUnderlayDefinitionCache() {
      return FloorUnderlayDefinition.FloorUnderlayDefinition_cached;
   }

   public RSParamComposition getRSParamComposition(int var1) {
      return Frames.method5518(var1);
   }

   public int getFPS() {
      return GameEngine.fps;
   }

   public RSArchive getIndexSprites() {
      return GrandExchangeOfferOwnWorldComparator.archive8;
   }

   public void insertMenuItem(String var1, String var2, int var3, int var4, int var5, int var6, int var7, boolean var8) {
      GrandExchangeOfferTotalQuantityComparator.insertMenuItem_base(var1, var2, var3, var4, var5, var6, var7, var8);
   }

   public RSWidget getScriptActiveWidget() {
      return HealthBar.scriptActiveWidget;
   }

   public int rs$getVarbit(int var1) {
      return HealthBar.getVarbit_base(var1);
   }

   public RSScript getScript(int var1) {
      return HealthBarUpdate.method2501(var1);
   }

   public RSEvictingDualNodeHashTable getHitSplatDefinitionCache() {
      return HitSplatDefinition.HitSplatDefinition_cached;
   }

   public RSEvictingDualNodeHashTable getHitSplatDefinitionSpritesCache() {
      return HitSplatDefinition.HitSplatDefinition_cachedSprites;
   }

   public RSEvictingDualNodeHashTable getHitSplatDefinitionFontsCache() {
      return HitSplatDefinition.HitSplatDefinition_cachedFonts;
   }

   public String getCharacterId() {
      return InterfaceParent.characterId;
   }

   public void setCharacterId(String var1) {
      InterfaceParent.characterId = var1;
   }

   public short[][][] getTileOverlays() {
      return Interpreter.Tiles_overlays;
   }

   public int[] getIntStack() {
      return Interpreter.Interpreter_intStack;
   }

   public String[] getStringStack() {
      return Interpreter.Interpreter_stringStack;
   }

   public RSWidget getScriptDotWidget() {
      return Interpreter.scriptDotWidget;
   }

   public RSEvictingDualNodeHashTable getInvDefinitionCache() {
      return InvDefinition.InvDefinition_cached;
   }

   public int getItemCount() {
      return ItemComposition.ItemDefinition_fileCount;
   }

   public RSEvictingDualNodeHashTable getItemCompositionCache() {
      return ItemComposition.ItemDefinition_cached;
   }

   public RSEvictingDualNodeHashTable getItemDefinitionModelsCache() {
      return ItemComposition.ItemDefinition_cachedModels;
   }

   public RSEvictingDualNodeHashTable getItemDefinitionSpritesCache() {
      return ItemComposition.ItemDefinition_cachedSprites;
   }

   public RSClanChannel getGuestClanChannel() {
      return ItemContainer.guestClanChannel;
   }

   public void setCompass(net.runelite.api.SpritePixels var1) {
      ItemLayer.compass = (SpritePixels)var1;
   }

   public RSAbstractArchive getKitDefinition_archive() {
      return KitDefinition.KitDefinition_archive;
   }

   public RSAbstractArchive getKitDefinition_modelsArchive() {
      return KitDefinition.KitDefinition_modelsArchive;
   }

   public RSEvictingDualNodeHashTable getKitDefinitionCache() {
      return KitDefinition.KitDefinition_cached;
   }

   public int[] getMapRegions() {
      return KitDefinition.regions;
   }

   public int getCanvasWidth() {
      return Language.canvasWidth;
   }

   public int getLoginScreenXPadding() {
      return Login.xPadding;
   }

   public void setRightTitleSprite(net.runelite.api.SpritePixels var1) {
      Login.rightTitleSprite = (SpritePixels)var1;
   }

   public int getLoginIndex() {
      return Login.loginIndex;
   }

   public String getUsername() {
      return Login.Login_username;
   }

   public void setUsername(String var1) {
      Login.Login_username = var1;
   }

   public void setPassword(String var1) {
      Login.Login_password = var1;
   }

   public String getDisplayName() {
      return Login.displayName;
   }

   public void setDisplayName(String var1) {
      Login.displayName = var1;
   }

   public int getCurrentLoginField() {
      return Login.currentLoginField;
   }

   public boolean isWorldSelectOpen() {
      return Login.worldSelectOpen;
   }

   public void setWorldSelectOpen(boolean var1) {
      Login.worldSelectOpen = var1;
   }

   public int getOculusOrbFocalPointX() {
      return LoginScreenAnimation.oculusOrbFocalPointX;
   }

   public void setOculusOrbFocalPointX(int var1) {
      LoginScreenAnimation.oculusOrbFocalPointX = var1;
   }

   public RSMouseRecorder getMouseRecorder() {
      return Message.mouseRecorder;
   }

   public Map getChatLineMap() {
      return Messages.Messages_channels;
   }

   public RSIterableNodeHashTable getMessages() {
      return Messages.Messages_hashTable;
   }

   public String getAccessToken() {
      return Messages.accessToken;
   }

   public void setAccessToken(String var1) {
      Messages.accessToken = var1;
   }

   public void setAnimOffsetX(int var1) {
      Model.Model_transformTempX = var1;
   }

   public void setAnimOffsetY(int var1) {
      Model.Model_transformTempY = var1;
   }

   public void setAnimOffsetZ(int var1) {
      Model.Model_transformTempZ = var1;
   }

   public int getMouseIdleTicks() {
      return MouseHandler.MouseHandler_idleCycles;
   }

   public void setMouseIdleTicks(int var1) {
      MouseHandler.MouseHandler_idleCycles = var1;
   }

   public int getMouseCurrentButton() {
      return MouseHandler.MouseHandler_currentButton;
   }

   public int getMouseLastButton() {
      return MouseHandler.MouseHandler_lastButton;
   }

   public int getMouseLastPressedX() {
      return MouseHandler.MouseHandler_lastPressedX;
   }

   public void setMouseLastPressedX(int var1) {
      MouseHandler.MouseHandler_lastPressedX = var1;
   }

   public int getMouseLastPressedY() {
      return MouseHandler.MouseHandler_lastPressedY;
   }

   public void setMouseLastPressedY(int var1) {
      MouseHandler.MouseHandler_lastPressedY = var1;
   }

   public long getMouseLastPressedMillis() {
      return MouseHandler.MouseHandler_lastPressedTimeMillis;
   }

   public void setMouseLastPressedMillis(long var1) {
      MouseHandler.MouseHandler_lastPressedTimeMillis = var1;
   }

   public void setGeSearchResultIds(short[] var1) {
      MusicPatchNode.foundItemIds = var1;
   }

   public RSAbstractArchive getNpcDefinition_archive() {
      return NPCComposition.NpcDefinition_archive;
   }

   public RSEvictingDualNodeHashTable getNpcDefinitionCache() {
      return NPCComposition.NpcDefinition_cached;
   }

   public RSEvictingDualNodeHashTable getNpcDefinitionModelsCache() {
      return NPCComposition.NpcDefinition_cachedModels;
   }

   public void setOtp(String var1) {
      NpcOverrides.otp = var1;
   }

   public int getBaseX() {
      return NpcOverrides.baseX;
   }

   public RSAbstractArchive getObjectDefinition_archive() {
      return ObjectComposition.ObjectDefinition_archive;
   }

   public RSAbstractArchive getObjectDefinition_modelsArchive() {
      return ObjectComposition.ObjectDefinition_modelsArchive;
   }

   public RSEvictingDualNodeHashTable getObjectDefinitionCache() {
      return ObjectComposition.ObjectDefinition_cached;
   }

   public RSEvictingDualNodeHashTable getObjectCompositionCache() {
      return ObjectComposition.ObjectDefinition_cached;
   }

   public RSEvictingDualNodeHashTable getObjectDefinitionModelDataCache() {
      return ObjectComposition.ObjectDefinition_cachedModelData;
   }

   public RSEvictingDualNodeHashTable getObjectDefinitionEntitiesCache() {
      return ObjectComposition.ObjectDefinition_cachedEntities;
   }

   public RSEvictingDualNodeHashTable getObjectDefinitionModelsCache() {
      return ObjectComposition.ObjectDefinition_cachedModels;
   }

   public String getRefreshToken() {
      return ObjectComposition.refreshToken;
   }

   public void setRefreshToken(String var1) {
      ObjectComposition.refreshToken = var1;
   }

   public RSNodeDeque getAmbientSoundEffects() {
      return ObjectSound.objectSounds;
   }

   public RSEvictingDualNodeHashTable getParamDefinitionCache() {
      return ParamComposition.ParamDefinition_cached;
   }

   public RSEvictingDualNodeHashTable getPlayerAppearanceModelsCache() {
      return PlayerComposition.PlayerAppearance_cachedModels;
   }

   public int[] getGraphicsPixels() {
      return Rasterizer2D.Rasterizer2D_pixels;
   }

   public int getGraphicsPixelsWidth() {
      return Rasterizer2D.Rasterizer2D_width;
   }

   public int getGraphicsPixelsHeight() {
      return Rasterizer2D.Rasterizer2D_height;
   }

   public int getStartY() {
      return Rasterizer2D.Rasterizer2D_yClipStart;
   }

   public int getEndY() {
      return Rasterizer2D.Rasterizer2D_yClipEnd;
   }

   public int getStartX() {
      return Rasterizer2D.Rasterizer2D_xClipStart;
   }

   public int getEndX() {
      return Rasterizer2D.Rasterizer2D_xClipEnd;
   }

   public void rasterizerDrawCircle(int var1, int var2, int var3, int var4) {
      Rasterizer2D.drawCircle_base(var1, var2, var3, var4);
   }

   public void rasterizerFillRectangle(int var1, int var2, int var3, int var4, int var5) {
      Rasterizer2D.Rasterizer2D_fillRectangle_base(var1, var2, var3, var4, var5);
   }

   public void rasterizerDrawGradient(int var1, int var2, int var3, int var4, int var5, int var6) {
      Rasterizer2D.Rasterizer2D_fillRectangleGradient_base(var1, var2, var3, var4, var5, var6);
   }

   public void rasterizerDrawRectangle(int var1, int var2, int var3, int var4, int var5) {
      Rasterizer2D.Rasterizer2D_drawRectangle_base(var1, var2, var3, var4, var5);
   }

   public void rasterizerDrawHorizontalLine(int var1, int var2, int var3, int var4) {
      Rasterizer2D.Rasterizer2D_drawHorizontalLine_base(var1, var2, var3, var4);
   }

   public void rasterizerDrawVerticalLine(int var1, int var2, int var3, int var4) {
      Rasterizer2D.Rasterizer2D_drawVerticalLine_base(var1, var2, var3, var4);
   }

   public RSClips getClips() {
      return Rasterizer3D.clips;
   }

   public int getCenterX() {
      return Rasterizer3D.getClipMidX_base();
   }

   public int getCenterY() {
      return Rasterizer3D.getClipMidY_base();
   }

   public int getRasterizer3D_clipMidX2() {
      return Rasterizer3D.Rasterizer3D_clipMidX2_base();
   }

   public int getRasterizer3D_clipMidY2() {
      return Rasterizer3D.Rasterizer3D_clipMidY2_base();
   }

   public int getTileUpdateCount() {
      return Scene.tileUpdateCount;
   }

   public void setTileUpdateCount(int var1) {
      Scene.tileUpdateCount = var1;
   }

   public void setScenePlane(int var1) {
      Scene.Scene_plane = var1;
   }

   public int getScenePlane() {
      return Scene.Scene_plane;
   }

   public int getCycle() {
      return Scene.Scene_drawnCount;
   }

   public void setCycle(int var1) {
      Scene.Scene_drawnCount = var1;
   }

   public void setMinTileX(int var1) {
      Scene.Scene_cameraXTileMin = var1;
   }

   public void setMaxTileX(int var1) {
      Scene.Scene_cameraXTileMax = var1;
   }

   public void setMinTileZ(int var1) {
      Scene.Scene_cameraYTileMin = var1;
   }

   public void setMaxTileZ(int var1) {
      Scene.Scene_cameraYTileMax = var1;
   }

   public void setScreenCenterX(int var1) {
      Scene.Scene_cameraXTile = var1;
   }

   public void setScreenCenterZ(int var1) {
      Scene.Scene_cameraYTile = var1;
   }

   public int getCameraX2() {
      return Scene.Scene_cameraX;
   }

   public void setCameraX2(int var1) {
      Scene.Scene_cameraX = var1;
   }

   public int getCameraY2() {
      return Scene.Scene_cameraY;
   }

   public void setCameraY2(int var1) {
      Scene.Scene_cameraY = var1;
   }

   public int getCameraZ2() {
      return Scene.Scene_cameraZ;
   }

   public void setCameraZ2(int var1) {
      Scene.Scene_cameraZ = var1;
   }

   public void setPitchSin(int var1) {
      Scene.Scene_cameraPitchSine = var1;
   }

   public void setPitchCos(int var1) {
      Scene.Scene_cameraPitchCosine = var1;
   }

   public void setYawSin(int var1) {
      Scene.Scene_cameraYawSine = var1;
   }

   public void setYawCos(int var1) {
      Scene.Scene_cameraYawCosine = var1;
   }

   public void setCheckClick(boolean var1) {
      Scene.checkClick = var1;
   }

   public boolean isCheckClick() {
      return Scene.checkClick;
   }

   public void setMouseCanvasHoverPositionX(int var1) {
      Scene.Scene_selectedScreenX = var1;
   }

   public int getMouseX2() {
      return Scene.Scene_selectedScreenX;
   }

   public void setMouseCanvasHoverPositionY(int var1) {
      Scene.Scene_selectedScreenY = var1;
   }

   public int getMouseY2() {
      return Scene.Scene_selectedScreenY;
   }

   public void setSelectedSceneTileX(int var1) {
      Scene.Scene_selectedX = var1;
   }

   public void setSelectedSceneTileY(int var1) {
      Scene.Scene_selectedY = var1;
   }

   public void setViewportWalking(boolean var1) {
      Scene.viewportWalking = var1;
   }

   public RSNodeDeque getTilesDeque() {
      return Scene.Scene_tilesDeque;
   }

   public boolean[][][][] getVisibilityMaps() {
      return Scene.visibilityMap;
   }

   public void setRenderArea(boolean[][] var1) {
      Scene.visibleTiles = var1;
   }

   public boolean containsBounds(int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      return Scene.containsBounds_base(var1, var2, var3, var4, var5, var6, var7, var8);
   }

   public RSEvictingDualNodeHashTable getScriptCache() {
      return Script.Script_cached;
   }

   public int getOculusOrbFocalPointY() {
      return ScriptFrame.oculusOrbFocalPointY;
   }

   public void setOculusOrbFocalPointY(int var1) {
      ScriptFrame.oculusOrbFocalPointY = var1;
   }

   public int getCameraZ() {
      return SecureRandomFuture.cameraY;
   }

   public RSAbstractArchive getSequenceDefinition_animationsArchive() {
      return SequenceDefinition.SequenceDefinition_animationsArchive;
   }

   public RSAbstractArchive getSequenceDefinition_skeletonsArchive() {
      return SequenceDefinition.SequenceDefinition_skeletonsArchive;
   }

   public RSEvictingDualNodeHashTable getAnimationCache() {
      return SequenceDefinition.SequenceDefinition_cached;
   }

   public RSEvictingDualNodeHashTable getSequenceDefinitionCache() {
      return SequenceDefinition.SequenceDefinition_cached;
   }

   public RSEvictingDualNodeHashTable getSequenceDefinitionFramesCache() {
      return SequenceDefinition.SequenceDefinition_cachedFrames;
   }

   public RSEvictingDualNodeHashTable getSequenceDefinitionModelsCache() {
      return SequenceDefinition.SequenceDefinition_cachedModel;
   }

   public void promptCredentials(boolean var1) {
      SoundSystem.Login_promptCredentials_base(var1);
   }

   public RSAbstractArchive getSpotAnimationDefinition_archive() {
      return SpotAnimationDefinition.SpotAnimationDefinition_archive;
   }

   public RSAbstractArchive getSpotAnimationDefinition_modelArchive() {
      return SpotAnimationDefinition.SpotAnimationDefinition_modelArchive;
   }

   public RSEvictingDualNodeHashTable getSpotAnimationDefinitionCache() {
      return SpotAnimationDefinition.SpotAnimationDefinition_cached;
   }

   public RSEvictingDualNodeHashTable getSpotAnimationDefinitionModelsCache() {
      return SpotAnimationDefinition.SpotAnimationDefinition_cachedModels;
   }

   public void scaleSprite(int[] var1, int[] var2, int var3, int var4, int var5, int var6, int var7, int var8, int var9, int var10, int var11, int var12) {
      SpritePixels.Sprite_drawScaled_base(var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11, var12);
   }

   public int[][][] getTileHeights() {
      return Tiles.Tiles_heights;
   }

   public int getRndHue() {
      return Tiles.rndHue;
   }

   public int getSelectedSpellFlags() {
      return UrlRequest.selectedSpellFlags;
   }

   public void setSelectedSpellFlags(int var1) {
      UrlRequest.selectedSpellFlags = var1;
   }

   public WidgetNode openRSInterface(int var1, int var2, int var3) {
      return UserComparator8.method2954(var1, var2, var3);
   }

   public RSEvictingDualNodeHashTable getVarcIntCache() {
      return VarcInt.VarcInt_cached;
   }

   public int[][] getXteaKeys() {
      return Varcs.xteaKeys;
   }

   public int getCameraPitch() {
      return Varcs.cameraPitch;
   }

   public void setCameraPitch(int var1) {
      Varcs.cameraPitch = var1;
   }

   public RSEvictingDualNodeHashTable getVarpDefinitionCache() {
      return VarpDefinition.VarpDefinition_cached;
   }

   public RSIndexedSprite[] getMapScene() {
      return VarpDefinition.mapSceneSprites;
   }

   public RSSpritePixels[] getCrossSprites() {
      return VarpDefinition.crossSprites;
   }

   public int[] getVarpMasks() {
      return Varps.Varps_masks;
   }

   public boolean getViewportContainsMouse() {
      return ViewportMouse.ViewportMouse_isInViewport;
   }

   public int getViewportMouseX() {
      return ViewportMouse.ViewportMouse_x;
   }

   public int getViewportMouseY() {
      return ViewportMouse.ViewportMouse_y;
   }

   public byte[][][] getTileShapes() {
      return ViewportMouse.Tiles_shapes;
   }

   public int getEntitiesAtMouseCount() {
      return ViewportMouse.ViewportMouse_entityCount;
   }

   public void setEntitiesAtMouseCount(int var1) {
      ViewportMouse.ViewportMouse_entityCount = var1;
   }

   public long[] getEntitiesAtMouse() {
      return ViewportMouse.ViewportMouse_entityTags;
   }

   public int getCameraX() {
      return ViewportMouse.cameraX;
   }

   public RSWorldMap getWorldMap() {
      return WorldMapArchiveLoader.method8711();
   }

   public RSWorldMapElement[] getMapElementConfigs() {
      return WorldMapElement.WorldMapElement_cached;
   }

   public RSClientPreferences getPreferences() {
      return WorldMapIcon_1.clientPreferences;
   }

   public void setRSGameState(int var1) {
      WorldMapSection2.updateGameState_base(var1);
   }

   public int getBaseY() {
      return class101.baseY;
   }

   public RSFrames getFrames(int var1) {
      return class102.method2746(var1);
   }

   public RSSpritePixels[] getMapDots() {
      return class12.mapDotSprites;
   }

   public int getStringStackSize() {
      return class127.Interpreter_stringStackSize;
   }

   public void setStringStackSize(int var1) {
      class127.Interpreter_stringStackSize = var1;
   }

   public RSWorldMapElement getMapElementConfig(int var1) {
      return class141.method3209(var1);
   }

   public RSIterableNodeHashTable readStringIntParameters(RSBuffer var1, RSIterableNodeHashTable var2) {
      return class144.method3229((Buffer)var1, (IterableNodeHashTable)var2);
   }

   public int getRevision() {
      return class145.RunException_revision;
   }

   public int getDragTime() {
      return class148.widgetDragDuration;
   }

   public RSDbTable getDbTable(int var1) {
      return class168.method3513(var1);
   }

   public RSEvictingDualNodeHashTable getField1909() {
      return class171.field1909;
   }

   public RSEvictingDualNodeHashTable getField1913() {
      return class172.field1913;
   }

   public RSEvictingDualNodeHashTable getField1915() {
      return class173.field1915;
   }

   public RSEvictingDualNodeHashTable getArchive7() {
      return class174.archive7;
   }

   public RSMenuAction getTempMenuAction() {
      return class174.tempMenuAction;
   }

   public RSEvictingDualNodeHashTable getArchive5() {
      return class176.archive5;
   }

   public RSEvictingDualNodeHashTable getField2007() {
      return class182.field2007;
   }

   public RSEvictingDualNodeHashTable getField2023() {
      return class184.field2023;
   }

   public RSEvictingDualNodeHashTable getField2026() {
      return class185.field2026;
   }

   public RSEvictingDualNodeHashTable getSpriteMasksCache() {
      return class189.Widget_cachedSpriteMasks;
   }

   public boolean isMouseCam() {
      return class19.mouseCam;
   }

   public RSEvictingDualNodeHashTable getField2100() {
      return class191.field2100;
   }

   public int getCameraYaw() {
      return class192.cameraYaw;
   }

   public RSEvictingDualNodeHashTable getField2136() {
      return class195.field2136;
   }

   public RSEvictingDualNodeHashTable getArchive4() {
      return class197.archive4;
   }

   public RSFriendsChat getFriendsChatManager() {
      return class20.friendsChat;
   }

   public RSPlayer getLocalPlayer() {
      return class229.localPlayer;
   }

   public void setLeftTitleSprite(net.runelite.api.SpritePixels var1) {
      class250.leftTitleSprite = (SpritePixels)var1;
   }

   public void changeWorld(net.runelite.api.World var1) {
      class28.method449((World)var1);
   }

   public RSTextureProvider getTextureProvider() {
      return class292.textureProvider;
   }

   public ArrayList getMusicSongs() {
      return class316.musicSongs;
   }

   public void setMusicPlayerStatus(int var1) {
      class316.musicPlayerStatus = var1;
   }

   public RSArchive getIndexConfig() {
      return class344.archive2;
   }

   public int getSelectedSpellWidget() {
      return class348.selectedSpellWidget;
   }

   public void setSelectedSpellWidget(int var1) {
      class348.selectedSpellWidget = var1;
   }

   public int getCameraY() {
      return class36.cameraZ;
   }

   public RSWorld[] getWorldList() {
      return class361.World_worlds;
   }

   public void setWorldList(RSWorld[] var1) {
      class361.World_worlds = (World[])var1;
   }

   public RSAbstractArchive getSequenceDefinition_archive() {
      return class369.SequenceDefinition_archive;
   }

   public String getSessionId() {
      return class369.sessionId;
   }

   public void setSessionId(String var1) {
      class369.sessionId = var1;
   }

   public void clearLoginScreen(boolean var1) {
      class384.clearLoginScreen = var1;
   }

   public void sendMenuAction(int var1, int var2, int var3, int var4, int var5, String var6, String var7, int var8, int var9) {
      class407.menuAction_base(var1, var2, var3, var4, var5, var6, var7, var8, var9);
   }

   public void queueSoundEffect(int var1, int var2, int var3) {
      class460.queueSoundEffect_base(var1, var2, var3);
   }

   public RSDbRowType getDbRowType(int var1) {
      return class469.method8563(var1);
   }

   public int getCanvasHeight() {
      return class47.canvasHeight;
   }

   public RSArchive getIndexScripts() {
      return class47.archive12;
   }

   public RSClanSettings getGuestClanSettings() {
      return class478.guestClanSettings;
   }

   public RSArchive getMusicTracks() {
      return class514.archive6;
   }

   public short[][][] getTileUnderlays() {
      return class74.Tiles_underlays;
   }

   public int getScale() {
      return viewportZoom;
   }

   public void setScale(int var1) {
      viewportZoom = var1;
   }

   public int getMapAngle() {
      return camAngleY;
   }

   public int getCameraYawTarget() {
      return camAngleY;
   }

   public void setCameraYawTarget(int var1) {
      camAngleY = var1;
   }

   @ObfuscatedName("ao")
   @ObfuscatedSignature(
      descriptor = "(Luo;B)I",
      garbageValue = "80"
   )
   static int method1394(PacketBuffer var0) {
      int var1 = var0.readBits_base(2);
      int var2;
      if(var1 == 0) {
         var2 = 0;
      } else if(var1 == 1) {
         var2 = var0.readBits_base(5);
      } else if(var1 == 2) {
         var2 = var0.readBits_base(8);
      } else {
         var2 = var0.readBits_base(11);
      }

      return var2;
   }

   @ObfuscatedName("ap")
   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "743374996"
   )
   public static void method1848_base() {
      HitSplatDefinition.HitSplatDefinition_cached.clear_base();
      HitSplatDefinition.HitSplatDefinition_cachedSprites.clear_base();
      HitSplatDefinition.HitSplatDefinition_cachedFonts.clear_base();
   }

   @ObfuscatedName("mj")
   @ObfuscatedSignature(
      descriptor = "(III)V",
      garbageValue = "2100775885"
   )
   static void method1847_base(int var0, int var1) {
      class59.method1177(class174.tempMenuAction, var0, var1);
      class174.tempMenuAction = null;
      onTempMenuActionChanged(-1);
   }

   public static RSRuneLiteMenuEntry newBareRuneliteMenuEntry() {
      return new RuneLiteMenuEntry();
   }

   @ObfuscatedSignature(
      descriptor = "(Ldo;Ldt;IIB)V",
      garbageValue = "113"
   )
   public static void copy$runScriptLogic(ScriptEvent var0, Script var1, int var2, int var3, byte var4) {
      Object[] var5 = var0.args;
      DbTableType.Interpreter_intStackSize = 0;
      class127.Interpreter_stringStackSize = 0;
      currentScriptPC = -1;
      int var6 = -1;
      int[] var7 = var1.opcodes;
      int[] var8 = var1.intOperands;
      byte var9 = -1;
      Interpreter.Interpreter_frameDepth = 0;
      Interpreter.field846 = false;
      boolean var10 = false;
      int var11 = 0;
      boolean var30 = false;

      label943: {
         label944: {
            try {
               int var14;
               try {
                  var30 = true;
                  Interpreter.Interpreter_intLocals = new int[var1.localIntCount];
                  int var12 = 0;
                  class60.Interpreter_stringLocals = new String[var1.localStringCount];
                  int var13 = 0;

                  int var15;
                  String var21;
                  for(var14 = 1; var14 < var5.length; ++var14) {
                     if(var5[var14] instanceof Integer) {
                        var15 = ((Integer)var5[var14]).intValue();
                        if(var15 == -2147483647) {
                           var15 = var0.mouseX;
                        }

                        if(var15 == -2147483646) {
                           var15 = var0.mouseY;
                        }

                        if(var15 == -2147483645) {
                           var15 = var0.widget != null?var0.widget.id:-1;
                        }

                        if(var15 == -2147483644) {
                           var15 = var0.opIndex;
                        }

                        if(var15 == -2147483643) {
                           var15 = var0.widget != null?var0.widget.childIndex:-1;
                        }

                        if(var15 == -2147483642) {
                           var15 = var0.dragTarget != null?var0.dragTarget.id:-1;
                        }

                        if(var15 == -2147483641) {
                           var15 = var0.dragTarget != null?var0.dragTarget.childIndex:-1;
                        }

                        if(var15 == -2147483640) {
                           var15 = var0.keyTyped;
                        }

                        if(var15 == -2147483639) {
                           var15 = var0.keyPressed;
                        }

                        Interpreter.Interpreter_intLocals[var12++] = var15;
                     } else if(var5[var14] instanceof String) {
                        var21 = (String)var5[var14];
                        if(var21.equals("event_opbase")) {
                           var21 = var0.targetName;
                        }

                        class60.Interpreter_stringLocals[var13++] = var21;
                     }
                  }

                  Interpreter.field849 = var0.field1063;

                  while(true) {
                     ++var11;
                     if(var11 > var2) {
                        throw new RuntimeException();
                     }

                     int var33;
                     do {
                        ++var6;
                        currentScriptPC = var6;
                        var33 = var7[var6];
                     } while(vmExecuteOpcode(var33));

                     if(var33 >= 100) {
                        boolean var35;
                        if(var1.intOperands[var6] == 1) {
                           var35 = true;
                        } else {
                           var35 = false;
                        }

                        var15 = class149.method3270(var33, var1, var35);
                        switch(var15) {
                        case 0:
                           var30 = false;
                           break label944;
                        case 1:
                        default:
                           break;
                        case 2:
                           throw new IllegalStateException();
                        }
                     } else if(var33 == 0) {
                        Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var8[var6];
                     } else if(var33 == 1) {
                        var14 = var8[var6];
                        Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = Varps.Varps_main[var14];
                     } else if(var33 == 2) {
                        var14 = var8[var6];
                        Varps.Varps_main[var14] = Interpreter.Interpreter_intStack[--DbTableType.Interpreter_intStackSize];
                        settingsChanged(var14);
                        Projectile.changeGameOptions_base(var14);
                     } else if(var33 == 3) {
                        Interpreter.Interpreter_stringStack[++class127.Interpreter_stringStackSize - 1] = var1.stringOperands[var6];
                     } else {
                        int var10000;
                        int var10001;
                        if(var33 == 6) {
                           var10001 = var8[var6];
                           var10000 = var6 + var8[var6];
                           currentScriptPC = var6 + var10001;
                           var6 = var10000;
                        } else if(var33 == 7) {
                           DbTableType.Interpreter_intStackSize -= 2;
                           if(Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize] != Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize + 1]) {
                              var10001 = var8[var6];
                              var10000 = var6 + var8[var6];
                              currentScriptPC = var6 + var10001;
                              var6 = var10000;
                           }
                        } else if(var33 == 8) {
                           DbTableType.Interpreter_intStackSize -= 2;
                           if(Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize] == Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize + 1]) {
                              var10001 = var8[var6];
                              var10000 = var6 + var8[var6];
                              currentScriptPC = var6 + var10001;
                              var6 = var10000;
                           }
                        } else if(var33 == 9) {
                           DbTableType.Interpreter_intStackSize -= 2;
                           if(Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize] < Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize + 1]) {
                              var10001 = var8[var6];
                              var10000 = var6 + var8[var6];
                              currentScriptPC = var6 + var10001;
                              var6 = var10000;
                           }
                        } else if(var33 == 10) {
                           DbTableType.Interpreter_intStackSize -= 2;
                           if(Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize] > Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize + 1]) {
                              var10001 = var8[var6];
                              var10000 = var6 + var8[var6];
                              currentScriptPC = var6 + var10001;
                              var6 = var10000;
                           }
                        } else if(var33 == 21) {
                           if(Interpreter.Interpreter_frameDepth == 0) {
                              var30 = false;
                              break label943;
                           }

                           ScriptFrame var40 = Interpreter.Interpreter_frames[--Interpreter.Interpreter_frameDepth];
                           Script var42 = var40.script;
                           setCurrentScript(var40.script);
                           var1 = var42;
                           var7 = var1.opcodes;
                           var8 = var1.intOperands;
                           var6 = currentScriptPC = var40.pc;
                           Interpreter.Interpreter_intLocals = var40.intLocals;
                           class60.Interpreter_stringLocals = var40.stringLocals;
                        } else if(var33 == 25) {
                           var14 = var8[var6];
                           Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = HealthBar.getVarbit_base(var14);
                        } else if(var33 == 27) {
                           var14 = var8[var6];
                           class306.method5910_base(var14, Interpreter.Interpreter_intStack[--DbTableType.Interpreter_intStackSize]);
                        } else if(var33 == 31) {
                           DbTableType.Interpreter_intStackSize -= 2;
                           if(Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize] <= Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize + 1]) {
                              var10001 = var8[var6];
                              var10000 = var6 + var8[var6];
                              currentScriptPC = var6 + var10001;
                              var6 = var10000;
                           }
                        } else if(var33 == 32) {
                           DbTableType.Interpreter_intStackSize -= 2;
                           if(Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize] >= Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize + 1]) {
                              var10001 = var8[var6];
                              var10000 = var6 + var8[var6];
                              currentScriptPC = var6 + var10001;
                              var6 = var10000;
                           }
                        } else if(var33 == 33) {
                           Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = Interpreter.Interpreter_intLocals[var8[var6]];
                        } else if(var33 == 34) {
                           Interpreter.Interpreter_intLocals[var8[var6]] = Interpreter.Interpreter_intStack[--DbTableType.Interpreter_intStackSize];
                        } else if(var33 == 35) {
                           Interpreter.Interpreter_stringStack[++class127.Interpreter_stringStackSize - 1] = class60.Interpreter_stringLocals[var8[var6]];
                        } else if(var33 == 36) {
                           class60.Interpreter_stringLocals[var8[var6]] = Interpreter.Interpreter_stringStack[--class127.Interpreter_stringStackSize];
                        } else if(var33 == 37) {
                           var14 = var8[var6];
                           class127.Interpreter_stringStackSize -= var14;
                           var21 = BoundaryObject.method5819_base(Interpreter.Interpreter_stringStack, class127.Interpreter_stringStackSize, var14);
                           Interpreter.Interpreter_stringStack[++class127.Interpreter_stringStackSize - 1] = var21;
                        } else if(var33 == 38) {
                           --DbTableType.Interpreter_intStackSize;
                        } else if(var33 == 39) {
                           --class127.Interpreter_stringStackSize;
                        } else {
                           int var18;
                           if(var33 != 40) {
                              if(var33 == 42) {
                                 Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = class176.varcs.getInt_base(var8[var6]);
                              } else if(var33 == 43) {
                                 class176.varcs.setInt_base(var8[var6], Interpreter.Interpreter_intStack[--DbTableType.Interpreter_intStackSize]);
                              } else if(var33 == 44) {
                                 var14 = var8[var6] >> 16;
                                 var15 = var8[var6] & 65535;
                                 int var24 = Interpreter.Interpreter_intStack[--DbTableType.Interpreter_intStackSize];
                                 if(var24 < 0 || var24 > 5000) {
                                    throw new RuntimeException();
                                 }

                                 Interpreter.Interpreter_arrayLengths[var14] = var24;
                                 byte var25 = -1;
                                 if(var15 == 105) {
                                    var25 = 0;
                                 }

                                 for(var18 = 0; var18 < var24; ++var18) {
                                    Interpreter.Interpreter_arrays[var14][var18] = var25;
                                 }
                              } else if(var33 == 45) {
                                 var14 = var8[var6];
                                 var15 = Interpreter.Interpreter_intStack[--DbTableType.Interpreter_intStackSize];
                                 if(var15 < 0 || var15 >= Interpreter.Interpreter_arrayLengths[var14]) {
                                    throw new RuntimeException();
                                 }

                                 Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = Interpreter.Interpreter_arrays[var14][var15];
                              } else if(var33 == 46) {
                                 var14 = var8[var6];
                                 DbTableType.Interpreter_intStackSize -= 2;
                                 var15 = Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize];
                                 if(var15 < 0 || var15 >= Interpreter.Interpreter_arrayLengths[var14]) {
                                    throw new RuntimeException();
                                 }

                                 Interpreter.Interpreter_arrays[var14][var15] = Interpreter.Interpreter_intStack[DbTableType.Interpreter_intStackSize + 1];
                              } else {
                                 String var22;
                                 if(var33 == 47) {
                                    var22 = class176.varcs.getStringOld_base(var8[var6]);
                                    if(var22 == null) {
                                       var22 = "null";
                                    }

                                    Interpreter.Interpreter_stringStack[++class127.Interpreter_stringStackSize - 1] = var22;
                                 } else if(var33 == 48) {
                                    class176.varcs.setStringOld_base(var8[var6], Interpreter.Interpreter_stringStack[--class127.Interpreter_stringStackSize]);
                                 } else if(var33 == 49) {
                                    var22 = class176.varcs.getString_base(var8[var6]);
                                    Interpreter.Interpreter_stringStack[++class127.Interpreter_stringStackSize - 1] = var22;
                                 } else if(var33 == 50) {
                                    class176.varcs.setString_base(var8[var6], Interpreter.Interpreter_stringStack[--class127.Interpreter_stringStackSize]);
                                 } else if(var33 == 60) {
                                    IterableNodeHashTable var38 = var1.switches[var8[var6]];
                                    IntegerNode var37 = (IntegerNode)var38.get((long)Interpreter.Interpreter_intStack[--DbTableType.Interpreter_intStackSize]);
                                    if(var37 != null) {
                                       var6 = currentScriptPC = var6 + var37.integer;
                                    }
                                 } else {
                                    Integer var39;
                                    if(var33 == 74) {
                                       var39 = Timer.field4599.getTitleGroupValue_base(var8[var6]);
                                       if(var39 == null) {
                                          Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = -1;
                                       } else {
                                          Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var39.intValue();
                                       }
                                    } else {
                                       if(var33 != 76) {
                                          throw new IllegalStateException();
                                       }

                                       var39 = Integer.valueOf(field677.method8529_base(var8[var6]));
                                       if(var39 == null) {
                                          Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = -1;
                                       } else {
                                          Interpreter.Interpreter_intStack[++DbTableType.Interpreter_intStackSize - 1] = var39.intValue();
                                       }
                                    }
                                 }
                              }
                           } else {
                              var14 = var8[var6];
                              Script var36 = HealthBarUpdate.method2501(var14);
                              int[] var16 = new int[var36.localIntCount];
                              String[] var17 = new String[var36.localStringCount];

                              for(var18 = 0; var18 < var36.intArgumentCount; ++var18) {
                                 var16[var18] = Interpreter.Interpreter_intStack[var18 + (DbTableType.Interpreter_intStackSize - var36.intArgumentCount)];
                              }

                              for(var18 = 0; var18 < var36.stringArgumentCount; ++var18) {
                                 var17[var18] = Interpreter.Interpreter_stringStack[var18 + (class127.Interpreter_stringStackSize - var36.stringArgumentCount)];
                              }

                              DbTableType.Interpreter_intStackSize -= var36.intArgumentCount;
                              class127.Interpreter_stringStackSize -= var36.stringArgumentCount;
                              ScriptFrame var23 = new ScriptFrame();
                              var23.script = var1;
                              var23.pc = var6;
                              var23.intLocals = Interpreter.Interpreter_intLocals;
                              var23.stringLocals = class60.Interpreter_stringLocals;
                              Interpreter.Interpreter_frames[++Interpreter.Interpreter_frameDepth - 1] = var23;
                              setCurrentScript(var36);
                              var1 = var36;
                              var7 = var36.opcodes;
                              var8 = var36.intOperands;
                              currentScriptPC = -1;
                              var6 = -1;
                              Interpreter.Interpreter_intLocals = var16;
                              class60.Interpreter_stringLocals = var17;
                           }
                        }
                     }
                  }
               } catch (Exception var31) {
                  var10 = true;
                  StringBuilder var27 = new StringBuilder(30);
                  var27.append("").append(var1.key).append(" ");
                  var14 = Interpreter.Interpreter_frameDepth - 1;

                  while(true) {
                     if(var14 < 0) {
                        var27.append("").append(var9);
                        GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base(var27.toString(), var31);
                        var30 = false;
                        break;
                     }

                     var27.append("").append(Interpreter.Interpreter_frames[var14].script.key).append(" ");
                     --var14;
                  }
               }
            } finally {
               if(var30) {
                  while(Interpreter.field847.size() > 0) {
                     class102 var20 = (class102)Interpreter.field847.remove(0);
                     FloorOverlayDefinition.widgetDefaultMenuAction_base(var20.method2734_base(), var20.method2730_base(), var20.method2731_base(), var20.method2732_base(), "");
                  }

                  if(Interpreter.field846) {
                     Interpreter.field846 = false;
                     class520.method9190_base();
                  }

                  if(!var10 && var3 > 0 && var11 >= var3) {
                     GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base("Warning: Script " + var1.field974 + " finished at op count " + var11 + " of max " + var2, (Throwable)null);
                  }

               }
            }

            while(Interpreter.field847.size() > 0) {
               class102 var26 = (class102)Interpreter.field847.remove(0);
               FloorOverlayDefinition.widgetDefaultMenuAction_base(var26.method2734_base(), var26.method2730_base(), var26.method2731_base(), var26.method2732_base(), "");
            }

            if(Interpreter.field846) {
               Interpreter.field846 = false;
               class520.method9190_base();
            }

            if(!var10 && var3 > 0 && var11 >= var3) {
               GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base("Warning: Script " + var1.field974 + " finished at op count " + var11 + " of max " + var2, (Throwable)null);
            }

            return;
         }

         while(Interpreter.field847.size() > 0) {
            class102 var34 = (class102)Interpreter.field847.remove(0);
            FloorOverlayDefinition.widgetDefaultMenuAction_base(var34.method2734_base(), var34.method2730_base(), var34.method2731_base(), var34.method2732_base(), "");
         }

         if(Interpreter.field846) {
            Interpreter.field846 = false;
            class520.method9190_base();
         }

         if(!var10 && var3 > 0 && var11 >= var3) {
            GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base("Warning: Script " + var1.field974 + " finished at op count " + var11 + " of max " + var2, (Throwable)null);
         }

         return;
      }

      while(Interpreter.field847.size() > 0) {
         class102 var41 = (class102)Interpreter.field847.remove(0);
         FloorOverlayDefinition.widgetDefaultMenuAction_base(var41.method2734_base(), var41.method2730_base(), var41.method2731_base(), var41.method2732_base(), "");
      }

      if(Interpreter.field846) {
         Interpreter.field846 = false;
         class520.method9190_base();
      }

      if(!var10 && var3 > 0 && var11 >= var3) {
         GrandExchangeOfferWorldComparator.RunException_sendStackTrace_base("Warning: Script " + var1.field974 + " finished at op count " + var11 + " of max " + var2, (Throwable)null);
      }

   }

   @ObfuscatedSignature(
      descriptor = "(IS)Lhy;",
      garbageValue = "196"
   )
   public static StructComposition copy$StructDefinition_getStructDefinition(int var0, short var1) {
      StructComposition var2 = (StructComposition)StructComposition.StructDefinition_cached.get((long)var0);
      if(var2 != null) {
         return var2;
      } else {
         byte[] var3 = StructComposition.StructDefinition_archive.takeFile_base(34, var0);
         var2 = new StructComposition();
         if(var3 != null) {
            var2.method3850(new Buffer(var3));
         }

         var2.postDecode_base();
         StructComposition.StructDefinition_cached.put(var2, (long)var0);
         return var2;
      }
   }

   public static int getItemId(int var0, int var1, int var2, int var3, int var4) {
      switch(var1) {
      case 25:
      case 31:
      case 32:
      case 33:
      case 34:
      case 35:
      case 36:
      case 37:
      case 38:
      case 39:
      case 40:
      case 41:
      case 42:
      case 43:
      case 58:
      case 1005:
         var4 = getItemId(var2, var3, var4);
         break;
      case 57:
      case 1007:
         if(var0 >= 1 && var0 <= 10) {
            var4 = getItemId(var2, var3, var4);
         }
         break;
      case 1006:
         var4 = 0;
      }

      return var4;
   }

   public static int getItemId(int var0, int var1, int var2) {
      net.runelite.api.widgets.Widget var3 = SpriteMask.client.getWidget(var1);
      if(var3 != null) {
         int var4 = var1 >>> 16;
         net.runelite.api.widgets.Widget[] var5 = var3.getChildren();
         if(var5 != null && var5.length >= 2 && var4 == 387) {
            var0 = 1;
         }

         net.runelite.api.widgets.Widget var6 = var3.getChild(var0);
         if(var6 != null && var2 != var6.getItemId()) {
            return var6.getItemId();
         }
      }

      return var2;
   }

   public static void preCloseInterface(RSInterfaceParent var0, boolean var1) {
      SpriteMask.client.getCallbacks().post(new WidgetClosed(var0.getId(), var0.getModalMode(), var1));
      if(var1) {
         int var2 = var0.getId();
         unloadInterface(var2, SpriteMask.client.getScriptEvents());
         unloadInterface(var2, SpriteMask.client.getScriptEvents3());
         unloadInterface(var2, SpriteMask.client.getScriptEvents2());
      }

   }

   @ObfuscatedSignature(
      descriptor = "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V",
      garbageValue = "2035865306"
   )
   public static void copy$addChatMessage(int var0, String var1, String var2, String var3, int var4) {
      ChatChannel var5 = (ChatChannel)Messages.Messages_channels.get(Integer.valueOf(var0));
      if(var5 == null) {
         var5 = new ChatChannel();
         Messages.Messages_channels.put(Integer.valueOf(var0), var5);
      }

      Message var6 = var5.method2247(var0, var1, var2, var3);
      Messages.Messages_hashTable.put(var6, (long)var6.count);
      Messages.Messages_queue.method7382(var6);
      chatCycle = cycleCntr;
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "0"
   )
   public static void setLeftTitleSprite(int var0) {
      net.runelite.api.SpritePixels var1 = loginScreenBackground;
      if(var1 != null) {
         SpriteMask.client.setLeftTitleSprite(var1);
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "0"
   )
   public static void setRightTitleSprite(int var0) {
      net.runelite.api.SpritePixels var1 = loginScreenBackground;
      if(var1 != null && var1.getWidth() > 383) {
         SpriteMask.client.setRightTitleSprite(SpriteMask.client.createSpritePixels(new int[]{var1.getPixels()[383]}, 1, 1));
      }

   }

   public static double diffToDangle(int var0, long var1) {
      double var3 = (double)var0 * 0.0030679615757712823D;
      double var5 = (double)var1 / 2.0E7D;
      return var3 * var5;
   }

   public static void check(String var0, RSEvictingDualNodeHashTable var1) {
      boolean var2 = var1.isTrashing();
      var1.setThreshold(var1.getThreshold() * 0.92F + (var2?0.07999998F:0.0F));
      if(var2) {
         if(var1.getThreshold() > 0.2F) {
            SpriteMask.client.getLogger().trace("cache {} is thrashing", var0);
         }

         if(var1.getThreshold() > 0.9F && var1.getCapacity() < var1.getTmpCapacity() * 8) {
            var1.increaseCapacity(var1.getCapacity() * 2);
            SpriteMask.client.getLogger().info("cache {} thrashing, enlarging to {} entries", var0, Integer.valueOf(var1.getCapacity()));
         }
      }

      var1.getDeque().add(var1.getDualNode());
   }

   public static void syncMusicVolume() {
      if(musicVolumeDesync && SpriteMask.client.getGameState() == GameState.LOGGED_IN) {
         musicVolumeDesync = false;
         net.runelite.api.widgets.Widget var0 = SpriteMask.client.getWidget(WidgetInfo.SETTINGS_SIDE_MUSIC_SLIDER_STEP_HOLDER);
         if(var0 != null && var0.getChildren() != null && var0.getChildren().length > 0) {
            int var1 = var0.getChildren().length;
            int var2 = Ints.constrainToRange((SpriteMask.client.getMusicVolume() * var1 + 255) / 256, 0, var1 - 1);
            net.runelite.api.widgets.Widget var3 = var0.getChild(var2);
            if(var3 != null) {
               Object[] var4 = var3.getOnOpListener();

               try {
                  var3.setOnOpListener((Object[])null);
                  copy$menuAction(var2, var0.getId(), net.runelite.api.MenuAction.CC_OP.getId(), 1, -1, "", "", -1, -1, (byte)34);
               } finally {
                  var3.setOnOpListener(var4);
               }
            }
         }
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void clanMemberManagerChanged(int var0) {
      SpriteMask.client.getCallbacks().post(new FriendsChatChanged(SpriteMask.client.getFriendsChatManager() != null));
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onIdleCyclesChanged(int var0) {
      if(SpriteMask.client.getMouseIdleTicks() > 0) {
         long var1 = System.nanoTime() - lastActivityNanos;
         idleCycles = (int)(var1 / 20000000L);
      } else {
         idleCycles = 0;
         lastActivityNanos = System.nanoTime();
      }

      SpriteMask.client.setMouseIdleTicks(idleCycles * 15000 / idleTimeout);
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void hintPlayerChanged(int var0) {
      if(SpriteMask.client.getVar(VarPlayer.ATTACKING_PLAYER) == -1) {
         SpriteMask.client.setLocalInteractingIndex(SpriteMask.client.getHintArrowPlayerTargetIdx() & 2047);
      }

   }

   public static void checkResize() {
      check("EnumDefinition_cached", SpriteMask.client.getEnumDefinitionCache());
      check("SpotAnimationDefinition_cached", SpriteMask.client.getSpotAnimationDefinitionCache());
      check("SpotAnimationDefinition_cachedModels", SpriteMask.client.getSpotAnimationDefinitionModelsCache());
      check("SequenceDefinition_cached", SpriteMask.client.getSequenceDefinitionCache());
      check("SequenceDefinition_cachedFrames", SpriteMask.client.getSequenceDefinitionFramesCache());
      check("SequenceDefinition_cachedModel", SpriteMask.client.getSequenceDefinitionModelsCache());
      check("DBRowType_cache", SpriteMask.client.getDbRowTypeCache());
      check("DBTableType_cache", SpriteMask.client.getDbTableTypeCache());
      check("DBTableIndex_cache", SpriteMask.client.getDbTableIndexCache());
      check("field1909", SpriteMask.client.getField1909());
      check("field1913", SpriteMask.client.getField1913());
      check("field1915", SpriteMask.client.getField1915());
      check("archive7", SpriteMask.client.getArchive7());
      check("archive5", SpriteMask.client.getArchive5());
      check("field2007", SpriteMask.client.getField2007());
      check("field2023", SpriteMask.client.getField2023());
      check("field2026", SpriteMask.client.getField2026());
      check("field2100", SpriteMask.client.getField2100());
      check("field2136", SpriteMask.client.getField2136());
      check("archive4", SpriteMask.client.getArchive4());
      check("archive11", SpriteMask.client.getArchive11());
      check("HealthBarDefinition_cached", SpriteMask.client.getHealthBarCache());
      check("HealthBarDefinition_cachedSprites", SpriteMask.client.getHealthBarSpriteCache());
      check("HitSplatDefinition_cached", SpriteMask.client.getHitSplatDefinitionCache());
      check("HitSplatDefinition_cachedSprites", SpriteMask.client.getHitSplatDefinitionSpritesCache());
      check("HitSplatDefinition_cachedFonts", SpriteMask.client.getHitSplatDefinitionFontsCache());
      check("Widget_cachedSpriteMasks", SpriteMask.client.getSpriteMasksCache());
      check("KitDefinition_cached", SpriteMask.client.getKitDefinitionCache());
      check("InvDefinition_cached", SpriteMask.client.getInvDefinitionCache());
      check("ItemDefinition_cached", SpriteMask.client.getItemCompositionCache());
      check("ItemDefinition_cachedModels", SpriteMask.client.getItemDefinitionModelsCache());
      check("ItemDefinition_cachedSprites", SpriteMask.client.getItemDefinitionSpritesCache());
      check("NpcDefinition_cached", SpriteMask.client.getNpcDefinitionCache());
      check("NpcDefinition_cachedModels", SpriteMask.client.getNpcDefinitionModelsCache());
      check("ObjectDefinition_cached", SpriteMask.client.getObjectDefinitionCache());
      check("ObjectDefinition_cachedModelData", SpriteMask.client.getObjectDefinitionModelDataCache());
      check("ObjectDefinition_cachedEntities", SpriteMask.client.getObjectDefinitionEntitiesCache());
      check("ObjectDefinition_cachedModels", SpriteMask.client.getObjectDefinitionModelsCache());
      check("ParamDefinition_cached", SpriteMask.client.getParamDefinitionCache());
      check("PlayerAppearance_cachedModels", SpriteMask.client.getPlayerAppearanceModelsCache());
      check("Script_cached", SpriteMask.client.getScriptCache());
      check("StructDefinition_cached", SpriteMask.client.getRSStructCompositionCache());
      check("VarbitDefinition_cached", SpriteMask.client.getVarbitCache());
      check("VarcInt_cached", SpriteMask.client.getVarcIntCache());
      check("VarpDefinition_cached", SpriteMask.client.getVarpDefinitionCache());
      check("FloorUnderlayDefinition_cached", SpriteMask.client.getFloorUnderlayDefinitionCache());
      check("FloorOverlayDefinition_cached", SpriteMask.client.getFloorOverlayDefinitionCache());
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void canvasWidthChanged(int var0) {
      SpriteMask.client.getCallbacks().post(CanvasSizeChanged.INSTANCE);
   }

   @ObfuscatedSignature(
      descriptor = "(Ldo;III)V",
      garbageValue = "1668364198"
   )
   public static void copy$runScript(ScriptEvent var0, int var1, int var2, int var3) {
      Object[] var4 = var0.args;
      Script var10000;
      Script var5;
      if(class7.isWorldMapEvent_base(var0.type)) {
         class133.worldMapEvent = (WorldMapEvent)var4[0];
         WorldMapElement var6 = class141.method3209(class133.worldMapEvent.mapElement);
         var10000 = ModeWhere.method7204(var0.type, var6.objectId, var6.category);
         setCurrentScript(var10000);
         var5 = var10000;
      } else {
         int var7 = ((Integer)var4[0]).intValue();
         var10000 = HealthBarUpdate.method2501(var7);
         setCurrentScript(var10000);
         var5 = var10000;
      }

      if(var5 != null) {
         ApproximateRouteStrategy.method1246(var0, var5, var1, var2);
      }

   }

   public static void sortMenuEntries(int var0, int var1) {
      String var2 = SpriteMask.client.getMenuOptions()[var0];
      SpriteMask.client.getMenuOptions()[var0] = SpriteMask.client.getMenuOptions()[var1];
      SpriteMask.client.getMenuOptions()[var1] = var2;
      String var3 = SpriteMask.client.getMenuTargets()[var0];
      SpriteMask.client.getMenuTargets()[var0] = SpriteMask.client.getMenuTargets()[var1];
      SpriteMask.client.getMenuTargets()[var1] = var3;
      int var4 = SpriteMask.client.getMenuIdentifiers()[var0];
      SpriteMask.client.getMenuIdentifiers()[var0] = SpriteMask.client.getMenuIdentifiers()[var1];
      SpriteMask.client.getMenuIdentifiers()[var1] = var4;
      int var5 = SpriteMask.client.getMenuOpcodes()[var0];
      SpriteMask.client.getMenuOpcodes()[var0] = SpriteMask.client.getMenuOpcodes()[var1];
      SpriteMask.client.getMenuOpcodes()[var1] = var5;
      int var6 = SpriteMask.client.getMenuArguments1()[var0];
      SpriteMask.client.getMenuArguments1()[var0] = SpriteMask.client.getMenuArguments1()[var1];
      SpriteMask.client.getMenuArguments1()[var1] = var6;
      int var7 = SpriteMask.client.getMenuArguments2()[var0];
      SpriteMask.client.getMenuArguments2()[var0] = SpriteMask.client.getMenuArguments2()[var1];
      SpriteMask.client.getMenuArguments2()[var1] = var7;
      int var8 = SpriteMask.client.getMenuItemIds()[var0];
      SpriteMask.client.getMenuItemIds()[var0] = SpriteMask.client.getMenuItemIds()[var1];
      SpriteMask.client.getMenuItemIds()[var1] = var8;
      boolean var9 = SpriteMask.client.getMenuForceLeftClick()[var0];
      SpriteMask.client.getMenuForceLeftClick()[var0] = SpriteMask.client.getMenuForceLeftClick()[var1];
      SpriteMask.client.getMenuForceLeftClick()[var1] = var9;
      RSRuneLiteMenuEntry var10 = rl$menuEntries[var0];
      rl$menuEntries[var0] = rl$menuEntries[var1];
      rl$menuEntries[var1] = var10;
      rl$menuEntries[var0].setIdx(var0);
      rl$menuEntries[var1].setIdx(var1);
   }

   public static void setCurrentScript(RSScript var0) {
      if(rootScriptEvent != null) {
         if(var0 != null) {
            ScriptPreFired var1 = new ScriptPreFired((int)var0.getHash());
            var1.setScriptEvent(rootScriptEvent);
            SpriteMask.client.getCallbacks().post(var1);
         }

         rootScriptEvent = null;
      }

      currentScript = var0;
   }

   public static void unloadInterface(int var0, RSNodeDeque var1) {
      for(RSScriptEvent var2 = (RSScriptEvent)var1.last(); var2 != null; var2 = (RSScriptEvent)var1.previous()) {
         RSWidget var3 = (RSWidget)var2.getSource();
         int var4 = WidgetUtil.componentToInterface(var3.getId());
         if(var0 == var4) {
            var2.unlink();
         }
      }

   }

   @ObfuscatedSignature(
      descriptor = "(Lol;IIB)Luz;",
      garbageValue = "-123"
   )
   public static SpritePixels copy$SpriteBuffer_getSprite(AbstractArchive var0, int var1, int var2, byte var3) {
      byte[] var5 = var0.takeFile_base(var1, var2);
      boolean var4;
      if(var5 == null) {
         var4 = false;
      } else {
         class162.SpriteBuffer_decode_base(var5);
         var4 = true;
      }

      return !var4?null:WorldMapCacheName.method5004();
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void canvasHeightChanged(int var0) {
      SpriteMask.client.getCallbacks().post(CanvasSizeChanged.INSTANCE);
   }

   public static void loadVarbits() {
      if(varbitsMap == null) {
         varbitsMap = new HashMap();
         RSArchive var0 = SpriteMask.client.getIndexConfig();
         int[] var1 = var0.getFileIds(14);

         for(int var2 = 0; var2 < var1.length; ++var2) {
            net.runelite.api.VarbitComposition var3 = SpriteMask.client.getVarbit(var2);
            if(var3 != null) {
               int var4 = var3.getIndex();
               if(varbitsMap.containsKey(Integer.valueOf(var4))) {
                  ((ArrayList)varbitsMap.get(Integer.valueOf(var4))).add(Integer.valueOf(var2));
               } else {
                  ArrayList var5 = new ArrayList();
                  var5.add(Integer.valueOf(var2));
                  varbitsMap.put(Integer.valueOf(var4), var5);
               }
            }
         }
      }

   }

   public static void drawTitleHook(RSFont var0, RSFont var1, RSFont var2) {
      if(SpriteMask.client.isWorldSelectOpen()) {
         Arrays.fill(SpriteMask.client.getBufferProvider().getPixels(), 0);
      }

   }

   public static void copy$Rasterizer2D_fillRectangleGradientAlpha(int var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7) {
      if(var2 > 0 && var3 > 0) {
         int var8 = 0;
         int var9 = 65536 / var3;
         if(var0 < Rasterizer2D.Rasterizer2D_xClipStart) {
            var2 -= Rasterizer2D.Rasterizer2D_xClipStart - var0;
            var0 = Rasterizer2D.Rasterizer2D_xClipStart;
         }

         if(var1 < Rasterizer2D.Rasterizer2D_yClipStart) {
            var8 += (Rasterizer2D.Rasterizer2D_yClipStart - var1) * var9;
            var3 -= Rasterizer2D.Rasterizer2D_yClipStart - var1;
            var1 = Rasterizer2D.Rasterizer2D_yClipStart;
         }

         if(var0 + var2 > Rasterizer2D.Rasterizer2D_xClipEnd) {
            var2 = Rasterizer2D.Rasterizer2D_xClipEnd - var0;
         }

         if(var3 + var1 > Rasterizer2D.Rasterizer2D_yClipEnd) {
            var3 = Rasterizer2D.Rasterizer2D_yClipEnd - var1;
         }

         int var10 = Rasterizer2D.Rasterizer2D_width - var2;
         int var11 = Rasterizer2D.Rasterizer2D_width * var1 + var0;

         for(int var12 = -var3; var12 < 0; ++var12) {
            int var13 = 65536 - var8 >> 8;
            int var14 = var8 >> 8;
            int var15 = (var13 * var6 + var14 * var7 & 65280) >>> 8;
            if(var15 == 0) {
               var11 += Rasterizer2D.Rasterizer2D_width;
               var8 += var9;
            } else {
               int var16 = (var13 * (var4 & 65280) + var14 * (var5 & 65280) & 16711680) + (var13 * (var4 & 16711935) + var14 * (var5 & 16711935) & -16711936) >>> 8;
               int var17 = 255 - var15;
               int var18 = ((var16 & 16711935) * var15 >> 8 & 16711935) + (var15 * (var16 & 65280) >> 8 & 65280);

               for(int var19 = -var2; var19 < 0; ++var19) {
                  int var20 = Rasterizer2D.Rasterizer2D_pixels[var11];
                  if(var20 == 0) {
                     Rasterizer2D.Rasterizer2D_pixels[var11++] = var18 | -16777216;
                  } else {
                     var20 = ((var20 & 16711935) * var17 >> 8 & 16711935) + (var17 * (var20 & 65280) >> 8 & 65280);
                     Rasterizer2D.Rasterizer2D_pixels[var11++] = var18 + var20 | -16777216;
                  }
               }

               var11 += var10;
               var8 += var9;
            }
         }

      }
   }

   public static RSRuneLiteMenuEntry newRuneliteMenuEntry(int var0) {
      return new RuneLiteMenuEntry(var0);
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onMenuOptionsChanged(int var0) {
      int var1 = tmpMenuOptionsCount;
      int var2 = SpriteMask.client.getMenuOptionCount();
      tmpMenuOptionsCount = var2;
      if(var2 < var1) {
         for(int var3 = var2; var3 < var1; ++var3) {
            RSRuneLiteMenuEntry var4 = rl$menuEntries[var3];
            if(var4 == null) {
               rl$logger.error("about to crash: opcnt:{} tmpopcnt:{} i:{}", new Object[]{Integer.valueOf(var2), Integer.valueOf(var1), Integer.valueOf(var3)});
            }

            rl$menuEntries[var3].setConsumer((Consumer)null);
         }
      } else if(var2 == var1 + 1) {
         if(SpriteMask.client.getMenuOptions()[var1] == null) {
            SpriteMask.client.getMenuOptions()[var1] = "null";
         }

         if(SpriteMask.client.getMenuTargets()[var1] == null) {
            SpriteMask.client.getMenuTargets()[var1] = "null";
         }

         if(rl$menuEntries[var1] == null) {
            rl$menuEntries[var1] = newRuneliteMenuEntry(var1);
         } else {
            rl$menuEntries[var1].setConsumer((Consumer)null);
         }

         MenuEntryAdded var5 = new MenuEntryAdded(rl$menuEntries[var1]);
         SpriteMask.client.getCallbacks().post(var5);
         if(var5.isModified() && SpriteMask.client.getMenuOptionCount() == var2) {
            SpriteMask.client.getMenuOptions()[var1] = var5.getOption();
            SpriteMask.client.getMenuTargets()[var1] = var5.getTarget();
            SpriteMask.client.getMenuIdentifiers()[var1] = var5.getIdentifier();
            SpriteMask.client.getMenuOpcodes()[var1] = var5.getType();
            SpriteMask.client.getMenuArguments1()[var1] = var5.getActionParam0();
            SpriteMask.client.getMenuArguments2()[var1] = var5.getActionParam1();
            SpriteMask.client.getMenuForceLeftClick()[var1] = var5.isForceLeftClick();
            SpriteMask.client.getMenuItemIds()[var1] = var5.getItemId();
         }
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void resizeChanged(int var0) {
      boolean var1 = SpriteMask.client.isResized();
      if(var1 != oldIsResized) {
         ResizeableChanged var2 = new ResizeableChanged();
         var2.setResized(var1);
         SpriteMask.client.getCallbacks().post(var2);
         oldIsResized = var1;
      }

   }

   @ObfuscatedSignature(
      descriptor = "(IIIIII[BIZ)V",
      garbageValue = "1"
   )
   public static void copy$Rasterizer2D_drawGradientPixels(int var0, int var1, int var2, int var3, int var4, int var5, byte[] var6, int var7, boolean var8) {
      if(var0 + var2 >= 0 && var3 + var1 >= 0) {
         if(var0 < Rasterizer2D.Rasterizer2D_width && var1 < Rasterizer2D.Rasterizer2D_height) {
            int var9 = 0;
            int var10 = 0;
            if(var0 < 0) {
               var9 -= var0;
               var2 += var0;
            }

            if(var1 < 0) {
               var10 -= var1;
               var3 += var1;
            }

            if(var0 + var2 > Rasterizer2D.Rasterizer2D_width) {
               var2 = Rasterizer2D.Rasterizer2D_width - var0;
            }

            if(var3 + var1 > Rasterizer2D.Rasterizer2D_height) {
               var3 = Rasterizer2D.Rasterizer2D_height - var1;
            }

            int var11 = var6.length / var7;
            int var12 = Rasterizer2D.Rasterizer2D_width - var2;
            int var13 = var4 >>> 24;
            int var14 = var5 >>> 24;
            int var15;
            int var16;
            int var17;
            int var18;
            int var19;
            if(var13 == 255 && var14 == 255) {
               var15 = var0 + var9 + (var10 + var1) * Rasterizer2D.Rasterizer2D_width;

               for(var16 = var10 + var1; var16 < var3 + var10 + var1; ++var16) {
                  for(var17 = var0 + var9; var17 < var0 + var9 + var2; ++var17) {
                     var18 = (var16 - var1) % var11;
                     var19 = (var17 - var0) % var7;
                     if(var6[var19 + var18 * var7] != 0) {
                        Rasterizer2D.Rasterizer2D_pixels[var15++] = var5 | -16777216;
                     } else {
                        Rasterizer2D.Rasterizer2D_pixels[var15++] = var4 | -16777216;
                     }
                  }

                  var15 += var12;
               }
            } else {
               var15 = var0 + var9 + (var10 + var1) * Rasterizer2D.Rasterizer2D_width;

               for(var16 = var10 + var1; var16 < var3 + var10 + var1; ++var16) {
                  for(var17 = var0 + var9; var17 < var0 + var9 + var2; ++var17) {
                     var18 = (var16 - var1) % var11;
                     var19 = (var17 - var0) % var7;
                     int var20 = var4;
                     if(var6[var19 + var18 * var7] != 0) {
                        var20 = var5;
                     }

                     int var21 = var20 >>> 24;
                     int var22 = 255 - var21;
                     int var23 = Rasterizer2D.Rasterizer2D_pixels[var15];
                     int var24 = (var21 * (var20 & 65280) + var22 * (var23 & 65280) & 16711680) + ((var20 & 16711935) * var21 + (var23 & 16711935) * var22 & -16711936) >> 8;
                     Rasterizer2D.Rasterizer2D_pixels[var15++] = var24 | -16777216;
                  }

                  var15 += var12;
               }
            }

         }
      }
   }

   public static int rl$rot1(int var0, int var1, int var2, int var3) {
      return var0 * var2 + var3 * var1 >> 16;
   }

   public static int toCameraPos(double var0) {
      return (int)(var0 / 0.0030679615757712823D) & 2047;
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void queuedSoundEffectCountChanged(int var0) {
      int var1 = SpriteMask.client.getQueuedSoundEffectCount();
      if(var1 == lastSoundEffectCount + 1) {
         int var2 = var1 - 1;
         int var3 = SpriteMask.client.getSoundLocations()[var2];
         boolean var4;
         if(var3 == 0) {
            SoundEffectPlayed var5 = new SoundEffectPlayed(lastSoundEffectSourceActor);
            var5.setSoundId(SpriteMask.client.getQueuedSoundEffectIDs()[var2]);
            var5.setDelay(SpriteMask.client.getQueuedSoundEffectDelays()[var2]);
            SpriteMask.client.getCallbacks().post(var5);
            var4 = var5.isConsumed();
         } else {
            int var9 = var3 >> 16 & 255;
            int var6 = var3 >> 8 & 255;
            int var7 = var3 & 255;
            AreaSoundEffectPlayed var8 = new AreaSoundEffectPlayed(lastSoundEffectSourceActor);
            var8.setSoundId(SpriteMask.client.getQueuedSoundEffectIDs()[var2]);
            var8.setSceneX(var9);
            var8.setSceneY(var6);
            var8.setRange(var7);
            var8.setDelay(SpriteMask.client.getQueuedSoundEffectDelays()[var2]);
            SpriteMask.client.getCallbacks().post(var8);
            var4 = var8.isConsumed();
         }

         if(var4) {
            --var1;
            SpriteMask.client.setQueuedSoundEffectCount(var1);
         }
      }

      lastSoundEffectCount = var1;
   }

   public static boolean vmExecuteOpcode(int var0) {
      int var4;
      switch(var0) {
      case 21:
         SpriteMask.client.getCallbacks().post(new ScriptPostFired((int)currentScript.getHash()));
         return false;
      case 40:
         var4 = currentScript.getIntOperands()[currentScriptPC];
         SpriteMask.client.getCallbacks().post(new ScriptPreFired(var4));
         return false;
      case 5504:
         int[] var13 = SpriteMask.client.getIntStack();
         int var11 = SpriteMask.client.getIntStackSize();
         int var7 = var13[var11 - 1];
         int var8 = var13[var11 - 2];
         if(!SpriteMask.client.isCameraLocked()) {
            SpriteMask.client.posToCameraAngle(var7, var8);
         }

         return false;
      case 6599:
         if(!$assertionsDisabled && currentScript.getInstructions()[currentScriptPC] != 6599) {
            throw new AssertionError();
         } else {
            int var1 = SpriteMask.client.getStringStackSize();
            String[] var10000 = SpriteMask.client.getStringStack();
            --var1;
            String var2 = var10000[var1];
            SpriteMask.client.setStringStackSize(var1);
            int var3;
            if("debug".equals(var2)) {
               var3 = SpriteMask.client.getIntStackSize();
               var10000 = SpriteMask.client.getStringStack();
               --var1;
               String var9 = var10000[var1];
               StringBuffer var12 = new StringBuffer();
               Matcher var6 = Pattern.compile("%(.)").matcher(var9);

               while(var6.find()) {
                  var6.appendReplacement(var12, "");
                  switch(var6.group(1).charAt(0)) {
                  case 'd':
                  case 'i':
                     int[] var15 = SpriteMask.client.getIntStack();
                     --var3;
                     var12.append(var15[var3]);
                     break;
                  case 's':
                     String[] var10001 = SpriteMask.client.getStringStack();
                     --var1;
                     var12.append(var10001[var1]);
                     break;
                  default:
                     var12.append(var6.group(0)).append("=unknown");
                  }
               }

               var6.appendTail(var12);
               SpriteMask.client.getLogger().debug(var12.toString());
               SpriteMask.client.setStringStackSize(var1);
               SpriteMask.client.setIntStackSize(var3);
               return true;
            } else {
               if("mes".equals(var2)) {
                  var3 = SpriteMask.client.getIntStackSize();
                  int[] var14 = SpriteMask.client.getIntStack();
                  --var3;
                  var4 = var14[var3];
                  var10000 = SpriteMask.client.getStringStack();
                  --var1;
                  String var5 = var10000[var1];
                  SpriteMask.client.setStringStackSize(var1);
                  SpriteMask.client.setIntStackSize(var3);
                  SpriteMask.client.addChatMessage(ChatMessageType.of(var4), "", var5, (String)null, true);
                  return true;
               }

               ScriptCallbackEvent var10 = new ScriptCallbackEvent();
               var10.setScript(currentScript);
               var10.setEventName(var2);
               SpriteMask.client.getCallbacks().post(var10);
               return true;
            }
         }
      default:
         return false;
      }
   }

   public static void preRenderWidgetLayer(net.runelite.api.widgets.Widget[] var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      net.runelite.api.widgets.Widget[] var9 = var0;
      int var10 = var0.length;

      for(int var11 = 0; var11 < var10; ++var11) {
         net.runelite.api.widgets.Widget var12 = var9[var11];
         RSWidget var13 = (RSWidget)var12;
         if(var13 != null && var13.getRSParentId() == var1 && !var13.isSelfHidden()) {
            int var14 = var6 + var13.getRelativeX();
            int var15 = var7 + var13.getRelativeY();
            var13.setRenderX(var14);
            var13.setRenderY(var15);
            if(var13.getType() == 3 && var14 == SpriteMask.client.getViewportXOffset() && var15 == SpriteMask.client.getViewportYOffset() && var13.getWidth() == SpriteMask.client.getViewportWidth() && var13.getHeight() == SpriteMask.client.getViewportHeight() && var13.getOpacity() > 0 && var13.isFilled() && var13.getFillMode().getOrdinal() == 0 && SpriteMask.client.isGpu()) {
               int var16 = var13.getTextColor();
               int var17 = var13.getOpacity() & 255;
               int var18 = 256 - var17;
               int var19 = viewportColor;
               int var20 = ((var16 & 16711935) * var18 >> 8 & 16711935) + (var18 * (var16 & 65280) >> 8 & 65280);
               int var21 = ((var19 & 16711935) * var17 >> 8 & 16711935) + (var17 * (var19 & 65280) >> 8 & 65280);
               int var22 = var18 + ((255 - var18) * (var19 >>> 24) * 32897 >>> 23);
               viewportColor = var22 << 24 | var20 + var21;
               var13.setHidden(true);
               hiddenWidgets.add(var13);
            }
         }
      }

   }

   @ObfuscatedSignature(
      descriptor = "(IIIIILjava/lang/String;Ljava/lang/String;IIB)V",
      garbageValue = "34"
   )
   public static final void copy$menuAction(int var0, int var1, int var2, int var3, int var4, String var5, String var6, int var7, int var8, byte var9) {
      if(var2 >= 2000) {
         var2 -= 2000;
      }

      PacketBufferNode var10;
      if(var2 == 1004) {
         mouseCrossX = var7;
         mouseCrossY = var8;
         mouseCrossColor = 2;
         mouseCrossState = 0;
         var10 = class113.method2919(ClientPacket.OPOBJE, packetWriter.isaacCipher);
         var10.packetBuffer.writeShortLE_base(var3);
         var10.packetBuffer.writeShort_base(class101.baseY + var1);
         var10.packetBuffer.writeShort_base(var0 + NpcOverrides.baseX);
         packetWriter.method2867(var10);
      }

      if(var2 == 26) {
         class520.method9190_base();
      }

      if(var2 == 22) {
         mouseCrossX = var7;
         mouseCrossY = var8;
         mouseCrossColor = 2;
         mouseCrossState = 0;
         destinationX = var0;
         destinationY = var1;
         var10 = class113.method2919(ClientPacket.OPOBJ5, packetWriter.isaacCipher);
         var10.packetBuffer.writeShortAdd_base(class101.baseY + var1);
         var10.packetBuffer.writeShortAdd_base(var3);
         var10.packetBuffer.writeShortAdd_base(var0 + NpcOverrides.baseX);
         var10.packetBuffer.writeByteSub_base(field724.method4316_base(82)?1:0);
         packetWriter.method2867(var10);
      }

      Widget var19;
      if(var2 == 25) {
         var19 = HealthBarDefinition.widgetDefinition.method6281(var1, var0);
         if(var19 != null) {
            class53.method1111_base();
            FadeOutTask.method7830_base(var1, var0, WorldMapData_0.Widget_unpackTargetMask_base(class361.method6871(var19)), var4);
            isItemSelected = 0;
            selectedSpellActionName = class89.method2377(var19);
            if(selectedSpellActionName == null) {
               selectedSpellActionName = "null";
            }

            if(var19.isIf3) {
               selectedSpellName = var19.dataText + class167.colorStartTag_base(16777215);
            } else {
               selectedSpellName = class167.colorStartTag_base(65280) + var19.spellName + class167.colorStartTag_base(16777215);
            }
         }

      } else {
         if(var2 == 6) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPLOC4, packetWriter.isaacCipher);
            var10.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShortAdd_base(class101.baseY + var1);
            var10.packetBuffer.writeShort_base(var3);
            var10.packetBuffer.writeShortLE_base(var0 + NpcOverrides.baseX);
            packetWriter.method2867(var10);
         }

         PacketBufferNode var11;
         NPC var15;
         if(var2 == 11) {
            var15 = npcs[var3];
            if(var15 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPNPC3, packetWriter.isaacCipher);
               var11.packetBuffer.writeShortAdd_base(var3);
               var11.packetBuffer.writeByteSub_base(field724.method4316_base(82)?1:0);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 12) {
            var15 = npcs[var3];
            if(var15 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPNPC4, packetWriter.isaacCipher);
               var11.packetBuffer.writeByteNeg_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShort_base(var3);
               packetWriter.method2867(var11);
            }
         }

         Player var16;
         if(var2 == 48) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYER5, packetWriter.isaacCipher);
               var11.packetBuffer.writeShortAdd_base(var3);
               var11.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 3) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPLOC1, packetWriter.isaacCipher);
            var10.packetBuffer.writeByte_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShortAddLE_base(class101.baseY + var1);
            var10.packetBuffer.writeShort_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeShortLE_base(var3);
            packetWriter.method2867(var10);
         }

         if(var2 == 17) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPOBJT, packetWriter.isaacCipher);
            var10.packetBuffer.writeShortAddLE_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShortLE_base(class101.baseY + var1);
            var10.packetBuffer.writeIntME_base(class348.selectedSpellWidget);
            var10.packetBuffer.writeShort_base(selectedSpellChildIndex);
            var10.packetBuffer.writeShort_base(selectedSpellItemId);
            var10.packetBuffer.writeShortLE_base(var3);
            packetWriter.method2867(var10);
         }

         if(var2 == 20) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPOBJ3, packetWriter.isaacCipher);
            var10.packetBuffer.writeShortLE_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeShort_base(class101.baseY + var1);
            var10.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShort_base(var3);
            packetWriter.method2867(var10);
         }

         if(var2 == 51) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYER8, packetWriter.isaacCipher);
               var11.packetBuffer.writeByte_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShortAddLE_base(var3);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 30 && meslayerContinueWidget == null) {
            class10.resumePauseWidget_base(var1, var0);
            meslayerContinueWidget = HealthBarDefinition.widgetDefinition.method6281(var1, var0);
            class159.method3423(meslayerContinueWidget);
         }

         if(var2 == 21) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPOBJ4, packetWriter.isaacCipher);
            var10.packetBuffer.writeShortAdd_base(class101.baseY + var1);
            var10.packetBuffer.writeShort_base(var3);
            var10.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShortAdd_base(var0 + NpcOverrides.baseX);
            packetWriter.method2867(var10);
         }

         if(var2 == 50) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYER7, packetWriter.isaacCipher);
               var11.packetBuffer.writeShortAddLE_base(var3);
               var11.packetBuffer.writeByteSub_base(field724.method4316_base(82)?1:0);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 57 || var2 == 1007) {
            var19 = HealthBarDefinition.widgetDefinition.method6281(var1, var0);
            if(var19 != null) {
               FloorOverlayDefinition.widgetDefaultMenuAction_base(var3, var1, var0, var4, var6);
            }
         }

         int var12;
         Widget var17;
         if(var2 == 28) {
            var10 = class113.method2919(ClientPacket.IF_BUTTON, packetWriter.isaacCipher);
            var10.packetBuffer.writeInt_base(var1);
            packetWriter.method2867(var10);
            var17 = HealthBarDefinition.widgetDefinition.method6287(var1);
            if(var17 != null && var17.cs1Instructions != null && var17.cs1Instructions[0][0] == 5) {
               var12 = var17.cs1Instructions[0][1];
               Varps.Varps_main[var12] = 1 - Varps.Varps_main[var12];
               settingsChanged(var12);
               Projectile.changeGameOptions_base(var12);
            }
         }

         PacketBufferNode var14;
         if(var2 == 24) {
            var19 = HealthBarDefinition.widgetDefinition.method6287(var1);
            if(var19 != null) {
               boolean var13 = true;
               if(var19.contentType > 0) {
                  var13 = class101.method2724(var19);
               }

               if(var13) {
                  var14 = class113.method2919(ClientPacket.IF_BUTTON, packetWriter.isaacCipher);
                  var14.packetBuffer.writeInt_base(var1);
                  packetWriter.method2867(var14);
               }
            }
         }

         if(var2 == 47) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYER4, packetWriter.isaacCipher);
               var11.packetBuffer.writeByteSub_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShortAdd_base(var3);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 2) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPLOCT, packetWriter.isaacCipher);
            var10.packetBuffer.writeShortLE_base(var3);
            var10.packetBuffer.writeShortAdd_base(selectedSpellItemId);
            var10.packetBuffer.writeShort_base(selectedSpellChildIndex);
            var10.packetBuffer.writeShortAddLE_base(class101.baseY + var1);
            var10.packetBuffer.writeShortLE_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeIntLE_base(class348.selectedSpellWidget);
            var10.packetBuffer.writeByte_base(field724.method4316_base(82)?1:0);
            packetWriter.method2867(var10);
         }

         if(var2 == 1002) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            var10 = class113.method2919(ClientPacket.OPLOCE, packetWriter.isaacCipher);
            var10.packetBuffer.writeShortAdd_base(var3);
            packetWriter.method2867(var10);
         }

         if(var2 == 8) {
            var15 = npcs[var3];
            if(var15 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPNPCT, packetWriter.isaacCipher);
               var11.packetBuffer.writeInt_base(class348.selectedSpellWidget);
               var11.packetBuffer.writeShortAddLE_base(var3);
               var11.packetBuffer.writeByteNeg_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShort_base(selectedSpellChildIndex);
               var11.packetBuffer.writeShortLE_base(selectedSpellItemId);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 58) {
            var19 = HealthBarDefinition.widgetDefinition.method6281(var1, var0);
            if(var19 != null) {
               if(var19.field3648 != null) {
                  ScriptEvent var18 = new ScriptEvent();
                  var18.widget = var19;
                  var18.opIndex = var3;
                  var18.targetName = var6;
                  var18.args = var19.field3648;
                  class157.method3403(var18);
               }

               var11 = class113.method2919(ClientPacket.IF_BUTTONT, packetWriter.isaacCipher);
               var11.packetBuffer.writeIntIME_base(class348.selectedSpellWidget);
               var11.packetBuffer.writeShortLE_base(var0);
               var11.packetBuffer.writeShortLE_base(selectedSpellChildIndex);
               var11.packetBuffer.writeIntME_base(var1);
               var11.packetBuffer.writeShortLE_base(var4);
               var11.packetBuffer.writeShortAdd_base(selectedSpellItemId);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 16) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPOBJU, packetWriter.isaacCipher);
            var10.packetBuffer.writeShortLE_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeByte_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShortLE_base(class59.field414);
            var10.packetBuffer.writeShortAdd_base(var3);
            var10.packetBuffer.writeShortAdd_base(class221.field2343);
            var10.packetBuffer.writeShort_base(class101.baseY + var1);
            var10.packetBuffer.writeInt_base(class195.field2021);
            packetWriter.method2867(var10);
         }

         if(var2 == 1001) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPLOC5, packetWriter.isaacCipher);
            var10.packetBuffer.writeShortLE_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeShortLE_base(class101.baseY + var1);
            var10.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShortLE_base(var3);
            packetWriter.method2867(var10);
         }

         if(var2 == 10) {
            var15 = npcs[var3];
            if(var15 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPNPC2, packetWriter.isaacCipher);
               var11.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShortAddLE_base(var3);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 9) {
            var15 = npcs[var3];
            if(var15 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPNPC1, packetWriter.isaacCipher);
               var11.packetBuffer.writeShort_base(var3);
               var11.packetBuffer.writeByteNeg_base(field724.method4316_base(82)?1:0);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 15) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYERT, packetWriter.isaacCipher);
               var11.packetBuffer.writeByteNeg_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShortAdd_base(selectedSpellItemId);
               var11.packetBuffer.writeShortAddLE_base(var3);
               var11.packetBuffer.writeShortLE_base(selectedSpellChildIndex);
               var11.packetBuffer.writeIntME_base(class348.selectedSpellWidget);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 1) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPLOCU, packetWriter.isaacCipher);
            var10.packetBuffer.writeIntME_base(class195.field2021);
            var10.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShortLE_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeShortAddLE_base(class221.field2343);
            var10.packetBuffer.writeShortLE_base(var3);
            var10.packetBuffer.writeShortAddLE_base(class59.field414);
            var10.packetBuffer.writeShortLE_base(class101.baseY + var1);
            packetWriter.method2867(var10);
         }

         if(var2 == 1003) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            var15 = npcs[var3];
            if(var15 != null) {
               NPCComposition var20 = var15.definition;
               if(var20.transforms != null) {
                  var20 = var20.method3698();
               }

               if(var20 != null) {
                  var14 = class113.method2919(ClientPacket.OPNPCE, packetWriter.isaacCipher);
                  var14.packetBuffer.writeShortAdd_base(var20.id);
                  packetWriter.method2867(var14);
               }
            }
         }

         if(var2 == 4) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPLOC2, packetWriter.isaacCipher);
            var10.packetBuffer.writeShort_base(class101.baseY + var1);
            var10.packetBuffer.writeShortLE_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeByteSub_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShort_base(var3);
            packetWriter.method2867(var10);
         }

         if(var2 == 1008 || var2 == 1009 || var2 == 1010 || var2 == 1011 || var2 == 1012) {
            NpcOverrides.worldMap.method8769(var2, var3, new Coord(var0), new Coord(var1));
         }

         if(var2 == 49) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYER6, packetWriter.isaacCipher);
               var11.packetBuffer.writeByteSub_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShort_base(var3);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 23) {
            if(isMenuOpen) {
               class36.scene.setViewportWalking_base();
            } else {
               class36.scene.menuOpen_base(ItemLayer.Client_plane, var0, var1, true);
            }
         }

         if(var2 == 44) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYER1, packetWriter.isaacCipher);
               var11.packetBuffer.writeShort_base(var3);
               var11.packetBuffer.writeByteNeg_base(field724.method4316_base(82)?1:0);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 45) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYER2, packetWriter.isaacCipher);
               var11.packetBuffer.writeByteNeg_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShortLE_base(var3);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 7) {
            var15 = npcs[var3];
            if(var15 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPNPCU, packetWriter.isaacCipher);
               var11.packetBuffer.writeShortAdd_base(var3);
               var11.packetBuffer.writeShort_base(class59.field414);
               var11.packetBuffer.writeByte_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeIntLE_base(class195.field2021);
               var11.packetBuffer.writeShort_base(class221.field2343);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 29) {
            var10 = class113.method2919(ClientPacket.IF_BUTTON, packetWriter.isaacCipher);
            var10.packetBuffer.writeInt_base(var1);
            packetWriter.method2867(var10);
            var17 = HealthBarDefinition.widgetDefinition.method6287(var1);
            if(var17 != null && var17.cs1Instructions != null && var17.cs1Instructions[0][0] == 5) {
               var12 = var17.cs1Instructions[0][1];
               if(Varps.Varps_main[var12] != var17.cs1ComparisonValues[0]) {
                  Varps.Varps_main[var12] = var17.cs1ComparisonValues[0];
                  settingsChanged(var12);
                  Projectile.changeGameOptions_base(var12);
               }
            }
         }

         if(var2 == 13) {
            var15 = npcs[var3];
            if(var15 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPNPC5, packetWriter.isaacCipher);
               var11.packetBuffer.writeByteSub_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShort_base(var3);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 19) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPOBJ2, packetWriter.isaacCipher);
            var10.packetBuffer.writeByte_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShortLE_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeShortAdd_base(class101.baseY + var1);
            var10.packetBuffer.writeShortAddLE_base(var3);
            packetWriter.method2867(var10);
         }

         if(var2 == 14) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYERU, packetWriter.isaacCipher);
               var11.packetBuffer.writeShort_base(class221.field2343);
               var11.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShortAddLE_base(class59.field414);
               var11.packetBuffer.writeShortAddLE_base(var3);
               var11.packetBuffer.writeInt_base(class195.field2021);
               packetWriter.method2867(var11);
            }
         }

         if(var2 == 5) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPLOC3, packetWriter.isaacCipher);
            var10.packetBuffer.writeByteNeg_base(field724.method4316_base(82)?1:0);
            var10.packetBuffer.writeShortAdd_base(class101.baseY + var1);
            var10.packetBuffer.writeShortLE_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeShortLE_base(var3);
            packetWriter.method2867(var10);
         }

         if(var2 == 18) {
            mouseCrossX = var7;
            mouseCrossY = var8;
            mouseCrossColor = 2;
            mouseCrossState = 0;
            destinationX = var0;
            destinationY = var1;
            var10 = class113.method2919(ClientPacket.OPOBJ1, packetWriter.isaacCipher);
            var10.packetBuffer.writeShort_base(class101.baseY + var1);
            var10.packetBuffer.writeShort_base(var0 + NpcOverrides.baseX);
            var10.packetBuffer.writeShortAddLE_base(var3);
            var10.packetBuffer.writeByteAdd_base(field724.method4316_base(82)?1:0);
            packetWriter.method2867(var10);
         }

         if(var2 == 46) {
            var16 = players[var3];
            if(var16 != null) {
               mouseCrossX = var7;
               mouseCrossY = var8;
               mouseCrossColor = 2;
               mouseCrossState = 0;
               destinationX = var0;
               destinationY = var1;
               var11 = class113.method2919(ClientPacket.OPPLAYER3, packetWriter.isaacCipher);
               var11.packetBuffer.writeByte_base(field724.method4316_base(82)?1:0);
               var11.packetBuffer.writeShort_base(var3);
               packetWriter.method2867(var11);
            }
         }

         if(isItemSelected != 0) {
            isItemSelected = 0;
            class159.method3423(HealthBarDefinition.widgetDefinition.method6287(class195.field2021));
         }

         if(isSpellSelected) {
            class53.method1111_base();
         }

      }
   }

   public static void drawAlpha(int[] var0, int var1, int var2, int var3) {
      if(SpriteMask.client.isGpu() && var0 == SpriteMask.client.getBufferProvider().getPixels()) {
         int var4 = var3 + ((var0[var1] >>> 24) * (255 - var3) * 32897 >>> 23);
         var0[var1] = var2 & 16777215 | var4 << 24;
      } else {
         var0[var1] = var2;
      }
   }

   public static int rl$rot2(int var0, int var1, int var2, int var3) {
      return var2 * var1 - var3 * var0 >> 16;
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onRefreshToken(int var0) {
      if(SpriteMask.client.storeCredentials()) {
         SpriteMask.client.getCredentialsProperties().setProperty("JX_ACCESS_TOKEN", SpriteMask.client.getAccessToken() == null?"":SpriteMask.client.getAccessToken());
         SpriteMask.client.getCredentialsProperties().setProperty("JX_REFRESH_TOKEN", SpriteMask.client.getRefreshToken() == null?"":SpriteMask.client.getRefreshToken());
         SpriteMask.client.writeCredentials();
      }

   }

   public static boolean shouldHideAttackOptionFor(RSPlayer var0) {
      return hideFriendAttackOptions && var0.isFriended() || hideClanmateAttackOptions && var0.isFriendsChatMember();
   }

   @ObfuscatedSignature(
      descriptor = "(II)V",
      garbageValue = "-1624666505"
   )
   public static void copy$runWidgetOnLoadListener(int var0, int var1) {
      if(var0 != -1) {
         if(HealthBarDefinition.widgetDefinition.loadInterface_base(var0)) {
            Widget[] var2 = HealthBarDefinition.widgetDefinition.Widget_interfaceComponents[var0];

            for(int var3 = 0; var3 < var2.length; ++var3) {
               Widget var4 = var2[var3];
               if(var4.onLoad != null) {
                  ScriptEvent var5 = new ScriptEvent();
                  var5.widget = var4;
                  var5.args = var4.onLoad;
                  class323.method6209(var5, 5000000, 0);
               }
            }

         }
      }
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onTempMenuActionChanged(int var0) {
      if(class174.tempMenuAction != null) {
         SpriteMask.client.getCallbacks().post(WidgetPressed.INSTANCE);
      }

   }

   public static int rl$rot3(int var0, int var1, int var2, int var3) {
      return var0 * var2 - var3 * var1 >> 16;
   }

   public static int rl$rot4(int var0, int var1, int var2, int var3) {
      return var2 * var1 + var3 * var0 >> 16;
   }

   public static void settingsChanged(int var0) {
      VarbitChanged var1 = new VarbitChanged();
      var1.setVarpId(var0);
      var1.setValue(SpriteMask.client.getVarpValue(var0));
      SpriteMask.client.getCallbacks().post(var1);
      if(oldVarps == null) {
         oldVarps = new int[SpriteMask.client.getVarps().length];
      }

      if(!Arrays.equals(oldVarps, SpriteMask.client.getVarps())) {
         ArrayList var2 = (ArrayList)varbitsMap.get(Integer.valueOf(var0));
         if(var2 == null || var2.isEmpty()) {
            return;
         }

         Iterator var3 = var2.iterator();

         while(var3.hasNext()) {
            int var4 = ((Integer)var3.next()).intValue();
            int var5 = SpriteMask.client.getVarbitValue(oldVarps, var4);
            int var6 = SpriteMask.client.getVarbitValue(SpriteMask.client.getVarps(), var4);
            if(var5 != var6) {
               var1.setVarpId(-1);
               var1.setVarbitId(var4);
               var1.setValue(var6);
               SpriteMask.client.getCallbacks().post(var1);
            }
         }

         System.arraycopy(SpriteMask.client.getVarps(), 0, oldVarps, 0, oldVarps.length);
      }

   }

   public static void postRenderWidgetLayer(net.runelite.api.widgets.Widget[] var0, int var1, int var2, int var3, int var4, int var5, int var6, int var7, int var8) {
      Callbacks var9 = SpriteMask.client.getCallbacks();
      int var10 = widgetItems.size();
      net.runelite.api.widgets.Widget[] var11 = var0;
      int var12 = var0.length;

      int var13;
      net.runelite.api.widgets.Widget var14;
      for(var13 = 0; var13 < var12; ++var13) {
         var14 = var11[var13];
         RSWidget var15 = (RSWidget)var14;
         if(var15 != null && var15.getRSParentId() == var1 && !var15.isSelfHidden()) {
            int var16 = var15.getType();
            if(var16 == 5 && var15.getItemId() != -1) {
               int var17 = var6 + var15.getRelativeX();
               int var18 = var7 + var15.getRelativeY();
               if(var17 >= var2 && var17 <= var4 && var18 >= var3 && var18 <= var5) {
                  WidgetItem var19 = new WidgetItem(var15.getItemId(), var15.getItemQuantity(), -1, var15.getBounds(), var15, (Rectangle)null);
                  widgetItems.add(var19);
               }
            } else if(var16 == 2) {
               widgetItems.addAll(var15.getWidgetItems());
            }
         }
      }

      Object var25 = Collections.emptyList();
      if(var10 < widgetItems.size()) {
         if(var10 > 0) {
            var25 = widgetItems.subList(var10, widgetItems.size());
         } else {
            var25 = widgetItems;
         }
      }

      if(var1 == -1412584499) {
         widgetItems.clear();
      } else {
         net.runelite.api.widgets.Widget[] var21;
         if(var1 != -1) {
            net.runelite.api.widgets.Widget var20 = SpriteMask.client.getWidget(var1);
            var21 = var20.getChildren();
            if(var21 == null || var21 == var0) {
               var9.drawLayer(var20, (List)var25);
            }
         } else {
            var12 = -1;
            var21 = var0;
            int var22 = var0.length;

            for(int var23 = 0; var23 < var22; ++var23) {
               net.runelite.api.widgets.Widget var24 = var21[var23];
               if(var24 != null) {
                  var12 = WidgetUtil.componentToInterface(var24.getId());
                  break;
               }
            }

            if(var12 == -1) {
               return;
            }

            var9.drawInterface(var12, widgetItems);
            widgetItems.clear();

            for(var13 = hiddenWidgets.size() - 1; var13 >= 0; --var13) {
               var14 = (net.runelite.api.widgets.Widget)hiddenWidgets.get(var13);
               if(WidgetUtil.componentToInterface(var14.getId()) == var12) {
                  var14.setHidden(false);
                  hiddenWidgets.remove(var13);
               }
            }
         }
      }

   }

   public static void postChangeWorld(RSWorld var0) {
      SpriteMask.client.getCallbacks().post(new WorldChanged());
   }

   public static boolean drawMenu() {
      BeforeMenuRender var0 = new BeforeMenuRender();
      SpriteMask.client.getCallbacks().post(var0);
      return var0.isConsumed();
   }

   public static String getStaticCredentialsProperty(String var0) {
      return SpriteMask.client.getCredentialsProperty(var0);
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void gameStateChanged(int var0) {
      GameState var1 = SpriteMask.client.getGameState();
      SpriteMask.client.getLogger().debug("Game state changed: {}", var1);
      GameStateChanged var2 = new GameStateChanged();
      var2.setGameState(var1);
      SpriteMask.client.getCallbacks().post(var2);
      if(var1 == GameState.LOGGED_IN) {
         if(SpriteMask.client.getLocalPlayer() == null) {
            return;
         }

         int var3 = SpriteMask.client.getPlane();
         RSScene var4 = SpriteMask.client.getScene();
         RSTile[][][] var5 = var4.getTiles();
         RSNodeDeque[][][] var6 = SpriteMask.client.getGroundItemDeque();
         RSNodeDeque[][] var7 = var6[var3];

         for(int var8 = 0; var8 < 104; ++var8) {
            for(int var9 = 0; var9 < 104; ++var9) {
               RSNodeDeque var10 = var7[var8][var9];
               if(var10 != null) {
                  RSTile var11 = var5[var3][var8][var9];
                  RSNode var12 = var10.getSentinel();

                  for(RSNode var13 = var12.getNext(); var13 != var12; var13 = var13.getNext()) {
                     RSTileItem var14 = (RSTileItem)var13;
                     var14.setX(var8);
                     var14.setY(var9);
                     ItemSpawned var15 = new ItemSpawned(var11, var14);
                     SpriteMask.client.getCallbacks().post(var15);
                  }
               }
            }
         }
      } else if(var1 == GameState.LOGIN_SCREEN) {
         loadVarbits();
      }

   }

   public static void updateNpcs(boolean var0, RSPacketBuffer var1) {
      SpriteMask.client.getCallbacks().updateNpcs();
      syncMusicVolume();
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void draggingWidgetChanged(int var0) {
      DraggingWidgetChanged var1 = new DraggingWidgetChanged();
      var1.setDraggingWidget(SpriteMask.client.isDraggingWidget());
      SpriteMask.client.getCallbacks().post(var1);
   }

   public static void loginScreenClick(RSGameEngine var0, RSFont var1, RSFont var2) {
      if(!SpriteMask.client.isWorldSelectOpen() && (SpriteMask.client.getMouseLastPressedX() > SpriteMask.client.getLoginScreenXPadding() + 765 || SpriteMask.client.getMouseLastPressedY() > 503)) {
         SpriteMask.client.setMouseLastPressedX(0);
         SpriteMask.client.setMouseLastPressedX(0);
      }

   }

   public static void onGrandExchangeOffersChanged(int var0) {
      if(var0 != -1) {
         RSGrandExchangeOffer var1 = SpriteMask.client.getGrandExchangeOffers()[var0];
         if(var1 != null) {
            GrandExchangeOfferChanged var2 = new GrandExchangeOfferChanged();
            var2.setOffer(var1);
            var2.setSlot(var0);
            SpriteMask.client.getCallbacks().post(var2);
         }
      }
   }

   public static void onAmbientSoundEffect(int var0, int var1, int var2, net.runelite.api.ObjectComposition var3, int var4) {
      RSObjectSound var5 = (RSObjectSound)SpriteMask.client.getAmbientSoundEffects().last();
      AmbientSoundEffectCreated var6 = new AmbientSoundEffectCreated(var5);
      SpriteMask.client.getCallbacks().post(var6);
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void worldSelectionScreenToggled(int var0) {
      if(!SpriteMask.client.isWorldSelectOpen()) {
         Arrays.fill(SpriteMask.client.getBufferProvider().getPixels(), 0);
      }

   }

   public static void cachedNPCsChanged(int var0) {
      RSNPC[] var1 = SpriteMask.client.getCachedNPCs();
      if(var0 >= 0 && var0 < var1.length) {
         RSNPC var2 = var1[var0];
         if(var2 != null) {
            var2.setIndex(var0);
            SpriteMask.client.getCallbacks().postDeferred(new NpcSpawned(var2));
         }

      }
   }

   @ObfuscatedSignature(
      descriptor = "(II)V",
      garbageValue = "2039275921"
   )
   public static final void copy$changeGameOptions(int var0, int var1) {
      class396.method7403_base();
      class159.method3426_base();
      int var2 = FloorOverlayDefinition.method4037(var0).type;
      if(var2 != 0) {
         int var3 = Varps.Varps_main[var0];
         if(var2 == 1) {
            if(var3 == 1) {
               Rasterizer3D.method5191_base(0.9D);
               ((TextureProvider)Rasterizer3D.clips.Rasterizer3D_textureLoader).setBrightness_base(0.9D);
               class166.method3495_base();
               WorldMapIcon_1.clientPreferences.method2551_base(0.9D);
            }

            if(var3 == 2) {
               Rasterizer3D.method5191_base(0.8D);
               ((TextureProvider)Rasterizer3D.clips.Rasterizer3D_textureLoader).setBrightness_base(0.8D);
               class166.method3495_base();
               WorldMapIcon_1.clientPreferences.method2551_base(0.8D);
            }

            if(var3 == 3) {
               Rasterizer3D.method5191_base(0.7D);
               ((TextureProvider)Rasterizer3D.clips.Rasterizer3D_textureLoader).setBrightness_base(0.7D);
               class166.method3495_base();
               WorldMapIcon_1.clientPreferences.method2551_base(0.7D);
            }

            if(var3 == 4) {
               Rasterizer3D.method5191_base(0.6D);
               ((TextureProvider)Rasterizer3D.clips.Rasterizer3D_textureLoader).setBrightness_base(0.6D);
               class166.method3495_base();
               WorldMapIcon_1.clientPreferences.method2551_base(0.6D);
            }
         }

         if(var2 == 3) {
            if(var3 == 0) {
               Decimator.setMusicVolume_base(255);
            }

            if(var3 == 1) {
               Decimator.setMusicVolume_base(192);
            }

            if(var3 == 2) {
               Decimator.setMusicVolume_base(128);
            }

            if(var3 == 3) {
               Decimator.setMusicVolume_base(64);
            }

            if(var3 == 4) {
               Decimator.setMusicVolume_base(0);
            }
         }

         if(var2 == 4) {
            if(var3 == 0) {
               SoundSystem.method868_base(127);
            }

            if(var3 == 1) {
               SoundSystem.method868_base(96);
            }

            if(var3 == 2) {
               SoundSystem.method868_base(64);
            }

            if(var3 == 3) {
               SoundSystem.method868_base(32);
            }

            if(var3 == 4) {
               SoundSystem.method868_base(0);
            }
         }

         if(var2 == 5) {
            leftClickOpensMenu = var3 == 1;
         }

         if(var2 == 6) {
            chatEffects = var3;
         }

         if(var2 == 9) {
            ;
         }

         if(var2 == 10) {
            if(var3 == 0) {
               Login.method2198_base(127);
            }

            if(var3 == 1) {
               Login.method2198_base(96);
            }

            if(var3 == 2) {
               Login.method2198_base(64);
            }

            if(var3 == 3) {
               Login.method2198_base(32);
            }

            if(var3 == 4) {
               Login.method2198_base(0);
            }
         }

         if(var2 == 17) {
            followerIndex = var3 & 65535;
         }

         if(var2 == 18) {
            playerAttackOption = (AttackOption)class12.method170(MenuAction.method2139(), var3);
            if(playerAttackOption == null) {
               playerAttackOption = AttackOption.AttackOption_dependsOnCombatLevels;
            }
         }

         if(var2 == 19) {
            if(var3 == -1) {
               combatTargetPlayerIndex = -1;
               combatPlayerTargetChanged(-1);
            } else {
               combatTargetPlayerIndex = var3 & 2047;
               combatPlayerTargetChanged(-1);
            }
         }

         if(var2 == 22) {
            AttackOption[] var4 = new AttackOption[]{AttackOption.field1334, AttackOption.AttackOption_alwaysRightClick, AttackOption.AttackOption_hidden, AttackOption.AttackOption_dependsOnCombatLevels, AttackOption.field1337};
            npcAttackOption = (AttackOption)class12.method170(var4, var3);
            if(npcAttackOption == null) {
               npcAttackOption = AttackOption.AttackOption_dependsOnCombatLevels;
            }
         }

      }
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void combatPlayerTargetChanged(int var0) {
      if(SpriteMask.client.getLocalInteractingIndex() == -1) {
         net.runelite.api.Player var1 = SpriteMask.client.getHintArrowPlayer();
         if(var1 != null) {
            SpriteMask.client.setLocalInteractingIndex(var1.getId() & 2047);
         }
      }

   }

   public static void cachedPlayersChanged(int var0) {
      RSPlayer[] var1 = SpriteMask.client.getCachedPlayers();
      if(var0 >= 0 && var0 < var1.length) {
         RSPlayer var2 = var1[var0];
         RSPlayer var3 = oldPlayers[var0];
         oldPlayers[var0] = var2;
         if(var3 != null) {
            SpriteMask.client.getCallbacks().post(new PlayerDespawned(var3));
         }

         if(var2 != null) {
            SpriteMask.client.getCallbacks().postDeferred(new PlayerSpawned(var2));
         }

      }
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onUsernameChanged(int var0) {
      SpriteMask.client.getCallbacks().post(UsernameChanged.INSTANCE);
   }

   public static void playerOptionsChanged(int var0) {
      net.runelite.api.MenuAction[] var1 = new net.runelite.api.MenuAction[]{net.runelite.api.MenuAction.PLAYER_FIRST_OPTION, net.runelite.api.MenuAction.PLAYER_SECOND_OPTION, net.runelite.api.MenuAction.PLAYER_THIRD_OPTION, net.runelite.api.MenuAction.PLAYER_FOURTH_OPTION, net.runelite.api.MenuAction.PLAYER_FIFTH_OPTION, net.runelite.api.MenuAction.PLAYER_SIXTH_OPTION, net.runelite.api.MenuAction.PLAYER_SEVENTH_OPTION, net.runelite.api.MenuAction.PLAYER_EIGHTH_OPTION};
      if(var0 >= 0 && var0 < var1.length) {
         net.runelite.api.MenuAction var2 = var1[var0];
         SpriteMask.client.getPlayerMenuTypes()[var0] = var2.getId();
      }

      PlayerMenuOptionsChanged var3 = new PlayerMenuOptionsChanged();
      var3.setIndex(var0);
      SpriteMask.client.getCallbacks().post(var3);
   }

   @ObfuscatedSignature(
      descriptor = "(Ldf;II)V",
      garbageValue = "-1026770295"
   )
   public static final void copy$updateActorSequence(Actor var0, int var1, int var2) {
      int var4;
      int var5;
      int var7;
      SequenceDefinition var10;
      if(var0.spotAnimation >= cycle) {
         int var3 = Math.max(1, var0.spotAnimation - cycle);
         var4 = var0.field1209 * 128 + var0.field1198 * 64;
         var5 = var0.field1194 * 128 + var0.field1198 * 64;
         var0.x += (var4 - var0.x) / var3;
         var0.y += (var5 - var0.y) / var3;
         var0.field1245 = 0;
         var0.orientation = var0.field1229;
      } else if(var0.field1187 >= cycle) {
         boolean var13 = var0.field1187 == cycle || var0.sequence == -1 || var0.sequenceDelay != 0;
         if(!var13) {
            var10 = DynamicObject.method2245(var0.sequence);
            if(var10 != null && !var10.isCachedModelIdSet_base()) {
               var13 = var0.sequenceFrameCycle + 1 > var10.frameLengths[var0.sequenceFrame];
            } else {
               var13 = true;
            }
         }

         if(var13) {
            var4 = var0.field1187 - var0.spotAnimation;
            var5 = cycle - var0.spotAnimation;
            int var6 = var0.field1209 * 128 + var0.field1198 * 64;
            var7 = var0.field1194 * 128 + var0.field1198 * 64;
            int var8 = var0.field1224 * 128 + var0.field1198 * 64;
            int var9 = var0.field1203 * 128 + var0.field1198 * 64;
            var0.x = (var5 * var8 + var6 * (var4 - var5)) / var4;
            var0.y = (var9 * var5 + var7 * (var4 - var5)) / var4;
         }

         var0.field1245 = 0;
         var0.orientation = var0.field1229;
         var0.rotation = var0.orientation;
      } else {
         DevicePcmPlayerProvider.method322(var0);
      }

      if(var0.x < 128 || var0.y < 128 || var0.x >= 13184 || var0.y >= 13184) {
         var0.sequence = -1;
         var0.animationChanged(-1);
         var0.spotAnimation = 0;
         var0.field1187 = 0;
         var0.clearSpotAnimations_base();
         var0.x = var0.pathX[0] * 128 + var0.field1198 * 64;
         var0.y = var0.pathY[0] * 128 + var0.field1198 * 64;
         var0.method2461_base();
      }

      if(class229.localPlayer == var0 && (var0.x < 1536 || var0.y < 1536 || var0.x >= 11776 || var0.y >= 11776)) {
         var0.sequence = -1;
         var0.animationChanged(-1);
         var0.spotAnimation = 0;
         var0.field1187 = 0;
         var0.clearSpotAnimations_base();
         var0.x = var0.pathX[0] * 128 + var0.field1198 * 64;
         var0.y = var0.pathY[0] * 128 + var0.field1198 * 64;
         var0.method2461_base();
      }

      WorldMap.method8924(var0);
      var0.isWalking = false;
      if(var0.movementSequence != -1) {
         SequenceDefinition var11 = DynamicObject.method2245(var0.movementSequence);
         if(var11 != null) {
            if(!var11.isCachedModelIdSet_base() && var11.frameIds != null) {
               ++var0.movementFrameCycle;
               if(var0.movementFrame < var11.frameIds.length && var0.movementFrameCycle > var11.frameLengths[var0.movementFrame]) {
                  var0.movementFrameCycle = 1;
                  ++var0.movementFrame;
                  DynamicObject.method2244(var11, var0.movementFrame, var0.x, var0.y, var0);
               }

               if(var0.movementFrame >= var11.frameIds.length) {
                  if(var11.frameCount > 0) {
                     var0.movementFrame -= var11.frameCount;
                     if(var11.field2210) {
                        ++var0.field1248;
                     }

                     if(var0.movementFrame < 0 || var0.movementFrame >= var11.frameIds.length || var11.field2210 && var0.field1248 >= var11.field2211) {
                        var0.movementFrameCycle = 0;
                        var0.movementFrame = 0;
                        var0.field1248 = 0;
                     }
                  } else {
                     var0.movementFrameCycle = 0;
                     var0.movementFrame = 0;
                  }

                  DynamicObject.method2244(var11, var0.movementFrame, var0.x, var0.y, var0);
               }
            } else if(var11.isCachedModelIdSet_base()) {
               ++var0.movementFrame;
               var4 = var11.method4064_base();
               if(var0.movementFrame < var4) {
                  FriendLoginUpdate.method8129(var11, var0.movementFrame, var0.x, var0.y, var0);
               } else {
                  if(var11.frameCount > 0) {
                     var0.movementFrame -= var11.frameCount;
                     if(var11.field2210) {
                        ++var0.field1248;
                     }

                     if(var0.movementFrame < 0 || var0.movementFrame >= var4 || var11.field2210 && var0.field1248 >= var11.field2211) {
                        var0.movementFrame = 0;
                        var0.movementFrameCycle = 0;
                        var0.field1248 = 0;
                     }
                  } else {
                     var0.movementFrameCycle = 0;
                     var0.movementFrame = 0;
                  }

                  FriendLoginUpdate.method8129(var11, var0.movementFrame, var0.x, var0.y, var0);
               }
            } else {
               var0.movementSequence = -1;
            }
         } else {
            var0.movementSequence = -1;
         }
      }

      IterableNodeHashTableIterator var15 = new IterableNodeHashTableIterator(var0.method2467());

      for(ActorSpotAnim var14 = (ActorSpotAnim)var15.method8939(); var14 != null; var14 = (ActorSpotAnim)var15.next()) {
         if(var14.spotAnimation != -1 && cycle >= var14.field5285) {
            var5 = Canvas.method324(var14.spotAnimation).sequence;
            if(var5 == -1) {
               var14.remove_base();
               --var0.graphicsCount;
            } else {
               var14.spotAnimationFrame = Math.max(var14.spotAnimationFrame, 0);
               SequenceDefinition var12 = DynamicObject.method2245(var5);
               if(var12.frameIds != null && !var12.isCachedModelIdSet_base()) {
                  ++var14.spotAnimationFrameCycle;
                  if(var14.spotAnimationFrame < var12.frameIds.length && var14.spotAnimationFrameCycle > var12.frameLengths[var14.spotAnimationFrame]) {
                     var14.spotAnimationFrameCycle = 1;
                     ++var14.spotAnimationFrame;
                     DynamicObject.method2244(var12, var14.spotAnimationFrame, var0.x, var0.y, var0);
                  }

                  if(var14.spotAnimationFrame >= var12.frameIds.length) {
                     var14.remove_base();
                     --var0.graphicsCount;
                  }
               } else if(var12.isCachedModelIdSet_base()) {
                  ++var14.spotAnimationFrame;
                  var7 = var12.method4064_base();
                  if(var14.spotAnimationFrame < var7) {
                     FriendLoginUpdate.method8129(var12, var14.spotAnimationFrame, var0.x, var0.y, var0);
                  } else {
                     var14.remove_base();
                     --var0.graphicsCount;
                  }
               } else {
                  var14.remove_base();
                  --var0.graphicsCount;
               }
            }
         }
      }

      if(var0.sequence != -1 && var0.sequenceDelay <= 1) {
         var10 = DynamicObject.method2245(var0.sequence);
         if(var10.field2218 == 1 && var0.field1220 > 0 && var0.spotAnimation <= cycle && var0.field1187 < cycle) {
            var0.sequenceDelay = 1;
            return;
         }
      }

      if(var0.sequence != -1 && var0.sequenceDelay == 0) {
         var10 = DynamicObject.method2245(var0.sequence);
         if(var10 == null) {
            var0.sequence = -1;
            var0.animationChanged(-1);
         } else if(!var10.isCachedModelIdSet_base() && var10.frameIds != null) {
            ++var0.sequenceFrameCycle;
            if(var0.sequenceFrame < var10.frameIds.length && var0.sequenceFrameCycle > var10.frameLengths[var0.sequenceFrame]) {
               var0.sequenceFrameCycle = 1;
               ++var0.sequenceFrame;
               DynamicObject.method2244(var10, var0.sequenceFrame, var0.x, var0.y, var0);
            }

            if(var0.sequenceFrame >= var10.frameIds.length) {
               var0.sequenceFrame -= var10.frameCount;
               ++var0.field1199;
               if(var0.field1199 >= var10.field2211) {
                  var0.sequence = -1;
                  var0.animationChanged(-1);
               } else if(var0.sequenceFrame >= 0 && var0.sequenceFrame < var10.frameIds.length) {
                  DynamicObject.method2244(var10, var0.sequenceFrame, var0.x, var0.y, var0);
               } else {
                  var0.sequence = -1;
                  var0.animationChanged(-1);
               }
            }

            var0.isWalking = var10.field2224;
         } else if(var10.isCachedModelIdSet_base()) {
            ++var0.sequenceFrame;
            var5 = var10.method4064_base();
            if(var0.sequenceFrame < var5) {
               FriendLoginUpdate.method8129(var10, var0.sequenceFrame, var0.x, var0.y, var0);
            } else {
               var0.sequenceFrame -= var10.frameCount;
               ++var0.field1199;
               if(var0.field1199 >= var10.field2211) {
                  var0.sequence = -1;
                  var0.animationChanged(-1);
               } else if(var0.sequenceFrame >= 0 && var0.sequenceFrame < var5) {
                  FriendLoginUpdate.method8129(var10, var0.sequenceFrame, var0.x, var0.y, var0);
               } else {
                  var0.sequence = -1;
                  var0.animationChanged(-1);
               }
            }
         } else {
            var0.sequence = -1;
            var0.animationChanged(-1);
         }
      }

      if(var0.sequenceDelay > 0) {
         --var0.sequenceDelay;
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void rndHue(int var0) {
      int var1 = SpriteMask.client.getRndHue();
      if(var1 >= -8 && var1 <= 8) {
         RSScene var2 = SpriteMask.client.getScene();
         short[][][] var3 = SpriteMask.client.getTileUnderlays();
         short[][][] var4 = SpriteMask.client.getTileOverlays();
         byte[][][] var5 = SpriteMask.client.getTileShapes();
         var2.setUnderlayIds((short[][][])Arrays.copyOf(var3, var3.length));
         var2.setOverlayIds((short[][][])Arrays.copyOf(var4, var4.length));
         var2.setTileShapes((byte[][][])Arrays.copyOf(var5, var5.length));
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onCycleCntrChanged(int var0) {
      SpriteMask.client.getCallbacks().post(ClientTick.INSTANCE);
   }

   @ObfuscatedSignature(
      descriptor = "(IIIIIILkf;Liw;B)V",
      garbageValue = "-60"
   )
   public static final void copy$addObjects(int var0, int var1, int var2, int var3, int var4, int var5, Scene var6, CollisionMap var7, byte var8) {
      if(!isLowDetail || (Tiles.Tiles_renderFlags[0][var1][var2] & 2) != 0 || (Tiles.Tiles_renderFlags[var0][var1][var2] & 16) == 0) {
         if(var0 < Tiles.Tiles_minPlane) {
            Tiles.Tiles_minPlane = var0;
         }

         ObjectComposition var9 = WorldMapSection2.method4515(var3);
         int var10;
         int var11;
         if(var4 != 1 && var4 != 3) {
            var10 = var9.sizeX;
            var11 = var9.sizeY;
         } else {
            var10 = var9.sizeY;
            var11 = var9.sizeX;
         }

         int var12;
         int var13;
         if(var10 + var1 <= 104) {
            var12 = (var10 >> 1) + var1;
            var13 = (var10 + 1 >> 1) + var1;
         } else {
            var12 = var1;
            var13 = var1 + 1;
         }

         int var14;
         int var15;
         if(var11 + var2 <= 104) {
            var14 = (var11 >> 1) + var2;
            var15 = var2 + (var11 + 1 >> 1);
         } else {
            var14 = var2;
            var15 = var2 + 1;
         }

         int[][] var16 = Tiles.Tiles_heights[var0];
         int var17 = var16[var13][var15] + var16[var12][var14] + var16[var13][var14] + var16[var12][var15] >> 2;
         int var18 = (var1 << 7) + (var10 << 6);
         int var19 = (var2 << 7) + (var11 << 6);
         long var20 = Player.calculateTag_base(var1, var2, 2, var9.int1 == 0, var3);
         int var22 = var5 + (var4 << 6);
         if(var9.int3 == 1) {
            var22 += 256;
         }

         if(var9.hasSound_base()) {
            UrlRequester.method2900(var0, var1, var2, var9, var4);
         }

         Object var23;
         if(var5 == 22) {
            if(!isLowDetail || var9.int1 != 0 || var9.interactType == 1 || var9.boolean2) {
               if(var9.animationId == -1 && var9.transforms == null) {
                  var23 = var9.method3894(22, var4, var16, var18, var17, var19);
               } else {
                  var23 = new DynamicObject(var3, 22, var4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
               }

               var6.method5330(var0, var1, var2, var17, (Renderable)var23, var20, var22);
               if(var9.interactType == 1 && var7 != null) {
                  var7.setBlockedByFloorDec_base(var1, var2);
               }

            }
         } else {
            int var24;
            if(var5 != 10 && var5 != 11) {
               if(var5 >= 12) {
                  if(var9.animationId == -1 && var9.transforms == null) {
                     var23 = var9.method3894(var5, var4, var16, var18, var17, var19);
                  } else {
                     var23 = new DynamicObject(var3, var5, var4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                  }

                  var6.method5334(var0, var1, var2, var17, 1, 1, (Renderable)var23, 0, var20, var22);
                  if(var5 >= 12 && var5 <= 17 && var5 != 13 && var0 > 0) {
                     class344.field3814[var0][var1][var2] |= 2340;
                  }

                  if(var9.interactType != 0 && var7 != null) {
                     var7.addGameObject_base(var1, var2, var10, var11, var9.boolean1);
                  }

               } else if(var5 == 0) {
                  if(var9.animationId == -1 && var9.transforms == null) {
                     var23 = var9.method3894(0, var4, var16, var18, var17, var19);
                  } else {
                     var23 = new DynamicObject(var3, 0, var4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                  }

                  var6.method5332(var0, var1, var2, var17, (Renderable)var23, (Renderable)null, Tiles.field1006[var4], 0, var20, var22);
                  if(var4 == 0) {
                     if(var9.clipped) {
                        class93.Tiles_underlays2[var0][var1][var2] = 50;
                        class93.Tiles_underlays2[var0][var1][var2 + 1] = 50;
                     }

                     if(var9.modelClipped) {
                        class344.field3814[var0][var1][var2] |= 585;
                     }
                  } else if(var4 == 1) {
                     if(var9.clipped) {
                        class93.Tiles_underlays2[var0][var1][var2 + 1] = 50;
                        class93.Tiles_underlays2[var0][var1 + 1][var2 + 1] = 50;
                     }

                     if(var9.modelClipped) {
                        class344.field3814[var0][var1][1 + var2] |= 1170;
                     }
                  } else if(var4 == 2) {
                     if(var9.clipped) {
                        class93.Tiles_underlays2[var0][var1 + 1][var2] = 50;
                        class93.Tiles_underlays2[var0][var1 + 1][var2 + 1] = 50;
                     }

                     if(var9.modelClipped) {
                        class344.field3814[var0][var1 + 1][var2] |= 585;
                     }
                  } else if(var4 == 3) {
                     if(var9.clipped) {
                        class93.Tiles_underlays2[var0][var1][var2] = 50;
                        class93.Tiles_underlays2[var0][var1 + 1][var2] = 50;
                     }

                     if(var9.modelClipped) {
                        class344.field3814[var0][var1][var2] |= 1170;
                     }
                  }

                  if(var9.interactType != 0 && var7 != null) {
                     var7.method4349_base(var1, var2, var5, var4, var9.boolean1);
                  }

                  if(var9.int2 != 16) {
                     var6.method5340_base(var0, var1, var2, var9.int2);
                  }

               } else if(var5 == 1) {
                  if(var9.animationId == -1 && var9.transforms == null) {
                     var23 = var9.method3894(1, var4, var16, var18, var17, var19);
                  } else {
                     var23 = new DynamicObject(var3, 1, var4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                  }

                  var6.method5332(var0, var1, var2, var17, (Renderable)var23, (Renderable)null, Tiles.field1005[var4], 0, var20, var22);
                  if(var9.clipped) {
                     if(var4 == 0) {
                        class93.Tiles_underlays2[var0][var1][var2 + 1] = 50;
                     } else if(var4 == 1) {
                        class93.Tiles_underlays2[var0][var1 + 1][var2 + 1] = 50;
                     } else if(var4 == 2) {
                        class93.Tiles_underlays2[var0][var1 + 1][var2] = 50;
                     } else if(var4 == 3) {
                        class93.Tiles_underlays2[var0][var1][var2] = 50;
                     }
                  }

                  if(var9.interactType != 0 && var7 != null) {
                     var7.method4349_base(var1, var2, var5, var4, var9.boolean1);
                  }

               } else {
                  int var29;
                  if(var5 == 2) {
                     var29 = var4 + 1 & 3;
                     Object var30;
                     Object var31;
                     if(var9.animationId == -1 && var9.transforms == null) {
                        var30 = var9.method3894(2, var4 + 4, var16, var18, var17, var19);
                        var31 = var9.method3894(2, var29, var16, var18, var17, var19);
                     } else {
                        var30 = new DynamicObject(var3, 2, var4 + 4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                        var31 = new DynamicObject(var3, 2, var29, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                     }

                     var6.method5332(var0, var1, var2, var17, (Renderable)var30, (Renderable)var31, Tiles.field1006[var4], Tiles.field1006[var29], var20, var22);
                     if(var9.modelClipped) {
                        if(var4 == 0) {
                           class344.field3814[var0][var1][var2] |= 585;
                           class344.field3814[var0][var1][var2 + 1] |= 1170;
                        } else if(var4 == 1) {
                           class344.field3814[var0][var1][1 + var2] |= 1170;
                           class344.field3814[var0][var1 + 1][var2] |= 585;
                        } else if(var4 == 2) {
                           class344.field3814[var0][var1 + 1][var2] |= 585;
                           class344.field3814[var0][var1][var2] |= 1170;
                        } else if(var4 == 3) {
                           class344.field3814[var0][var1][var2] |= 1170;
                           class344.field3814[var0][var1][var2] |= 585;
                        }
                     }

                     if(var9.interactType != 0 && var7 != null) {
                        var7.method4349_base(var1, var2, var5, var4, var9.boolean1);
                     }

                     if(var9.int2 != 16) {
                        var6.method5340_base(var0, var1, var2, var9.int2);
                     }

                  } else if(var5 == 3) {
                     if(var9.animationId == -1 && var9.transforms == null) {
                        var23 = var9.method3894(3, var4, var16, var18, var17, var19);
                     } else {
                        var23 = new DynamicObject(var3, 3, var4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                     }

                     var6.method5332(var0, var1, var2, var17, (Renderable)var23, (Renderable)null, Tiles.field1005[var4], 0, var20, var22);
                     if(var9.clipped) {
                        if(var4 == 0) {
                           class93.Tiles_underlays2[var0][var1][var2 + 1] = 50;
                        } else if(var4 == 1) {
                           class93.Tiles_underlays2[var0][var1 + 1][var2 + 1] = 50;
                        } else if(var4 == 2) {
                           class93.Tiles_underlays2[var0][var1 + 1][var2] = 50;
                        } else if(var4 == 3) {
                           class93.Tiles_underlays2[var0][var1][var2] = 50;
                        }
                     }

                     if(var9.interactType != 0 && var7 != null) {
                        var7.method4349_base(var1, var2, var5, var4, var9.boolean1);
                     }

                  } else if(var5 == 9) {
                     if(var9.animationId == -1 && var9.transforms == null) {
                        var23 = var9.method3894(var5, var4, var16, var18, var17, var19);
                     } else {
                        var23 = new DynamicObject(var3, var5, var4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                     }

                     var6.method5334(var0, var1, var2, var17, 1, 1, (Renderable)var23, 0, var20, var22);
                     if(var9.interactType != 0 && var7 != null) {
                        var7.addGameObject_base(var1, var2, var10, var11, var9.boolean1);
                     }

                     if(var9.int2 != 16) {
                        var6.method5340_base(var0, var1, var2, var9.int2);
                     }

                  } else if(var5 == 4) {
                     if(var9.animationId == -1 && var9.transforms == null) {
                        var23 = var9.method3894(4, var4, var16, var18, var17, var19);
                     } else {
                        var23 = new DynamicObject(var3, 4, var4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                     }

                     var6.method5333(var0, var1, var2, var17, (Renderable)var23, (Renderable)null, Tiles.field1006[var4], 0, 0, 0, var20, var22);
                  } else {
                     long var32;
                     Object var34;
                     if(var5 == 5) {
                        var29 = 16;
                        var32 = var6.getBoundaryObjectTag_base(var0, var1, var2);
                        if(0L != var32) {
                           var29 = WorldMapSection2.method4515(class232.Entity_unpackID_base(var32)).int2;
                        }

                        if(var9.animationId == -1 && var9.transforms == null) {
                           var34 = var9.method3894(4, var4, var16, var18, var17, var19);
                        } else {
                           var34 = new DynamicObject(var3, 4, var4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                        }

                        var6.method5333(var0, var1, var2, var17, (Renderable)var34, (Renderable)null, Tiles.field1006[var4], 0, var29 * Tiles.field1010[var4], var29 * Tiles.field1007[var4], var20, var22);
                     } else if(var5 == 6) {
                        var29 = 8;
                        var32 = var6.getBoundaryObjectTag_base(var0, var1, var2);
                        if(var32 != 0L) {
                           var29 = WorldMapSection2.method4515(class232.Entity_unpackID_base(var32)).int2 / 2;
                        }

                        if(var9.animationId == -1 && var9.transforms == null) {
                           var34 = var9.method3894(4, var4 + 4, var16, var18, var17, var19);
                        } else {
                           var34 = new DynamicObject(var3, 4, var4 + 4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                        }

                        var6.method5333(var0, var1, var2, var17, (Renderable)var34, (Renderable)null, 256, var4, var29 * Tiles.field1008[var4], var29 * Tiles.field1009[var4], var20, var22);
                     } else if(var5 == 7) {
                        var24 = var4 + 2 & 3;
                        if(var9.animationId == -1 && var9.transforms == null) {
                           var23 = var9.method3894(4, var24 + 4, var16, var18, var17, var19);
                        } else {
                           var23 = new DynamicObject(var3, 4, var24 + 4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                        }

                        var6.method5333(var0, var1, var2, var17, (Renderable)var23, (Renderable)null, 256, var24, 0, 0, var20, var22);
                     } else if(var5 == 8) {
                        var29 = 8;
                        var32 = var6.getBoundaryObjectTag_base(var0, var1, var2);
                        if(var32 != 0L) {
                           var29 = WorldMapSection2.method4515(class232.Entity_unpackID_base(var32)).int2 / 2;
                        }

                        int var28 = var4 + 2 & 3;
                        Object var27;
                        if(var9.animationId == -1 && var9.transforms == null) {
                           var34 = var9.method3894(4, var4 + 4, var16, var18, var17, var19);
                           var27 = var9.method3894(4, var28 + 4, var16, var18, var17, var19);
                        } else {
                           var34 = new DynamicObject(var3, 4, var4 + 4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                           var27 = new DynamicObject(var3, 4, var28 + 4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
                        }

                        var6.method5333(var0, var1, var2, var17, (Renderable)var34, (Renderable)var27, 256, var4, var29 * Tiles.field1008[var4], var29 * Tiles.field1009[var4], var20, var22);
                     }
                  }
               }
            } else {
               if(var9.animationId == -1 && var9.transforms == null) {
                  var23 = var9.method3894(10, var4, var16, var18, var17, var19);
               } else {
                  var23 = new DynamicObject(var3, 10, var4, var0, var1, var2, var9.animationId, var9.boolean3, (Renderable)null);
               }

               if(var23 != null && var6.method5334(var0, var1, var2, var17, var10, var11, (Renderable)var23, var5 == 11?256:0, var20, var22) && var9.clipped) {
                  var24 = 15;
                  if(var23 instanceof Model) {
                     var24 = ((Model)var23).method5569_base() / 4;
                     if(var24 > 30) {
                        var24 = 30;
                     }
                  }

                  for(int var25 = 0; var25 <= var10; ++var25) {
                     for(int var26 = 0; var26 <= var11; ++var26) {
                        if(var24 > class93.Tiles_underlays2[var0][var25 + var1][var26 + var2]) {
                           class93.Tiles_underlays2[var0][var25 + var1][var26 + var2] = (byte)var24;
                        }
                     }
                  }
               }

               if(var9.interactType != 0 && var7 != null) {
                  var7.addGameObject_base(var1, var2, var10, var11, var9.boolean1);
               }

            }
         }
      }
   }

   public static RSFloorOverlayDefinition loadFloorOverlay(int var0) {
      RSFloorOverlayDefinition var1 = (RSFloorOverlayDefinition)SpriteMask.client.getFloorOverlayDefinitionCache().get((long)var0);
      if(var1 == null) {
         byte[] var2 = SpriteMask.client.getFloorOverlayDefinitionArchive().loadData(4, var0);
         var1 = SpriteMask.client.newFloorOverlayDefinition();
         if(var2 != null) {
            RSBuffer var3 = SpriteMask.client.newBuffer(var2);
            var1.decode(var3, var0);
         }

         var1.postDecode();
         SpriteMask.client.getFloorOverlayDefinitionCache().put((RSDualNode)var1, (long)var0);
      }

      return var1;
   }

   public static void onCurrentClanChannelsChanged(int var0) {
      RSClanChannel[] var1 = SpriteMask.client.getCurrentClanChannels();
      if(var0 >= 0 && var0 < var1.length) {
         RSClanChannel var2 = var1[var0];
         SpriteMask.client.getCallbacks().post(new ClanChannelChanged(var2, var0, false));
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onGuestClanChannelChanged(int var0) {
      SpriteMask.client.getCallbacks().post(new ClanChannelChanged(SpriteMask.client.getGuestClanChannel(), -1, true));
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onCameraPitchChanged(int var0) {
      int var1 = SpriteMask.client.getCameraPitch();
      int var2 = var1;
      if(pitchRelaxEnabled && lastPitch > 383 && var1 == 383) {
         var2 = lastPitch;
         if(var2 > 512) {
            var2 = 512;
         }

         SpriteMask.client.setCameraPitch(var2);
      }

      lastPitch = var2;
   }

   public static void experiencedChanged(int var0) {
      Skill[] var1 = Skill.values();
      if(var0 < var1.length) {
         Skill var2 = var1[var0];
         StatChanged var3 = new StatChanged(var2, SpriteMask.client.getSkillExperience(var2), SpriteMask.client.getRealSkillLevel(var2), SpriteMask.client.getBoostedSkillLevel(var2));
         SpriteMask.client.getCallbacks().post(var3);
      }

   }

   public static void boostedSkillLevelsChanged(int var0) {
      if(var0 != -1) {
         int var1 = var0 - 1 & 31;
         int var2 = SpriteMask.client.getChangedSkillLevels()[var1];
         Skill[] var3 = Skill.values();
         if(var2 >= 0 && var2 < var3.length) {
            StatChanged var4 = new StatChanged(var3[var2], SpriteMask.client.getSkillExperiences()[var2], SpriteMask.client.getRealSkillLevels()[var2], SpriteMask.client.getBoostedSkillLevels()[var2]);
            SpriteMask.client.getCallbacks().post(var4);
         }

      }
   }

   @ObfuscatedSignature(
      descriptor = "(IIIII)V",
      garbageValue = "0"
   )
   public static void clearColorBuffer(int var0, int var1, int var2, int var3, int var4) {
      RSAbstractRasterProvider var5 = SpriteMask.client.getBufferProvider();
      int var6 = var5.getWidth();
      int[] var7 = var5.getPixels();
      int var8 = var0 + var6 * var1;
      int var9 = var6 - var2;

      for(int var10 = var1; var10 < var3 + var1; ++var10) {
         for(int var11 = var0; var11 < var0 + var2; ++var11) {
            var7[var8++] = 0;
         }

         var8 += var9;
      }

   }

   @ObfuscatedSignature(
      descriptor = "(II)V",
      garbageValue = "-577406943"
   )
   public static final void copy$forceDisconnect(int var0, int var1) {
      class13.logOut_base();
      switch(var0) {
      case 1:
         UserComparator7.method2966_base(24);
         class139.setLoginResponseString_base("", "You were disconnected from the server.", "");
         break;
      case 2:
         CollisionMap.method4354_base();
      }

   }

   @ObfuscatedSignature(
      descriptor = "(Lnn;III)V",
      garbageValue = "-1252967897"
   )
   public static final void copy$checkIfMinimapClicked(Widget var0, int var1, int var2, int var3) {
      if(minimapState == 0 || minimapState == 3) {
         if(!isMenuOpen && (MouseHandler.MouseHandler_lastButton == 1 || !class19.mouseCam && MouseHandler.MouseHandler_lastButton == 4)) {
            SpriteMask var4 = var0.method6670(HealthBarDefinition.widgetDefinition, true);
            if(var4 == null) {
               return;
            }

            int var5 = MouseHandler.MouseHandler_lastPressedX - var1;
            int var6 = MouseHandler.MouseHandler_lastPressedY - var2;
            if(var4.contains_base(var5, var6)) {
               var5 -= var4.width / 2;
               var6 -= var4.height / 2;
               int var7 = camAngleY & 2047;
               int var8 = Rasterizer3D.Rasterizer3D_sine[var7];
               int var9 = Rasterizer3D.Rasterizer3D_cosine[var7];
               int var10 = var5 * var9 + var6 * var8 >> 11;
               int var11 = var6 * var9 - var8 * var5 >> 11;
               int var12 = var10 + class229.localPlayer.x >> 7;
               int var13 = class229.localPlayer.y - var11 >> 7;
               PacketBufferNode var14 = class113.method2919(ClientPacket.MOVE_MINIMAPCLICK, packetWriter.isaacCipher);
               var14.packetBuffer.writeByte_base(18);
               var14.packetBuffer.writeShort_base(var12 + NpcOverrides.baseX);
               var14.packetBuffer.writeShortLE_base(var13 + class101.baseY);
               var14.packetBuffer.writeByteSub_base(field724.method4316_base(82)?(field724.method4316_base(81)?2:1):0);
               var14.packetBuffer.writeByte_base(var5);
               var14.packetBuffer.writeByte_base(var6);
               var14.packetBuffer.writeShort_base(camAngleY);
               var14.packetBuffer.writeByte_base(57);
               var14.packetBuffer.writeByte_base(0);
               var14.packetBuffer.writeByte_base(0);
               var14.packetBuffer.writeByte_base(89);
               var14.packetBuffer.writeShort_base(class229.localPlayer.x);
               var14.packetBuffer.writeShort_base(class229.localPlayer.y);
               var14.packetBuffer.writeByte_base(63);
               packetWriter.method2867(var14);
               destinationX = var12;
               destinationY = var13;
            }
         }

      }
   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onCamAngleDXChange(int var0) {
      if(invertPitch && SpriteMask.client.getMouseCurrentButton() == 4 && SpriteMask.client.isMouseCam()) {
         SpriteMask.client.setCamAngleDX(-SpriteMask.client.getCamAngleDX());
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onCamAngleDYChange(int var0) {
      if(invertYaw && SpriteMask.client.getMouseCurrentButton() == 4 && SpriteMask.client.isMouseCam()) {
         SpriteMask.client.setCamAngleDY(-SpriteMask.client.getCamAngleDY());
      }

   }

   @ObfuscatedSignature(
      descriptor = "(I)V",
      garbageValue = "-1"
   )
   public static void onCameraPitchTargetChanged(int var0) {
      int var1 = SpriteMask.client.getCameraPitchTarget();
      int var2 = var1;
      if(pitchRelaxEnabled && lastPitchTarget > 383 && var1 == 383) {
         var2 = lastPitchTarget;
         if(var2 > 512) {
            var2 = 512;
         }

         SpriteMask.client.setCameraPitchTarget(var2);
      }

      lastPitchTarget = var2;
   }

   @ObfuscatedSignature(
      descriptor = "(Ljava/lang/String;ZB)V",
      garbageValue = "99"
   )
   public static void copy$findItemDefinitions(String var0, boolean var1, byte var2) {
      var0 = var0.toLowerCase();
      short[] var3 = new short[16];
      int var4 = 0;

      for(int var5 = 0; var5 < ItemComposition.ItemDefinition_fileCount; ++var5) {
         ItemComposition var6 = class214.method4226(var5);
         if((!var1 || var6.isTradable) && var6.noteTemplate == -1 && var6.name.toLowerCase().indexOf(var0) != -1) {
            if(var4 >= 250) {
               BuddyRankComparator.foundItemIdCount = -1;
               MusicPatchNode.foundItemIds = null;
               return;
            }

            if(var4 >= var3.length) {
               short[] var7 = new short[var3.length * 2];

               for(int var8 = 0; var8 < var4; ++var8) {
                  var7[var8] = var3[var8];
               }

               var3 = var7;
            }

            var3[var4++] = (short)var5;
         }
      }

      MusicPatchNode.foundItemIds = var3;
      ApproximateRouteStrategy.foundItemIndex = 0;
      BuddyRankComparator.foundItemIdCount = var4;
      String[] var9 = new String[BuddyRankComparator.foundItemIdCount];

      for(int var10 = 0; var10 < BuddyRankComparator.foundItemIdCount; ++var10) {
         var9[var10] = class214.method4226(var3[var10]).name;
      }

      class215.method4229_base(var9, MusicPatchNode.foundItemIds);
   }

   public static void swapMenuEntries(int var0) {
      RSRuneLiteMenuEntry var1 = rl$menuEntries[var0];
      RSRuneLiteMenuEntry var2 = rl$menuEntries[var0 + 1];
      if(!$assertionsDisabled && var1.getIdx() != var0) {
         throw new AssertionError();
      } else if(!$assertionsDisabled && var2.getIdx() != var0 + 1) {
         throw new AssertionError();
      } else {
         rl$menuEntries[var0] = var2;
         rl$menuEntries[var0 + 1] = var1;
         var1.setIdx(var0 + 1);
         var2.setIdx(var0);
      }
   }

   public static RSRuneLiteClanMember runeLiteClanMember() {
      throw new RuntimeException();
   }

   public NodeCache getItemModelCache() {
      return ItemComposition.ItemDefinition_cachedModels;
   }

   public NodeCache getItemSpriteCache() {
      return ItemComposition.ItemDefinition_cachedSprites;
   }

   public boolean isMenuScrollable() {
      return false; //TODO not implemented
   }

   public int getMenuScroll() {
      return 0; //TODO not implemented
   }

   public void setMenuScroll(int var1) {
      //TODO not implemented
   }

   @Override
   public DBRowConfig getDBRowConfig(int rowID) {
      return (DBRowConfig) getDbRowType(rowID);
   }

   public int getItemPressedDuration() {
      return 0; //Depracated
   }
}
