mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 22:56:45 +01:00
Added the possibility to not use a max level for Fishing
by using a negative number, changed default treasure.yml file accordingly
This commit is contained in:
parent
188ad359fe
commit
a0a52a3433
@ -25,13 +25,11 @@ Version 1.4.00-dev
|
|||||||
= Fixed Leaf Blower not respecting the unlock level set in advanced.yml
|
= Fixed Leaf Blower not respecting the unlock level set in advanced.yml
|
||||||
= Fixed abilities activating with the wrong tool in hand
|
= Fixed abilities activating with the wrong tool in hand
|
||||||
= Fixed Experience.Gains.Mobspawners.Enabled not being used correctly (the check was inverted)
|
= Fixed Experience.Gains.Mobspawners.Enabled not being used correctly (the check was inverted)
|
||||||
<<<<<<< Upstream, based on origin/master
|
|
||||||
= Fixed bug where Iron Grip was using the attacker's skill values rather than the defender's.
|
= Fixed bug where Iron Grip was using the attacker's skill values rather than the defender's.
|
||||||
= Fixed a bug where /party kick would trigger the PartyChangeEvent for the wrong player
|
= Fixed a bug where /party kick would trigger the PartyChangeEvent for the wrong player
|
||||||
= Fixed a bug where party join messages weren't displayed
|
= Fixed a bug where party join messages weren't displayed
|
||||||
=======
|
! It is now possible to use a negative number for Max_Level in treasures.yml to not use a maximum level, changed default file accordingly
|
||||||
! A Fishing catch will now always contains a fish even if a treasure is found
|
! A Fishing catch will now always contains a fish even if a treasure is found
|
||||||
>>>>>>> 1f7a94a Changed Fishing to always give a fish on a successful catch
|
|
||||||
! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent
|
! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent
|
||||||
! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR.
|
! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR.
|
||||||
! Changed how Tree Feller is handled, it should now put less stress on the CPU
|
! Changed how Tree Feller is handled, it should now put less stress on the CPU
|
||||||
|
@ -131,10 +131,8 @@ public class TreasuresConfig extends ConfigLoader{
|
|||||||
}
|
}
|
||||||
|
|
||||||
int maxLevel = config.getInt("Treasures." + treasureName + ".Max_Level");
|
int maxLevel = config.getInt("Treasures." + treasureName + ".Max_Level");
|
||||||
|
|
||||||
if (maxLevel < 0) {
|
|
||||||
reason.add("Invalid Max_Level: " + maxLevel);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (noErrorsInTreasure(reason)) {
|
if (noErrorsInTreasure(reason)) {
|
||||||
FishingTreasure fTreasure = new FishingTreasure(item, xp, dropChance, dropLevel, maxLevel);
|
FishingTreasure fTreasure = new FishingTreasure(item, xp, dropChance, dropLevel, maxLevel);
|
||||||
|
@ -111,7 +111,9 @@ public class Fishing {
|
|||||||
List<FishingTreasure> rewards = new ArrayList<FishingTreasure>();
|
List<FishingTreasure> rewards = new ArrayList<FishingTreasure>();
|
||||||
|
|
||||||
for (FishingTreasure treasure : TreasuresConfig.getInstance().fishingRewards) {
|
for (FishingTreasure treasure : TreasuresConfig.getInstance().fishingRewards) {
|
||||||
if (treasure.getDropLevel() <= skillLevel && treasure.getMaxLevel() >= skillLevel) {
|
int maxLevel = treasure.getMaxLevel();
|
||||||
|
|
||||||
|
if (treasure.getDropLevel() <= skillLevel && (maxLevel >= skillLevel || maxLevel <= 0)) {
|
||||||
rewards.add(treasure);
|
rewards.add(treasure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user