mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 05:06:45 +01:00
Fixed display bug w/ Fish Diet, added Tropical, Raw Cod/Salmon to eligible foods
This commit is contained in:
parent
6f15cd4005
commit
28b71804a2
@ -7,6 +7,10 @@ Key:
|
||||
! Change
|
||||
- Removal
|
||||
|
||||
Version 2.1.14
|
||||
Added Tropical Fish, Raw Cod, Raw Salmon to the list of foods that benefit from Fisherman's Diet
|
||||
Fixed a display issue with Fisherman's Diet
|
||||
|
||||
Version 2.1.13
|
||||
Fixed a bug where Archery's Arrow Retrieval was using the wrong permission node
|
||||
|
||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||
<artifactId>mcMMO</artifactId>
|
||||
<version>2.1.13</version>
|
||||
<version>2.1.14-SNAPSHOT</version>
|
||||
<name>mcMMO</name>
|
||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||
<scm>
|
||||
|
@ -89,7 +89,7 @@ public class FishingCommand extends SkillCommand {
|
||||
|
||||
// FISHERMAN'S DIET
|
||||
if (canFishermansDiet) {
|
||||
fishermansDietRank = calculateRank(skillValue, Fishing.fishermansDietMaxLevel, Fishing.fishermansDietRankLevel1);
|
||||
fishermansDietRank = RankUtils.getRank(player, SubSkillType.FISHING_FISHERMANS_DIET);
|
||||
}
|
||||
|
||||
// MASTER ANGLER
|
||||
|
@ -765,19 +765,14 @@ public class EntityListener implements Listener {
|
||||
event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(newFoodLevel));
|
||||
}
|
||||
return;
|
||||
case COD:
|
||||
case SALMON:
|
||||
case TROPICAL_FISH:
|
||||
case COOKED_COD:
|
||||
case COOKED_SALMON:
|
||||
|
||||
case COOKED_SALMON: /*
|
||||
* RESTORES 2 1/2 HUNGER - RESTORES 5 HUNGER @
|
||||
* 1000
|
||||
*/
|
||||
if (Permissions.isSubSkillEnabled(player, SubSkillType.FISHING_FISHERMANS_DIET)) {
|
||||
event.setFoodLevel(UserManager.getPlayer(player).getFishingManager().handleFishermanDiet(Fishing.fishermansDietRankLevel1, newFoodLevel));
|
||||
}
|
||||
return;
|
||||
|
||||
case SALMON: /* RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER @ 1000 */
|
||||
if (Permissions.isSubSkillEnabled(player, SubSkillType.FISHING_FISHERMANS_DIET)) {
|
||||
event.setFoodLevel(UserManager.getPlayer(player).getFishingManager().handleFishermanDiet(Fishing.fishermansDietRankLevel2, newFoodLevel));
|
||||
event.setFoodLevel(UserManager.getPlayer(player).getFishingManager().handleFishermanDiet(newFoodLevel));
|
||||
}
|
||||
return;
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.gmail.nossr50.skills.fishing;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.treasure.TreasureConfig;
|
||||
import com.gmail.nossr50.datatypes.treasure.ShakeTreasure;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
@ -19,10 +18,6 @@ public final class Fishing {
|
||||
|
||||
protected static final HashMap<Material, List<Enchantment>> ENCHANTABLE_CACHE = new HashMap<Material, List<Enchantment>>();
|
||||
|
||||
public static int fishermansDietRankLevel1 = AdvancedConfig.getInstance().getFishermanDietRankChange();
|
||||
public static int fishermansDietRankLevel2 = fishermansDietRankLevel1 * 2;
|
||||
public static int fishermansDietMaxLevel = fishermansDietRankLevel1 * 5;
|
||||
|
||||
public static Set<Biome> masterAnglerBiomes = BiomeAdapter.WATER_BIOMES;
|
||||
public static Set<Biome> iceFishingBiomes = BiomeAdapter.ICE_BIOMES;
|
||||
|
||||
|
@ -134,12 +134,11 @@ public class FishingManager extends SkillManager {
|
||||
/**
|
||||
* Handle the Fisherman's Diet ability
|
||||
*
|
||||
* @param rankChange The # of levels to change rank for the food
|
||||
* @param eventFoodLevel The initial change in hunger from the event
|
||||
*
|
||||
* @return the modified change in hunger for the event
|
||||
*/
|
||||
public int handleFishermanDiet(int rankChange, int eventFoodLevel) {
|
||||
public int handleFishermanDiet(int eventFoodLevel) {
|
||||
return SkillUtils.handleFoodSkills(getPlayer(), eventFoodLevel, SubSkillType.FISHING_FISHERMANS_DIET);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user