Attention all readers. The wiki would like to know what players are planning to play Advent of Ascension in 1.12 vs 1.7.10. This information is important to better structure the wiki when the update to 1.12 comes.


Click here to take a poll regarding whether you will play Advent of Ascension in 1.12 or 1.7.10

Modding API

From Advent of Ascension Wiki
Jump to: navigation, search
This page contains content on features that currently only exist in a snapshot.
These features are playable in snapshots, but have not been officially released yet.

The modding api for Advent of Ascension will be added in update 3.0, the first mod version for Minecraft 1.12+.

The API gives other modders easy, reliable, and stable access to a number of public-facing methods in the mod.

This allows mods to interact with Advent of Ascension in a more direct way and use some more interesting effects.

The Javadocs for all available methods can be viewed at: http://tslat.net/Hosting/Tslat-AoA/javadocs

API methods[edit | edit source]

Package: net.tslat.aoa3.api.AoAPlayerAPI[edit | edit source]

	/**
	 * Returns the current level in a given AoA skill for the provided player.
	 * Will return -1 if unable to find the requested skill or if the method otherwise fails.
	 *
	 * @param skillName the name of the skill you are requesting the level for.
	 *                  Skill names should be in ALL CAPITALS.
	 *                  Valid options are: ALCHEMY, ANIMA, AUGURY, BUTCHERY, CREATION,
	 *                  ENGINEERING, EXPEDITION, EXTRACTION, FORAGING, HAULING, HUNTER,
	 *                  INFUSION, INNERVATION, LOGGING, RUNATION, VULCANISM
	 * @param player the {@code EntityPlayer} player to find the level for.
	 *
	 * @return an int representing the level in the player's given skill or -1 if the method fails.
	 */
	public static int getLevel(String skillName, EntityPlayer player)

	/**
	 * Returns the player's current armour set name in string form if applicable.
	 * Will only return full sets, and takes into account set-exclusive armour pieces.
	 *
	 * @param player the {@code EntityPlayer} player in which to check for armour
	 *
	 * @return A @Nonnull String object representing the player's current armour set if
	 * at all applicable. All other situations return an empty string.
	 */
	public static String getArmourSet(EntityPlayer player)

	/**
	 * Returns a float value representing the current value of the given resource type for the provided player.
	 *
	 * @param resource the {@code String} name of the resource you are requesting the value for.
	 *                 Resource names should be ALL CAPITALS.
	 *                 Valid options are: CREATION, SOUL, ENERGY, RAGE
	 * @param player the {@code EntityPlayer} player to find the resource value for.
	 *
	 * @return a float value representing the player's current resource amount.
	 * Will return -1 if unable to find the requested resource or if the method otherwise fails.
	 */
	public static float getResourceValue(String resource, EntityPlayer player)

	/**
	 * Consume an amount of a provided resource type for the given player.
	 * If using forceConsume = true, it is recommended to check whether the player has enough resource available
	 * beforehand as the method could return an indistinguishable false if the method fails or the player does not
	 * have enough resource remaining.
	 *
	 * @param resource the {@code String} name of the resource you are requesting the value for.
	 *                 Resource names should be ALL CAPITALS.
	 *                 Valid options are: CREATION, SOUL, ENERGY, RAGE
	 * @param amount a {@code float} value representing how much resource to consume in the provided resource type.
	 *                  Min value: 0
	 * @param forceConsume a {@code boolean} to decide whether the method should consume the resource even if the player
	 *                     does not have enough remaining to complete the request.
	 * @param player the {@code EntityPlayer} player to consume the resource amount for.
	 *
	 * @return a boolean representing whether the given player had enough resource to successfully complete the method.
	 * If forceConsume is true, the method will consume whatever resource is available down to 0 and return as normal.
	 * Will return false if unable to find the requested resource or if the method otherwise fails
	 */
	public static boolean consumeResource(String resource, float amount, boolean forceConsume, EntityPlayer player)

	/**
	 * Regenerate a given amount of resource value in the provided resource for a given player.
	 *
	 * @param resource a {@code String} name of the resource you are wanting to regenerate.
	 *                 Resource names should be ALL CAPITALS.
	 *                 Valid options are: CREATION, SOUL, ENERGY, RAGE
	 * @param amount a {@code float} value representing how much resource to regen in the provided resource type.
	 *                  Min value: 0
	 * @param player the {@code EntityPlayer} player to regenerate the resource amount for.
	 */
	public static void regenResource(String resource, float amount, EntityPlayer player)

	/**
	 * Returns an int value representing the current tribute amount for given deity for the provided player.
	 * Will return -1 if unable to find the deity, or if the method otherwise fails
	 *
	 * @param deityName the name of the deity in which to retrieve the player's current tribute value.
	 *                  Deity names should be ALL CAPITALS.
	 *                  Valid options are: EREBON, LUXON, PLUTON, SELYAN
	 * @param player the {@code EntityPlayer} player to find the tribute value for.
	 *
	 * @return an int value representing the player's current tribute amount.
	 * Will return -1 if the method fails.
	 */
	public static int getTributeValue(String deityName, EntityPlayer player)

	/**
	 * Increases the tribute value for the provided deity for a given player.
	 *
	 * @param deityName the name of the deity in which to increase the player's current tribute value.
	 *                  Deity names should be ALL CAPITALS.
	 *                  Valid options are: EREBON, LUXON, PLUTON, SELYAN
	 * @param amount the {@code int} amount of tribute to add to the player's tribute bar for the provided deity.
	 *               Min value: 0
	 *               Max value: 200
	 * @param player the {@code EntityPlayer} player to increase the tribute value for.
	 */
	public static void increaseTribute(String deityName, int amount, EntityPlayer player)

	/**
	 * Returns the revenge target for the provider player if applicable.
	 *
	 * @param player the {@code EntityPlayer} player for which to find the revenge target
	 *
	 * @return An {@code EntityLivingBase} object representing the current revenge target.
	 * Will return {@code null} if no target found or the method otherwise fails
	 */
	public static EntityLivingBase getVulcanismTarget(EntityPlayer player)

	/**
	 * Sets the provided target as the revenge target for the provided player.
	 *
	 * @param target an {@code EntityLivingBase} object to set as the player's revenge target.
	 * @param player the {@code EntityPlayer} player for which to set the revenge target for.
	 */
	public static void setVulcanismTarget(EntityLivingBase target, EntityPlayer player)

	/**
	 * Ends the revenge period for the provided player.
	 *
	 * @param player the {@code EntityPlayer} player for which to end the revenge for.
	 */
	public static void endRevenge(EntityPlayer player)

	/**
	 * Returns a float value representing the provided player's current xp gained at the current level.
	 * Xp resets to 0 at each level up.
	 *
	 * @param skillName a {@code String} object representing the name of the skill to find the xp value for.
	 *                  Skill names should be in ALL CAPITALS.
	 *                  Valid options are: ALCHEMY, ANIMA, AUGURY, BUTCHERY, CREATION,
	 *                  ENGINEERING, EXPEDITION, EXTRACTION, FORAGING, HAULING, HUNTER,
	 *                  INFUSION, INNERVATION, LOGGING, RUNATION, VULCANISM
	 * @param player the {@code EntityPlayer} player for which to find the xp value for.
	 *
	 * @return a float value representing the player's current xp at the current level.
	 * Will return -1 if unable to find the given skill or if the method otherwise fails.
	 */
	public static float getCurrentXp(String skillName, EntityPlayer player)

	/**
	 * Returns a float value representing the provided player's required xp amount until next level-up.
	 *
	 * @param skillName a {@code String} object representing the name of the skill to find the xp value for.
	 *                  Skill names should be in ALL CAPITALS.
	 *                  Valid options are: ALCHEMY, ANIMA, AUGURY, BUTCHERY, CREATION,
	 *                  ENGINEERING, EXPEDITION, EXTRACTION, FORAGING, HAULING, HUNTER,
	 *                  INFUSION, INNERVATION, LOGGING, RUNATION, VULCANISM
	 * @param player the {@code EntityPlayer} player for which to find the xp value for.
	 *
	 * @return a float value representing the xp the player needs to gain to level up in the given skill.
	 * Will return -1 if unable to find the given skill or if the method otherwise fails.
	 */
	public static float getXpToNextLevel(String skillName, EntityPlayer player)

	/**
	 * Returns the currently selected skill in the player's skill GUI in string form.
	 * If no skill selected, an empty string will be returned.
	 * This method is client side only
	 *
	 * @return a skill name in string form if selected, or an empty string if no skills selected.
	 */
	@SideOnly(Side.CLIENT)
	public static String getCurrentlySelectedSkill()

	/**
	 * Returns a int percentage value representing how far through a skill level the player is.
	 * Will always return a value between 0 and 100 (inclusive), except if the method fails.
	 * This method is client side only.
	 *
	 * @param skillName a {@code String} representing the skill name to provide the percentage for.
	 *                  Skill names should be in ALL CAPITALS.
	 *                  Valid options are: ALCHEMY, ANIMA, AUGURY, BUTCHERY, CREATION,
	 *                  ENGINEERING, EXPEDITION, EXTRACTION, FORAGING, HAULING, HUNTER,
	 *                  INFUSION, INNERVATION, LOGGING, RUNATION, VULCANISM
	 *
	 * @return an int value representing the percentage complete for the current level of the provided skill.
	 * Will return -1 if unable to find the skill by name or if the method otherwise fails
	 */
	@SideOnly(Side.CLIENT)
	public static int getPercentLevelComplete(String skillName)

