checkstyle - extended-mixins

This commit is contained in:
Lucas
2019-05-17 03:32:42 +02:00
parent 7740b7a85e
commit 60e92469dd
4 changed files with 73 additions and 74 deletions

View File

@@ -41,170 +41,170 @@ import java.util.List;
public class Client public class Client
{ {
@Provided @Provided
public static boolean isHidingEntities; public static boolean isHidingEntities;
@Provided @Provided
public static boolean hideLocalPlayer2D; public static boolean hideLocalPlayer2D;
@Provided @Provided
public static boolean hideLocalPlayer; public static boolean hideLocalPlayer;
@Provided @Provided
public static boolean hidePlayers2D; public static boolean hidePlayers2D;
@Provided @Provided
public static boolean hidePlayers; public static boolean hidePlayers;
@Provided @Provided
public static boolean hideAttackers; public static boolean hideAttackers;
@Provided @Provided
public static boolean hideProjectiles; public static boolean hideProjectiles;
@Provided @Provided
public static boolean hideNPCs2D; public static boolean hideNPCs2D;
@Provided @Provided
public static boolean hideNPCs; public static boolean hideNPCs;
@Provided @Provided
public static boolean hideFriends; public static boolean hideFriends;
@Provided @Provided
public static boolean hideClanMates; public static boolean hideClanMates;
@Inject @Inject
public static Client INSTANCE; public static Client INSTANCE;
@Inject @Inject
public static boolean printMenuActions; public static boolean printMenuActions;
@Provided @Provided
public static int oldMenuEntryCount; public static int oldMenuEntryCount;
@Reobfuscate @Reobfuscate
@Provided @Provided
static boolean renderSelf; static boolean renderSelf;
@Provided @Provided
public static final int[] rl$modelViewportXs = new int[0]; public static final int[] rl$modelViewportXs = new int[0];
@Provided @Provided
public static final int[] rl$modelViewportYs = new int[0]; public static final int[] rl$modelViewportYs = new int[0];
@Prepend @Prepend
private void prepend$rl$$init() private void prepend$rl$$init()
{ {
INSTANCE = this; INSTANCE = this;
printMenuActions = false; printMenuActions = false;
} }
@Inject @Inject
public void toggleRenderSelf() public void toggleRenderSelf()
{ {
renderSelf = !renderSelf; renderSelf = !renderSelf;
} }
@Provided @Provided
public int getMenuOptionCount() public int getMenuOptionCount()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public String[] getMenuOptions() public String[] getMenuOptions()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public String[] getMenuTargets() public String[] getMenuTargets()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int[] getMenuIdentifiers() public int[] getMenuIdentifiers()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int[] getMenuTypes() public int[] getMenuTypes()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int[] getMenuActionParams0() public int[] getMenuActionParams0()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int[] getMenuActionParams1() public int[] getMenuActionParams1()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public boolean[] getMenuForceLeftClick() public boolean[] getMenuForceLeftClick()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public void setMenuOptionCount(int i) public void setMenuOptionCount(int i)
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public Callbacks getCallbacks() public Callbacks getCallbacks()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public RSCollisionData[] getRsCollisionMaps() public RSCollisionData[] getRsCollisionMaps()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public RSDeque getProjectilesDeque() public RSDeque getProjectilesDeque()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Overwrite @Overwrite
public List getProjectiles() public List getProjectiles()
{ {
List list = new java.util.ArrayList(); List list = new java.util.ArrayList();
RSNode head = getProjectilesDeque().getHead(); RSNode head = getProjectilesDeque().getHead();
for (Node node = ((Node) head).getNext(); for (Node node = ((Node) head).getNext();
node != head; node != head;
node = node.getNext()) node = node.getNext())
{ {
list.add(node); list.add(node);
} }
return list; return list;
} }
@Inject @Inject
public void setPrintMenuActions(boolean b) public void setPrintMenuActions(boolean b)
{ {
printMenuActions = b; printMenuActions = b;
} }
@Overwrite @Overwrite
public RSCollisionData[] getCollisionMaps() public RSCollisionData[] getCollisionMaps()
{ {
return getRsCollisionMaps(); return getRsCollisionMaps();
} }
@Overwrite @Overwrite
public void setMenuEntries(MenuEntry[] arrmenuEntry) public void setMenuEntries(MenuEntry[] arrmenuEntry)
{ {
@@ -242,7 +242,7 @@ public class Client
} }
while (true); while (true);
} }
@Overwrite @Overwrite
public static void onMenuOptionsChanged(int n2) public static void onMenuOptionsChanged(int n2)
{ {
@@ -254,28 +254,28 @@ public class Client
return; return;
} }
net.runelite.api.events.MenuEntryAdded menuEntryAdded = net.runelite.api.events.MenuEntryAdded menuEntryAdded =
new net.runelite.api.events.MenuEntryAdded(INSTANCE.getMenuOptions()[n3 - 1], new net.runelite.api.events.MenuEntryAdded(INSTANCE.getMenuOptions()[n3 - 1],
INSTANCE.getMenuTargets()[n3 - 1], INSTANCE.getMenuTargets()[n3 - 1],
INSTANCE.getMenuTypes()[n3 - 1], INSTANCE.getMenuTypes()[n3 - 1],
INSTANCE.getMenuIdentifiers()[n3 - 1], INSTANCE.getMenuIdentifiers()[n3 - 1],
INSTANCE.getMenuActionParams0()[n3 - 1], INSTANCE.getMenuActionParams0()[n3 - 1],
INSTANCE.getMenuActionParams1()[n3 - 1]); INSTANCE.getMenuActionParams1()[n3 - 1]);
INSTANCE.getCallbacks().post(menuEntryAdded); INSTANCE.getCallbacks().post(menuEntryAdded);
} }
@Overwrite @Overwrite
public static void copy$processClientError(String s, Throwable e, byte b) public static void copy$processClientError(String s, Throwable e, byte b)
{ {
System.err.println("[RL+] Error thrown: " + s); System.err.println("[RL+] Error thrown: " + s);
e.printStackTrace(); e.printStackTrace();
} }
@Inject @Inject
public net.runelite.api.MouseRecorder getMouseRecorder() public net.runelite.api.MouseRecorder getMouseRecorder()
{ {
return _Statics_.mouseRecorder; return _Statics_.mouseRecorder;
} }
@Inject @Inject
public boolean boundingboxCheck2(net.runelite.api.Model model, int n2, int n3, int n4) public boolean boundingboxCheck2(net.runelite.api.Model model, int n2, int n3, int n4)
{ {
@@ -349,7 +349,7 @@ public class Client
} }
return false; return false;
} }
@Overwrite @Overwrite
public void checkClickbox(net.runelite.api.Model model, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, long l2) public void checkClickbox(net.runelite.api.Model model, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, long l2)
{ {
@@ -441,10 +441,10 @@ public class Client
int n29 = rl$modelViewportXs[n10]; int n29 = rl$modelViewportXs[n10];
int n30 = rl$modelViewportXs[n24]; int n30 = rl$modelViewportXs[n24];
if (n25 != -5000 && n26 != -5000 && n27 != -5000 && (bl5 = (n23 = (n22 = rSModel.isClickable() ? 20 if (n25 != -5000 && n26 != -5000 && n27 != -5000 && (bl5 = (n23 = (n22 = rSModel.isClickable() ? 20
: 5) + n11) < n28 && n23 < n29 && n23 < n30 ? false : 5) + n11) < n28 && n23 < n29 && n23 < n30 ? false
: ((n23 = n11 - n22) > n28 && n23 > n29 && n23 > n30 ? false : ((n23 = n11 - n22) > n28 && n23 > n29 && n23 > n30 ? false
: ((n23 = n22 + n14) < n25 && n23 < n26 && n23 < n27 ? false : ((n23 = n22 + n14) < n25 && n23 < n26 && n23 < n27 ? false
: (n23 = n14 - n22) <= n25 || n23 <= n26 || n23 <= n27)))) : (n23 = n14 - n22) <= n25 || n23 <= n26 || n23 <= n27))))
{ {
this.addHashAtMouse(l2); this.addHashAtMouse(l2);
return; return;
@@ -453,91 +453,90 @@ public class Client
++n13; ++n13;
} }
} }
@Provided @Provided
public boolean getViewportContainsMouse() public boolean getViewportContainsMouse()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public void addHashAtMouse(long l) public void addHashAtMouse(long l)
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int getCameraPitch() public int getCameraPitch()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int getCameraYaw() public int getCameraYaw()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int getCenterX() public int getCenterX()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int getCenterY() public int getCenterY()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int getViewportMouseX() public int getViewportMouseX()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int getViewportMouseY() public int getViewportMouseY()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public int get3dZoom() public int get3dZoom()
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public static int rl$rot1(int a, int b, int c, int d) public static int rl$rot1(int a, int b, int c, int d)
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public static int rl$rot2(int a, int b, int c, int d) public static int rl$rot2(int a, int b, int c, int d)
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public static int rl$rot3(int a, int b, int c, int d) public static int rl$rot3(int a, int b, int c, int d)
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Provided @Provided
public static int rl$rot4(int a, int b, int c, int d) public static int rl$rot4(int a, int b, int c, int d)
{ {
throw new RuntimeException(); throw new RuntimeException();
} }
@Inject @Inject
public void invokeMenuAction(int actionParam, int widgetId, int opcode, int targetId, String menuOption, public void invokeMenuAction(int actionParam, int widgetId, int opcode, int targetId, String menuOption, String menuTarget, int mouseX, int mouseY)
String menuTarget, int mouseX, int mouseY)
{ {
_Statics_.menuAction(actionParam, widgetId, opcode, targetId, menuOption, _Statics_.menuAction(actionParam, widgetId, opcode, targetId, menuOption,
menuTarget, mouseX, mouseY); menuTarget, mouseX, mouseY);
} }
} }

