util: Access levels
This commit is contained in:
@@ -36,7 +36,7 @@ public class PvPUtil
|
|||||||
* @param point the point in the world to get the wilderness level for
|
* @param point the point in the world to get the wilderness level for
|
||||||
* @return the int representing the wilderness level
|
* @return the int representing the wilderness level
|
||||||
*/
|
*/
|
||||||
public static int getWildernessLevelFrom(WorldPoint point)
|
private static int getWildernessLevelFrom(WorldPoint point)
|
||||||
{
|
{
|
||||||
int y = point.getY();
|
int y = point.getY();
|
||||||
|
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ import org.objectweb.asm.tree.AnnotationNode;
|
|||||||
import org.objectweb.asm.tree.FieldNode;
|
import org.objectweb.asm.tree.FieldNode;
|
||||||
import org.objectweb.asm.tree.MethodNode;
|
import org.objectweb.asm.tree.MethodNode;
|
||||||
|
|
||||||
public class RefUtils implements Opcodes
|
class RefUtils implements Opcodes
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final String TYPE_PREFIX = "us/runelitepl/mixinprocessor/annotations/";
|
private static final String TYPE_PREFIX = "us/runelitepl/mixinprocessor/annotations/";
|
||||||
|
|
||||||
public static boolean isReturn(int opcode, boolean checkType)
|
private static boolean isReturn(int opcode, boolean checkType)
|
||||||
{
|
{
|
||||||
return (opcode == RETURN && !checkType) || opcode == IRETURN || opcode == LRETURN || opcode == DRETURN ||
|
return (opcode == RETURN && !checkType) || opcode == IRETURN || opcode == LRETURN || opcode == DRETURN ||
|
||||||
opcode == ARETURN || opcode == FRETURN;
|
opcode == ARETURN || opcode == FRETURN;
|
||||||
@@ -76,7 +76,7 @@ public class RefUtils implements Opcodes
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String makeAnnotationDesc(String annot)
|
private static String makeAnnotationDesc(String annot)
|
||||||
{
|
{
|
||||||
return "L" + TYPE_PREFIX + annot + ";";
|
return "L" + TYPE_PREFIX + annot + ";";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class SwingUtil
|
|||||||
* Sets some sensible defaults for swing.
|
* Sets some sensible defaults for swing.
|
||||||
* IMPORTANT! Needs to be called before main frame creation
|
* IMPORTANT! Needs to be called before main frame creation
|
||||||
*/
|
*/
|
||||||
public static void setupDefaults()
|
private static void setupDefaults()
|
||||||
{
|
{
|
||||||
// Force heavy-weight popups/tooltips.
|
// Force heavy-weight popups/tooltips.
|
||||||
// Prevents them from being obscured by the game applet.
|
// Prevents them from being obscured by the game applet.
|
||||||
@@ -117,7 +117,7 @@ public class SwingUtil
|
|||||||
*
|
*
|
||||||
* @param laf the swing look and feel
|
* @param laf the swing look and feel
|
||||||
*/
|
*/
|
||||||
public static void setTheme(@Nonnull final LookAndFeel laf)
|
private static void setTheme(@Nonnull final LookAndFeel laf)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -135,7 +135,7 @@ public class SwingUtil
|
|||||||
*
|
*
|
||||||
* @param font the new font to use
|
* @param font the new font to use
|
||||||
*/
|
*/
|
||||||
public static void setFont(@Nonnull final Font font)
|
private static void setFont(@Nonnull final Font font)
|
||||||
{
|
{
|
||||||
final FontUIResource f = new FontUIResource(font);
|
final FontUIResource f = new FontUIResource(font);
|
||||||
final Enumeration keys = UIManager.getDefaults().keys();
|
final Enumeration keys = UIManager.getDefaults().keys();
|
||||||
|
|||||||
@@ -77,12 +77,12 @@ public enum WildernessLocation
|
|||||||
this.worldArea = new WorldArea(location.x, location.y, location.width, location.height, plane);
|
this.worldArea = new WorldArea(location.x, location.y, location.width, location.height, plane);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Location
|
static class Location
|
||||||
{
|
{
|
||||||
public final int x;
|
final int x;
|
||||||
public final int y;
|
final int y;
|
||||||
public final int width;
|
final int width;
|
||||||
public final int height;
|
final int height;
|
||||||
|
|
||||||
Location(int x, int y, int x1, int y1)
|
Location(int x, int y, int x1, int y1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ import com.sun.jna.platform.win32.WinDef;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class IcmpEchoReply extends Structure
|
class IcmpEchoReply extends Structure
|
||||||
{
|
{
|
||||||
private static final int IP_OPTION_INFO_SIZE = 1 + 1 + 1 + 1 + (Pointer.SIZE == 8 ? 12 : 4); // on 64bit vms add 4 byte padding
|
private static final int IP_OPTION_INFO_SIZE = 1 + 1 + 1 + 1 + (Pointer.SIZE == 8 ? 12 : 4); // on 64bit vms add 4 byte padding
|
||||||
public static final int SIZE = 4 + 4 + 4 + 2 + 2 + Pointer.SIZE + IP_OPTION_INFO_SIZE;
|
public static final int SIZE = 4 + 4 + 4 + 2 + 2 + Pointer.SIZE + IP_OPTION_INFO_SIZE;
|
||||||
|
|||||||
Reference in New Issue
Block a user