From 52f9273fa86c7d0d2a9dc2960ba36107b19ff8e5 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Fri, 23 Aug 2019 20:51:32 -0600 Subject: [PATCH] Fishing drops are no longer random amounts --- Changelog.txt | 5 +++++ .../com/gmail/nossr50/config/treasure/TreasureConfig.java | 2 +- .../com/gmail/nossr50/skills/fishing/FishingManager.java | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 5c9479afd..0ab21528e 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,9 +1,14 @@ Version 2.1.103 + Treasure item amount will default to 1 if not specified instead of breaking mcMMO + Fishing treasures will now return the amount defined in treasures config file, an option to randomize amounts will be coming in the future. See notes. Fixed a bug where Tree Feller was only rewarding 1 XP per log broken no matter the circumstances Fixed an issue with salvage checking the incorrect level requirement Updated Italian locale (thanks Leomixer17) Fixed grammar in one of the Salvage strings (thanks QuantumToasted) + NOTES: + Sometime in 2014 a decision was made that any fishing treasure over the amount of 1 will be randomized in its yield, while this is not necessarily a bad thing it means control over the drop is a bit random. I've removed this randomness temporarily, in the future you will be able to chose if the amount is randomized or static. + Version 2.1.102 Scoreboards will now be removed from players who teleport to a blacklisted world Fixed a bug where Rupture could trigger itself diff --git a/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java b/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java index 075b09d2c..3d6983b6d 100755 --- a/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java +++ b/src/main/java/com/gmail/nossr50/config/treasure/TreasureConfig.java @@ -150,7 +150,7 @@ public class TreasureConfig extends ConfigLoader { } if (amount <= 0) { - reason.add("Amount of " + treasureName + " must be greater than 0! " + amount); + amount = 1; } if (material != null && material.isBlock() && (data > 127 || data < -128)) { diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index 11c1040b8..de591a60c 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -480,9 +480,10 @@ public class FishingManager extends SkillManager { treasureDrop.setDurability((short) (Misc.getRandom().nextInt(maxDurability))); } - if (treasureDrop.getAmount() > 1) { + //TODO: Add option to randomize the amount rewarded + /*if (treasureDrop.getAmount() > 1) { treasureDrop.setAmount(Misc.getRandom().nextInt(treasureDrop.getAmount()) + 1); - } + }*/ treasure.setDrop(treasureDrop);