mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 06:36:45 +01:00
Fishing now always gives fish in addition to treasure (configurable)
Fixing salvage oopsies
This commit is contained in:
parent
2170c6de24
commit
75bb3f181d
@ -25,6 +25,7 @@ Version 2.2.0
|
||||
All config nodes now include a comment with the default value of the node to use as reference
|
||||
Expanded settings relating to purging users who have not leveled or users who had not logged in for many months
|
||||
Acrobatic's Dodge XP increased from 120 -> 480
|
||||
Fishing's always catch fish setting now defaults to true instead of false
|
||||
NOTE: Not every config key that was renamed will be listed here
|
||||
Admins will now be notified if a player trips over-fishing exploit detection 3+ times in a row (Locale: "Fishing.OverFishingDetected")
|
||||
Note: Admins are players who are op or have adminchat permission.
|
||||
|
@ -606,10 +606,6 @@ public class MainConfig extends ConfigValidated {
|
||||
return getBooleanValue(SKILLS, FISHING, OVERRIDE_VANILLA_TREASURES);
|
||||
}
|
||||
|
||||
public boolean getFishingExtraFish() {
|
||||
return getBooleanValue(SKILLS, FISHING, EXTRA_FISH);
|
||||
}
|
||||
|
||||
public double getFishingLureModifier() {
|
||||
return getDoubleValue(SKILLS, FISHING, LURE_MODIFIER);
|
||||
}
|
||||
|
@ -165,13 +165,6 @@ public class ExperienceConfig extends ConfigValidated {
|
||||
reason.add(EXPERIENCE + "." + COMBAT + "." + MULTIPLIER + "." + ANIMALS + " should be at least 0!");
|
||||
}
|
||||
|
||||
/* Fishing */
|
||||
// TODO: Add validation for each fish type once enum is available.
|
||||
|
||||
if (getFishingShakeXP() <= 0) {
|
||||
reason.add(EXPERIENCE + "." + FISHING + "." + SHAKE + " should be greater than 0!");
|
||||
}
|
||||
|
||||
/* Repair */
|
||||
if (getRepairXPBase() <= 0) {
|
||||
reason.add(EXPERIENCE + "." + REPAIR + "." + BASE1 + " should be greater than 0!");
|
||||
@ -374,9 +367,6 @@ public class ExperienceConfig extends ConfigValidated {
|
||||
return BarStyle.SOLID;
|
||||
}
|
||||
|
||||
public int getFishingShakeXP() {
|
||||
return getIntValue(EXPERIENCE, FISHING, SHAKE);
|
||||
}
|
||||
|
||||
/* Repair */
|
||||
public double getRepairXPBase() {
|
||||
|
@ -1,8 +1,19 @@
|
||||
package com.gmail.nossr50.config.hocon.skills.fishing;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigFishing {
|
||||
|
||||
@Setting(value = "General")
|
||||
private ConfigFishingGeneral fishingGeneral = new ConfigFishingGeneral();
|
||||
|
||||
public ConfigFishingGeneral getFishingGeneral() {
|
||||
return fishingGeneral;
|
||||
}
|
||||
|
||||
public boolean isAlwaysCatchFish() {
|
||||
return fishingGeneral.isAlwaysCatchFish();
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.gmail.nossr50.config.hocon.skills.fishing;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigFishingGeneral {
|
||||
|
||||
private static final boolean ALWAYS_CATCH_FISH_DEFAULT = true;
|
||||
|
||||
@Setting(value = "Always-Catch-Fish", comment = "Enables fish to be caught alongside treasure." +
|
||||
"\nDefault value: "+ALWAYS_CATCH_FISH_DEFAULT)
|
||||
private boolean alwaysCatchFish = ALWAYS_CATCH_FISH_DEFAULT;
|
||||
|
||||
public boolean isAlwaysCatchFish() {
|
||||
return alwaysCatchFish;
|
||||
}
|
||||
}
|
@ -327,7 +327,7 @@ public class FishingManager extends SkillManager {
|
||||
NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Fishing.Ability.TH.MagicFound");
|
||||
}
|
||||
|
||||
if (MainConfig.getInstance().getFishingExtraFish()) {
|
||||
if (mcMMO.getConfigManager().getConfigFishing().isAlwaysCatchFish()) {
|
||||
Misc.dropItem(player.getEyeLocation(), fishingCatch.getItemStack());
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ public class FishingManager extends SkillManager {
|
||||
|
||||
Misc.dropItem(target.getLocation(), drop);
|
||||
CombatUtils.dealDamage(target, Math.min(Math.max(target.getMaxHealth() / 4, 1), 10), EntityDamageEvent.DamageCause.CUSTOM, getPlayer()); // Make it so you can shake a mob no more than 4 times.
|
||||
applyXpGain(ExperienceConfig.getInstance().getFishingShakeXP(), XPGainReason.PVE);
|
||||
applyXpGain(mcMMO.getConfigManager().getConfigExperience().getShakeXP(), XPGainReason.PVE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,13 +128,7 @@ public class SalvageManager extends SkillManager {
|
||||
Misc.dropItems(location, salvageResults, 1);
|
||||
|
||||
// BWONG BWONG BWONG - CLUNK!
|
||||
<<<<<<< HEAD
|
||||
if (mcMMO.getConfigManager().getConfigSalvage().getGeneral().isAnvilUseSounds()) {
|
||||
SoundManager.sendSound(player, player.getLocation(), SoundType.ANVIL);
|
||||
=======
|
||||
if (Config.getInstance().getSalvageAnvilUseSoundsEnabled()) {
|
||||
// SoundManager.sendSound(player, player.getLocation(), SoundType.ANVIL);
|
||||
>>>>>>> f1204f8a2aa8b402dc84a4b76c46665e02edb767
|
||||
SoundManager.sendSound(player, player.getLocation(), SoundType.ITEM_BREAK);
|
||||
|
||||
//player.playSound(player.getLocation(), Sound.ENTITY_ITEM_BREAK, 1.0F, 1.0F);
|
||||
|
Loading…
Reference in New Issue
Block a user