View File

@@ -51,7 +51,7 @@ public class Player
@Overwrite @Overwrite
public SkullIcon getSkullIcon() public SkullIcon getSkullIcon()
{ {
switch(getHeadIconPk()) switch (getHeadIconPk())
{ {
case 0: case 0:
return SkullIcon.SKULL; return SkullIcon.SKULL;

View File

@@ -43,10 +43,10 @@ public class Scene
return true; return true;
} }
if(renderable instanceof RSPlayer) if (renderable instanceof RSPlayer)
{ {
RSPlayer p = (RSPlayer) renderable; RSPlayer p = (RSPlayer) renderable;
if(Client.hideClanMates && p.isClanMember()) if (Client.hideClanMates && p.isClanMember())
{ {
return false; return false;
} }

View File

@@ -41,10 +41,10 @@ public class _Statics_
static final void prepend$menuAction(int actionParam, int widgetId, int opcode, int targetId, String menuOption, static final void prepend$menuAction(int actionParam, int widgetId, int opcode, int targetId, String menuOption,
String menuTarget, int mouseX, int mouseY) String menuTarget, int mouseX, int mouseY)
{ {
if(Client.printMenuActions) if (Client.printMenuActions)
{ {
int printOpcode = opcode; int printOpcode = opcode;
if(opcode >= 2000) if (opcode >= 2000)
{ {
printOpcode -= 2000; printOpcode -= 2000;
} }