mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-07 08:39:13 +00:00
Reflection support for accessors (wrappers)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package org.rev317.min.api.wrappers;
|
package org.rev317.min.api.wrappers;
|
||||||
|
|
||||||
|
import org.parabot.core.reflect.RefClass;
|
||||||
import org.rev317.min.Loader;
|
import org.rev317.min.Loader;
|
||||||
import org.rev317.min.api.interfaces.Locatable;
|
import org.rev317.min.api.interfaces.Locatable;
|
||||||
import org.rev317.min.api.methods.Calculations;
|
import org.rev317.min.api.methods.Calculations;
|
||||||
@@ -144,6 +145,14 @@ public class Character implements Locatable {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the accessor class
|
||||||
|
* @return RefClass of accessor
|
||||||
|
*/
|
||||||
|
public RefClass getRefClass() {
|
||||||
|
return new RefClass(this.accessor);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.rev317.min.api.wrappers;
|
package org.rev317.min.api.wrappers;
|
||||||
|
|
||||||
|
import org.parabot.core.reflect.RefClass;
|
||||||
import org.rev317.min.api.interfaces.Locatable;
|
import org.rev317.min.api.interfaces.Locatable;
|
||||||
import org.rev317.min.api.methods.Calculations;
|
import org.rev317.min.api.methods.Calculations;
|
||||||
import org.rev317.min.api.methods.Game;
|
import org.rev317.min.api.methods.Game;
|
||||||
@@ -75,5 +76,13 @@ public class GroundItem implements Locatable {
|
|||||||
public int getId() {
|
public int getId() {
|
||||||
return accessor.getId();
|
return accessor.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the accessor class
|
||||||
|
* @return RefClass of accessor
|
||||||
|
*/
|
||||||
|
public RefClass getRefClass() {
|
||||||
|
return new RefClass(this.accessor);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package org.rev317.min.api.wrappers;
|
package org.rev317.min.api.wrappers;
|
||||||
|
|
||||||
|
import org.parabot.core.reflect.RefClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Everel
|
* @author Everel
|
||||||
@@ -21,5 +23,13 @@ public final class Npc extends Character {
|
|||||||
public final NpcDef getDef() {
|
public final NpcDef getDef() {
|
||||||
return new NpcDef(this.accessor.getDef());
|
return new NpcDef(this.accessor.getDef());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the accessor class
|
||||||
|
* @return RefClass of accessor
|
||||||
|
*/
|
||||||
|
public RefClass getRefClass() {
|
||||||
|
return new RefClass(this.accessor);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package org.rev317.min.api.wrappers;
|
package org.rev317.min.api.wrappers;
|
||||||
|
|
||||||
|
import org.parabot.core.reflect.RefClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Everel
|
* @author Everel
|
||||||
@@ -19,6 +21,14 @@ public class NpcDef {
|
|||||||
public int getId() {
|
public int getId() {
|
||||||
return accessor.getId();
|
return accessor.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the accessor class
|
||||||
|
* @return RefClass of accessor
|
||||||
|
*/
|
||||||
|
public RefClass getRefClass() {
|
||||||
|
return new RefClass(this.accessor);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.rev317.min.api.wrappers;
|
package org.rev317.min.api.wrappers;
|
||||||
|
|
||||||
|
import org.parabot.core.reflect.RefClass;
|
||||||
import org.rev317.min.accessors.SceneObjectTile;
|
import org.rev317.min.accessors.SceneObjectTile;
|
||||||
import org.rev317.min.api.interfaces.Locatable;
|
import org.rev317.min.api.interfaces.Locatable;
|
||||||
import org.rev317.min.api.methods.Calculations;
|
import org.rev317.min.api.methods.Calculations;
|
||||||
@@ -93,6 +94,14 @@ public class SceneObject implements Locatable {
|
|||||||
Menu.interact(this, actionIndex);
|
Menu.interact(this, actionIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the accessor class
|
||||||
|
* @return RefClass of accessor
|
||||||
|
*/
|
||||||
|
public RefClass getRefClass() {
|
||||||
|
return new RefClass(this.accessor);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("[ID: %d, X: %d, Y: %d]", getId(), getLocalRegionX(), getLocalRegionY());
|
return String.format("[ID: %d, X: %d, Y: %d]", getId(), getLocalRegionX(), getLocalRegionY());
|
||||||
|
|||||||
Reference in New Issue
Block a user