可用函数的javadocs可以在http://tslat.net/Hosting/Tslat-AoA/javadocs找到。
如果某条为函数,则其后附带()
字样。如果为对象,则为{}
,否则不加符号后缀。
consumeResource()
作用
|
消耗指定玩家指定资源类型的资源值。如果 forceConsume = true ,建议先检查玩家的资源值是否充足。 若没有检查且玩家并没有剩余足够的资源值,函数可能会返回一个无法分辨的假结果。
|
参数
|
resource
|
String 指定资源名称。资源名称必须全大写!
|
amount
|
float 指定要消耗资源的值。允许的最小值为0。
|
forceConsume
|
boolean 指定当玩家资源值不足时是否仍然消耗。
|
player
|
EntityPlayer 指定目标玩家。
|
返回
|
boolean 代表函数是否成功执行。当forceConsume为true且指定资源资源值不足时,函数会将指定资源消耗至0并将之视为正常执行。 当函数无法找到指定资源或因其他原因出错时返回false。
|
public static boolean consumeResource(String resource, float amount, boolean forceConsume, EntityPlayer player)
endRevenge()
作用
|
终止目标玩家的复仇。
|
参数
|
player
|
EntityPlayer 指定目标玩家。
|
返回
|
void 无
|
public static void endRevenge(EntityPlayer player)
getArmourSet()
作用
|
当适用时,返回目标玩家的盔甲盔甲名称。 只会返回整套的盔甲的名称,若包含有不属于整套的盔甲将会出错。
|
参数
|
player
|
EntityPlayer 指定目标玩家
|
返回
|
String 一个 @Nonnull (非空) 字符串对象,当适用时代表玩家当前的盔甲盔甲。任何其他情况都会返回空字符串。
|
public static String getArmourSet(EntityPlayer player)
getClientResourceValue()
作用
|
返回指定玩家指定资源的资源值。仅客户端。客户端的数据永远没有服务器端的准确。
|
参数
|
resource
|
String 指定资源名称。资源名称必须全大写!
|
返回
|
float 当前玩家指定资源的资源值。
|
@SideOnly(Side.CLIENT)
public static float getClientResourceValue(String resource)
getClientSkillLevel()
作用
|
返回当前玩家指定技能的等级。除非函数出错,否则会返回介于(包括)1至1000之间的值。 本函数仅客户端可用。
|
参数
|
skillName
|
String 指定技能名称。技能名称必须全大写!
|
includeVanityLevels
|
boolean to decide whether the method should return vanity levels or not. Also takes into account whether the player is currently viewing vanity levels.
|
返回
|
int 当前技能等级。当函数无法根据名称找到目标技能或因其他因素导致函数出错时返回-1。
|
@SideOnly(Side.CLIENT)
public static int getClientSkillLevel(String skillName, boolean includeVanityLevels)
getClientSkillXp()
作用
|
返回指定玩家指定技能的经验值。仅客户端可用。
|
参数
|
skillName
|
String 指定目标技能。技能名称必须全大写!
|
返回
|
float 代表指定玩家指定技能的经验值的浮点数。当函数找不到目标技能或因其他原因出错时返回-1。
|
@SideOnly(Side.CLIENT)
public static float getClientSkillXp(String skillName)
getCurrentlySelectedSkill()
作用
|
以字符串形式返回技能GUI中玩家当前选中的技能。如果没有技能被选中,函数将会返回一个空字符串。 本函数仅在客户端上可用。
|
参数
|
无
|
返回
|
String 当前选中的技能名称,或是一个空字符串。
|
@SideOnly(Side.CLIENT)
public static String getCurrentlySelectedSkill()
getCurrentXp()
作用
|
返回指定玩家玩家指定技能当前等级所获得的经验值。当玩家升级后,返回值重置为0。
|
参数
|
skillName
|
String 指定技能名称。技能名称必须全大写!
|
player
|
EntityPlayer 指定目标玩家。
|
返回
|
float 返回指定玩家指定技能当前等级的所获经验值。当函数找不到技能或因其他原因出错时返回-1。
|
public static float getCurrentXp(String skillName, EntityPlayer player)
getLevel()
作用
|
返回指定玩家指定技能的等级,当函数执行出错时(比如找不到指定的技能)将会返回 -1 。
|
参数
|
skillName
|
String 指定技能名称。技能名称必须全大写!
|
player
|
EntityPlayer 指定目标玩家
|
返回
|
int 返回目标玩家目标技能的等级。当找不到指定技能或因其他原因出错时返回-1。
|
public static int getLevel(String skillName, EntityPlayer player)
getPercentLevelComplete()
作用
|
返回一个代表目标玩家目标技能当前等级完成程度的百分整数。除非函数出错,函数永远会返回一个介于0~100的值(包含0与100)。 本函数仅在客户端可用。
|
参数
|
skillName
|
String 指定目标技能。技能名称必须全大写!
|
返回
|
int 返回一个代表目标玩家目标技能当前等级完成程度的百分整数。当函数找不到指定技能名称或因其他原因出错时返回-1。
|
@SideOnly(Side.CLIENT)
public static int getPercentLevelComplete(String skillName)
getResourceValue()
作用
|
返回指定玩家指定资源的资源值。
|
参数
|
resource
|
String 指定资源名称。资源名称必须全大写!
|
player
|
EntityPlayer 指定目标玩家
|
返回
|
float 指定玩家指定资源类型的资源值。当函数无法找到指定资源或因其他原因出错时返回-1。
|
public static float getResourceValue(String resource, EntityPlayer player)
getTributeValue()
作用
|
返回指定玩家指定神灵的祝福值。当无法找到神灵或者因其他原因导致出错时返回-1。
|
参数
|
deityName
|
String 指定神灵名。神灵名称必须全大写!
|
player
|
EntityPlayer 指定目标玩家。
|
返回
|
int 玩家当前祝福值。函数出错时返回-1。
|
public static int getTributeValue(String deityName, EntityPlayer player)
getVulcanismTarget()
作用
|
当适用时返回复仇目标。
|
参数
|
player
|
EntityPlayer 指定目标玩家。
|
返回
|
EntityLivingBase 当前复仇目标。当目标未找到或因其他原因方式出错时函数将返回null。
|
public static EntityLivingBase getVulcanismTarget(EntityPlayer player)
getXpToNextLevel()
作用
|
返回代表指定玩家指定技能升级所需的经验值的浮点数。
|
参数
|
skillName
|
String 指定技能名称。技能名称必须全大写!
|
player
|
EntityPlayer 指定目标玩家。
|
返回
|
float 指定玩家指定技能升级所需的经验值。当函数无法找到指定技能或者因其他原因出错时返回-1。
|
public static float getXpToNextLevel(String skillName, EntityPlayer player)
regenResource()
作用
|
增加指定玩家的指定资源资源值。
|
参数
|
resource
|
String 指定资源名称。资源名称必须全大写!
|
amount
|
float 指定添加量。所允许的最小值为0。
|
player
|
EntityPlayer 指定目标玩家。
|
返回
|
void 无
|
public static void regenResource(String resource, float amount, EntityPlayer player)
increaseTribute()
作用
|
增加指定玩家的祝福值。
|
参数
|
deityName
|
String 指定神灵名。神灵名称必须全大写!
|
amount
|
int 指定要增加的值。 所允许的值范围:0~200
|
player
|
EntityPlayer 指定目标玩家。
|
返回
|
void 无
|
public static void increaseTribute(String deityName, int amount, EntityPlayer player)
setVulcanismTarget()
作用
|
为指定玩家设置复仇对象。
|
参数
|
target
|
EntityLivingBase 指定复仇目标。
|
player
|
EntityPlayer 指定目标玩家。
|
返回
|
void 无
|
public static void setVulcanismTarget(EntityLivingBase target, EntityPlayer player)