Package: net.tslat.aoa3.api.AoASkillAPI[edit | edit source]

	/**
	 * Adds a weighted loot entry to the Extraction loot pool with an optional level requirement.
	 * Stack size will default to a size of 1.
	 *
	 * @param level the Extraction level required to obtain this drop
	 *              Min value: 1
	 * @param weight weight rating defining how likely the drop is to occur relative to all others. Base weight
	 *               rating is 100 for simple drops, with higher numbers being proportionally more rare.
	 *               Min value: 1
	 * @param loot the itemstack that drops as part of this loot bundles.
	 *             CAN BE NULL
	 * @param xp the amount of Extraction xp to give as part of this loot bundle.
	 *           Min value: 0
	 *           Max value: 20000
	 */
	public static void addExtractionDrop(int level, int weight, @Nullable ItemStack loot, float xp)

	/**
	 * Adds a weighted loot entry to the Extraction loot pool with an optional level requirement and a given minimum and maximum stack size.
	 *
	 * @param level the Extraction level required to obtain this drop
	 *              Min value: 1
	 * @param weight weight rating defining how likely the drop is to occur relative to all others. Base weight
	 *               rating is 100 for simple drops, with higher numbers being proportionally more rare.
	 *               Min value: 1
	 * @param loot the itemstack that drops as part of this loot bundles.
	 *             CAN BE NULL
	 * @param xp the amount of Extraction xp to give as part of this loot bundle.
	 *           Min value: 0
	 *           Max value: 20000
	 * @param minStackSize minimum stack size for the loot stack.
	 *           Min value: 1
	 * @param maxStackSize maximum stack size for the loot stack. Size of the stack will be randomly chosen between minStackSize and this, inclusive.
	 *           Min value must be higher than minStackSize
	 *           Max value: 64
	 */
	public static void addExtractionDrop(int level, int weight, @Nullable ItemStack loot, float xp, int minStackSize, int maxStackSize)


	/**
	 * Adds a weighted loot entry to the Foraging loot pool with an optional level requirement.
	 * Stack size will default to a size of 1.
	 *
	 * @param level the Foraging level required to obtain this drop
	 *              Min value: 1
	 * @param weight weight rating defining how likely the drop is to occur relative to all others. Base weight
	 *               rating is 100 for simple drops, with higher numbers being proportionally more rare.
	 *               Min value: 1
	 * @param loot the itemstack that drops as part of this loot bundles.
	 *             CAN BE NULL
	 * @param xp the amount of Foraging xp to give as part of this loot bundle.
	 *           Min value: 0
	 *           Max value: 20000
	 */
	public static void addForagingDrop(int level, int weight, @Nullable ItemStack loot, float xp)

	/**
	 * Adds a weighted loot entry to the Foraging loot pool with an optional level requirement and a given minimum and maximum stack size.
	 *
	 * @param level the Foraging level required to obtain this drop
	 *              Min value: 1
	 * @param weight weight rating defining how likely the drop is to occur relative to all others. Base weight
	 *               rating is 100 for simple drops, with higher numbers being proportionally more rare.
	 *               Min value: 1
	 * @param loot the itemstack that drops as part of this loot bundles.
	 *             CAN BE NULL
	 * @param xp the amount of Foraging xp to give as part of this loot bundle.
	 *           Min value: 0
	 *           Max value: 20000
	 * @param minStackSize minimum stack size for the loot stack.
	 *           Min value: 1
	 * @param maxStackSize maximum stack size for the loot stack. Size of the stack will be randomly chosen between minStackSize and this, inclusive.
	 *           Min value must be higher than minStackSize
	 *           Max value: 64
	 */
	public static void addForagingDrop(int level, int weight, @Nullable ItemStack loot, float xp, int minStackSize, int maxStackSize)


	/**
	 * Adds a weighted loot entry to the Hauling loot pool with an optional level requirement.
	 * Stack size will default to a size of 1.
	 *
	 * @param level the Hauling level required to obtain this drop
	 *              Min value: 1
	 * @param weight weight rating defining how likely the drop is to occur relative to all others. Base weight
	 *               rating is 100 for simple drops, with higher numbers being proportionally more rare.
	 *               Min value: 1
	 * @param loot the itemstack that drops as part of this loot bundles.
	 *             CAN BE NULL
	 * @param xp the amount of Hauling xp to give as part of this loot bundle.
	 *           Min value: 0
	 *           Max value: 20000
	 */
	public static void addHaulingDrop(int level, int weight, @Nullable ItemStack loot, float xp)

	/**
	 * Adds a weighted loot entry to the Hauling loot pool with an optional level requirement and a given minimum and maximum stack size.
	 *
	 * @param level the Hauling level required to obtain this drop
	 *              Min value: 1
	 * @param weight weight rating defining how likely the drop is to occur relative to all others. Base weight
	 *               rating is 100 for simple drops, with higher numbers being proportionally more rare.
	 *               Min value: 1
	 * @param loot the itemstack that drops as part of this loot bundles.
	 *             CAN BE NULL
	 * @param xp the amount of Hauling xp to give as part of this loot bundle.
	 *           Min value: 0
	 *           Max value: 20000
	 * @param minStackSize minimum stack size for the loot stack.
	 *           Min value: 1
	 * @param maxStackSize maximum stack size for the loot stack. Size of the stack will be randomly chosen between minStackSize and this, inclusive.
	 *           Min value must be higher than minStackSize
	 *           Max value: 64
	 */
	public static void addHaulingDrop(int level, int weight, @Nullable ItemStack loot, float xp, int minStackSize, int maxStackSize)


	/**
	 * Adds a weighted loot entry to the Logging loot pool with an optional level requirement.
	 * Stack size will default to a size of 1.
	 *
	 * @param level the Logging level required to obtain this drop
	 *              Min value: 1
	 * @param weight weight rating defining how likely the drop is to occur relative to all others. Base weight
	 *               rating is 100 for simple drops, with higher numbers being proportionally more rare.
	 *               Min value: 1
	 * @param loot the itemstack that drops as part of this loot bundles.
	 *             CAN BE NULL
	 * @param xp the amount of Logging xp to give as part of this loot bundle.
	 *           Min value: 0
	 *           Max value: 20000
	 */
	public static void addLoggingDrop(int level, int weight, @Nullable ItemStack loot, float xp)

	/**
	 * Adds a weighted loot entry to the Logging loot pool with an optional level requirement and a given minimum and maximum stack size.
	 *
	 * @param level the Logging level required to obtain this drop
	 *              Min value: 1
	 * @param weight weight rating defining how likely the drop is to occur relative to all others. Base weight
	 *               rating is 100 for simple drops, with higher numbers being proportionally more rare.
	 *               Min value: 1
	 * @param loot the itemstack that drops as part of this loot bundles.
	 *             CAN BE NULL
	 * @param xp the amount of Logging xp to give as part of this loot bundle.
	 *           Min value: 0
	 *           Max value: 20000
	 * @param minStackSize minimum stack size for the loot stack.
	 *           Min value: 1
	 * @param maxStackSize maximum stack size for the loot stack. Size of the stack will be randomly chosen between minStackSize and this, inclusive.
	 *           Min value must be higher than minStackSize
	 *           Max value: 64
	 */
	public static void addLoggingDrop(int level, int weight, @Nullable ItemStack loot, float xp, int minStackSize, int maxStackSize)

Package: net.tslat.aoa3.api.AoAItemAPI[edit | edit source]

	/**
	 * Adds a given food item to the blacklist for the Fungal Staff's food generation effect.
	 * Food items on this list will not be given to the player when casting with the fungal staff.
	 * This method must be called before the FMLPostInitializationEvent
	 *
	 * @param item the item to add to the blacklist. All sub-items will also be blocked
	 */
	public static void addBlacklistFoodToFungalStaff(Item item)


Promotional Content