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)
|
* @param chance The chance (this is from WeightedRandom.Item)
|
||||||
*/
|
*/
|
||||||
public static void addBallOfFurReturnItem(ItemStack stack, int chance){
|
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
|
* @param maxAmount The maximum stacksize of the returned stack
|
||||||
*/
|
*/
|
||||||
public static void addTreasureChestLoot(ItemStack stack, int chance, int minAmount, int maxAmount){
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,7 +166,7 @@ public class ActuallyAdditionsAPI{
|
||||||
* The way it is modified is an instance of IColorLensChanger. When modifying the item,
|
* The way it is modified is an instance of IColorLensChanger. When modifying the item,
|
||||||
* its modifyItem() method will be called with a stack containing the item.
|
* its modifyItem() method will be called with a stack containing the item.
|
||||||
*
|
*
|
||||||
* @param item The item (or block's item) to add
|
* @param item The item (or block's item) to add
|
||||||
* @param changer The change mechanism
|
* @param changer The change mechanism
|
||||||
*/
|
*/
|
||||||
public static void addReconstructorLensColorChangeItem(Item item, IColorLensChanger changer){
|
public static void addReconstructorLensColorChangeItem(Item item, IColorLensChanger changer){
|
||||||
|
@ -200,4 +200,15 @@ public class ActuallyAdditionsAPI{
|
||||||
public static void addPageWithItemStackData(BookletPage page){
|
public static void addPageWithItemStackData(BookletPage page){
|
||||||
bookletPagesWithItemStackData.add(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