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:
bm01 2013-01-26 01:02:04 +01:00
parent 188ad359fe
commit a0a52a3433
4 changed files with 872 additions and 874 deletions

View File

@ -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

View File

@ -132,9 +132,7 @@ 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);

View File

@ -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);
} }
} }

View File

@ -441,7 +441,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Iron_Shovel: Iron_Shovel:
@ -451,7 +451,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Iron_Pickaxe: Iron_Pickaxe:
@ -461,7 +461,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Iron_Axe: Iron_Axe:
@ -471,7 +471,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Iron_Hoe: Iron_Hoe:
@ -481,7 +481,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Iron_Boots: Iron_Boots:
@ -491,7 +491,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Iron_Helmet: Iron_Helmet:
@ -501,7 +501,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Iron_Leggings: Iron_Leggings:
@ -511,7 +511,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Iron_Chestplate: Iron_Chestplate:
@ -521,7 +521,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Ender_Pearl: Ender_Pearl:
@ -531,7 +531,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 25.0 Drop_Chance: 25.0
Drop_Level: 200 Drop_Level: 200
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Sword: Gold_Sword:
@ -541,7 +541,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Shovel: Gold_Shovel:
@ -551,7 +551,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Pickaxe: Gold_Pickaxe:
@ -561,7 +561,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Axe: Gold_Axe:
@ -571,7 +571,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Hoe: Gold_Hoe:
@ -581,7 +581,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Boots: Gold_Boots:
@ -591,7 +591,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Helmet: Gold_Helmet:
@ -601,7 +601,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Leggings: Gold_Leggings:
@ -611,7 +611,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Chestplate: Gold_Chestplate:
@ -621,7 +621,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Blaze_Rod: Blaze_Rod:
@ -631,7 +631,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Record_3: Record_3:
@ -641,7 +641,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Record_4: Record_4:
@ -651,7 +651,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Record_5: Record_5:
@ -661,7 +661,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 30.0 Drop_Chance: 30.0
Drop_Level: 400 Drop_Level: 400
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamond_Sword: Diamond_Sword:
@ -671,7 +671,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamond_Shovel: Diamond_Shovel:
@ -681,7 +681,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamond_Pickaxe: Diamond_Pickaxe:
@ -691,7 +691,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamond_Axe: Diamond_Axe:
@ -701,7 +701,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamond_Hoe: Diamond_Hoe:
@ -711,7 +711,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamond_Boots: Diamond_Boots:
@ -721,7 +721,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamond_Helmet: Diamond_Helmet:
@ -731,7 +731,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamond_Leggings: Diamond_Leggings:
@ -741,7 +741,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamond_Chestplate: Diamond_Chestplate:
@ -751,7 +751,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Record_6: Record_6:
@ -761,7 +761,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Record_7: Record_7:
@ -771,7 +771,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Record_8: Record_8:
@ -781,7 +781,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Record_9: Record_9:
@ -791,7 +791,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Record_10: Record_10:
@ -801,7 +801,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Record_11: Record_11:
@ -811,7 +811,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Ghast_Tear: Ghast_Tear:
@ -821,7 +821,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 35.0 Drop_Chance: 35.0
Drop_Level: 600 Drop_Level: 600
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Diamonds: Diamonds:
@ -831,7 +831,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 40.0 Drop_Chance: 40.0
Drop_Level: 800 Drop_Level: 800
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Iron_Ingots: Iron_Ingots:
@ -841,7 +841,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 40.0 Drop_Chance: 40.0
Drop_Level: 800 Drop_Level: 800
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Gold_Ingots: Gold_Ingots:
@ -851,7 +851,7 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 40.0 Drop_Chance: 40.0
Drop_Level: 800 Drop_Level: 800
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true
Lapis_Lazuli: Lapis_Lazuli:
@ -861,6 +861,6 @@ Treasures:
XP: 200 XP: 200
Drop_Chance: 40.0 Drop_Chance: 40.0
Drop_Level: 800 Drop_Level: 800
Max_Level: 1000 Max_Level: -1
Drops_From: Drops_From:
Fishing: true Fishing: true