mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-07 16:49:11 +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;
|
||||||
@@ -145,6 +146,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() {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -76,4 +77,12 @@ public class GroundItem implements Locatable {
|
|||||||
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
|
||||||
@@ -22,4 +24,12 @@ public final class Npc extends Character {
|
|||||||
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
|
||||||
@@ -20,5 +22,13 @@ public class NpcDef {
|
|||||||
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