Add Glow Berries to Farmer's Diet

This commit is contained in:
nossr50 2021-06-06 20:56:14 -07:00
parent 0bc25b263b
commit 551fac84a5
2 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,7 @@ Version 2.1.197
Added Goat to experience.yml for combat and taming
Added Axolotl to experience.yml for combat and taming
Added Glow_Squid to experience.yml for combat and taming
Added Glow Berries to Farmer's Diet
Updated Super Breaker to recognize the new pick-axe appropriate blocks
Updated Tree Feller to recognize Azalea Leaves

View File

@ -912,6 +912,16 @@ public class EntityListener implements Listener {
* is based on how 'common' the item is We can adjust this quite easily
* if we find something is giving too much of a bonus
*/
//Hacky 1.17 support
if(foodInHand.getKey().getKey().equalsIgnoreCase("glow_berries")) {
if (Permissions.isSubSkillEnabled(player, SubSkillType.HERBALISM_FARMERS_DIET)) {
event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(newFoodLevel));
}
return;
}
switch (foodInHand) {
case BAKED_POTATO: /*
* RESTORES 3 HUNGER - RESTORES 5 1/2 HUNGER @