-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repackage MealBooster and Seasoning, add javadocs, verbump
- Loading branch information
Showing
9 changed files
with
63 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/io/github/cottonmc/epicurean/api/MealBooster.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package io.github.cottonmc.epicurean.api; | ||
|
||
import io.github.cottonmc.epicurean.container.CookingInventory; | ||
import net.minecraft.entity.effect.StatusEffectInstance; | ||
import net.minecraft.item.ItemStack; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* A hook for other mods to add bonuses to meals. | ||
*/ | ||
public interface MealBooster { | ||
List<MealBooster> BOOSTERS = new ArrayList<>(); | ||
|
||
/** | ||
* Add extra status effects to a meal. | ||
* @param effects The effects on this meal. | ||
* @param seasonings The seasonings being added. | ||
* @param inv The inventory crafting this meal. | ||
* @return All the effects this meal should have, including the ones previously passed in. | ||
*/ | ||
default List<StatusEffectInstance> addBoostEffects(List<StatusEffectInstance> effects, List<ItemStack> seasonings, CookingInventory inv) { | ||
return new ArrayList<>(); | ||
} | ||
|
||
/** | ||
* Add extra hunger restoration to a meal. | ||
* @param seasonings The seasonings being added. | ||
* @param inv The inventory crafting this meal. | ||
* @return How much extra hunger this meal should restore. | ||
*/ | ||
default int addBoostHunger(List<ItemStack> seasonings, CookingInventory inv) { | ||
return 0; | ||
} | ||
|
||
/** | ||
* Add extra saturation restoration to a meal. | ||
* @param seasonings The seasonings being added. | ||
* @param inv The inventory crafting this emal. | ||
* @return How much extra saturation this meal should restore. | ||
*/ | ||
default float addBoostSaturation(List<ItemStack> seasonings, CookingInventory inv) { | ||
return 0f; | ||
} | ||
} |
17 changes: 10 additions & 7 deletions
17
...ub/cottonmc/epicurean/item/Seasoning.java → ...hub/cottonmc/epicurean/api/Seasoning.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/main/java/io/github/cottonmc/epicurean/item/SeasoningItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
src/main/java/io/github/cottonmc/epicurean/meal/MealBooster.java
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
src/main/java/io/github/cottonmc/epicurean/meal/SkillCheckMealBooster.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/java/io/github/cottonmc/epicurean/mixins/MixinEggSeasoning.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters