mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Added a method to get the API Version as an integer to the API
This commit is contained in:
parent
73ebec3930
commit
3f4f87f273
1 changed files with 14 additions and 3 deletions
|
@ -122,7 +122,7 @@ public class ActuallyAdditionsAPI{
|
|||
* @param chance The chance (this is from WeightedRandom.Item)
|
||||
*/
|
||||
public static void addBallOfFurReturnItem(ItemStack stack, int chance){
|
||||
ActuallyAdditionsAPI.ballOfFurReturnItems.add(new BallOfFurReturn(stack, chance));
|
||||
ballOfFurReturnItems.add(new BallOfFurReturn(stack, chance));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -134,7 +134,7 @@ public class ActuallyAdditionsAPI{
|
|||
* @param maxAmount The maximum stacksize of the returned stack
|
||||
*/
|
||||
public static void addTreasureChestLoot(ItemStack stack, int chance, int minAmount, int maxAmount){
|
||||
ActuallyAdditionsAPI.treasureChestLoot.add(new TreasureChestLoot(stack, chance, minAmount, maxAmount));
|
||||
treasureChestLoot.add(new TreasureChestLoot(stack, chance, minAmount, maxAmount));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -200,4 +200,15 @@ public class ActuallyAdditionsAPI{
|
|||
public static void addPageWithItemStackData(BookletPage page){
|
||||
bookletPagesWithItemStackData.add(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* This can be used for checking if the API is a certain version for
|
||||
* compatibility's sake.
|
||||
* Will always return an integer equivalent to the text in API_VERSION
|
||||
*
|
||||
* @return The API's version as an integer
|
||||
*/
|
||||
public static int getAPIVersionInt(){
|
||||
return Integer.parseInt(API_VERSION);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue