From ac10261803dc3a59e7c0f9261d2a1991adb8439c Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 3 Apr 2019 21:54:49 -0700 Subject: [PATCH 1/3] Blast Mining uses Pickaxe + Missing Taming XP entries --- Changelog.txt | 9 +++++++++ pom.xml | 2 +- src/main/java/com/gmail/nossr50/config/Config.java | 5 ----- .../com/gmail/nossr50/skills/mining/BlastMining.java | 2 -- .../com/gmail/nossr50/skills/mining/MiningManager.java | 9 ++++----- .../java/com/gmail/nossr50/util/skills/CombatUtils.java | 3 +++ src/main/resources/config.yml | 1 - src/main/resources/experience.yml | 2 ++ src/main/resources/locale/locale_en_US.properties | 2 +- 9 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index ede3a66f2..ff527ad20 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -7,6 +7,15 @@ Key: ! Change - Removal +Version 2.1.34 + Added Llama to taming XP tables + Added Parrot to taming XP tables + Pickaxes are now used to activate Blast Mining instead of Flint + The detonator for Blast Mining is no longer configurable + + NOTE: You'll have to add these entries in yourself, this is what it should look like: https://paste.gg/p/anonymous/aadbcfde3eb3470fb13caebde4065a03 + Alternatively you can delete the experience config file to generate a new one + Version 2.1.33 Renamed "Skills.Acrobatics.Prevent_AFK_Leveling" to "ExploitFix.Acrobatics" ExploitFix.Acrobatics when set to false allows gaining XP in Acrobatics freely with no anti-grind measures diff --git a/pom.xml b/pom.xml index aa7abe70d..3e13c5a68 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.33 + 2.1.34-SNAPSHOT mcMMO https://github.com/mcMMO-Dev/mcMMO diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index dde188ed4..1092029c2 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -186,10 +186,6 @@ public class Config extends AutoUpdateConfigLoader { reason.add("Abilities.Fishing.Lure_Modifier should be at least 0!"); } - if (getDetonatorItem() == null) { - reason.add("Skills.Mining.Detonator_Item is invalid!"); - } - if (getRepairAnvilMaterial() == null) { reason.add("Skills.Repair.Anvil_Type is invalid!!"); } @@ -504,7 +500,6 @@ public class Config extends AutoUpdateConfigLoader { public double getFishingLureModifier() { return config.getDouble("Skills.Fishing.Lure_Modifier", 4.0D); } /* Mining */ - public Material getDetonatorItem() { return Material.matchMaterial(config.getString("Skills.Mining.Detonator_Name", "FLINT_AND_STEEL")); } public int getMiningGate() { return config.getInt("Skills.Mining.Ability_Activation_Level_Gate", 10); } /* Excavation */ diff --git a/src/main/java/com/gmail/nossr50/skills/mining/BlastMining.java b/src/main/java/com/gmail/nossr50/skills/mining/BlastMining.java index 0d53226ae..a3c23a8d2 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/BlastMining.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/BlastMining.java @@ -41,8 +41,6 @@ public class BlastMining { }*/ - public static Material detonator = Config.getInstance().getDetonatorItem(); - public final static int MAXIMUM_REMOTE_DETONATION_DISTANCE = 100; public static double getBlastRadiusModifier(int rank) { diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index fa3ceaaa1..fdbcab633 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -11,10 +11,7 @@ import com.gmail.nossr50.datatypes.skills.SuperAbilityType; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.runnables.skills.AbilityCooldownTask; import com.gmail.nossr50.skills.SkillManager; -import com.gmail.nossr50.util.BlockUtils; -import com.gmail.nossr50.util.EventUtils; -import com.gmail.nossr50.util.Misc; -import com.gmail.nossr50.util.Permissions; +import com.gmail.nossr50.util.*; import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.RankUtils; @@ -45,7 +42,9 @@ public class MiningManager extends SkillManager { public boolean canDetonate() { Player player = getPlayer(); - return canUseBlastMining() && player.isSneaking() && player.getInventory().getItemInMainHand().getType() == BlastMining.detonator && Permissions.remoteDetonation(player); + return canUseBlastMining() && player.isSneaking() + && ItemUtils.isPickaxe(getPlayer().getInventory().getItemInMainHand()) + && Permissions.remoteDetonation(player); } public boolean canUseBlastMining() { diff --git a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java index f1a58e6b4..a9dd669ed 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java @@ -451,6 +451,9 @@ public final class CombatUtils { } target.setMetadata(mcMMO.CUSTOM_DAMAGE_METAKEY, mcMMO.metadataValue); + + + target.damage(damage, attacker); // //IFrame storage diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 1eae04589..0cd309e50 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -348,7 +348,6 @@ Skills: Prevent_AFK_Leveling: true Mining: Level_Cap: 0 - Detonator_Name: FLINT_AND_STEEL Ability_Activation_Level_Gate: 10 Repair: Level_Cap: 0 diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index a1ee620eb..93bba80d1 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -381,6 +381,7 @@ Experience: Redstone_Ore: 15 Taming: Animal_Taming: + Llama: 1200 Wolf: 250 Ocelot: 500 Horse: 1000 @@ -388,6 +389,7 @@ Experience: Mule: 1000 Skeleton_Horse: 1000 Zombie_Horse: 1000 + Parrot: 1100 Combat: Multiplier: Animals: 1.0 diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index 1d56ea92f..68b47680c 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -887,7 +887,7 @@ Guides.Mining.Section.0=[[DARK_AQUA]]About Mining:\n[[YELLOW]]Mining consists of Guides.Mining.Section.1=[[DARK_AQUA]]Compatible Materials:\n[[YELLOW]]Stone, Coal Ore, Iron Ore, Gold Ore, Diamond Ore, Redstone Ore,\n[[YELLOW]]Lapis Ore, Obsidian, Mossy Cobblestone, Ender Stone,\n[[YELLOW]]Glowstone, and Netherrack. Guides.Mining.Section.2=[[DARK_AQUA]]How to use Super Breaker:\n[[YELLOW]]With a pickaxe in your hand, right click to ready your tool.\n[[YELLOW]]Once in this state, you have about 4 seconds to make contact\n[[YELLOW]]with Mining compatible materials, which will activate Super\n[[YELLOW]]Breaker. Guides.Mining.Section.3=[[DARK_AQUA]]What is Super Breaker?\n[[YELLOW]]Super Breaker is an ability with a cooldown tied to the Mining\n[[YELLOW]]skill. It triples your chance of extra items dropping and\n[[YELLOW]]enables instant break on Mining materials. -Guides.Mining.Section.4=[[DARK_AQUA]]How to use Blast Mining:\n[[YELLOW]]With a detonator in hand, which is a flint & steel by default,\n[[YELLOW]]crouch and right-click on TNT from a distance. This will cause the TNT\n[[YELLOW]]to instantly explode. +Guides.Mining.Section.4=[[DARK_AQUA]]How to use Blast Mining:\n[[YELLOW]]With a pickaxe in hand,\n[[YELLOW]]crouch and right-click on TNT from a distance. This will cause the TNT\n[[YELLOW]]to instantly explode. Guides.Mining.Section.5=[[DARK_AQUA]]How does Blast Mining work?\n[[YELLOW]]Blast Mining is an ability with a cooldown tied to the Mining\n[[YELLOW]]skill. It gives bonuses when mining with TNT and allows you\n[[YELLOW]]to remote detonate TNT. There are three parts to Blast Mining.\n[[YELLOW]]The first part is Bigger Bombs, which increases blast radius.\n[[YELLOW]]The second is Demolitions Expert, which decreases damage\n[[YELLOW]]from TNT explosions. The third part simply increases the\n[[YELLOW]]amount of ores dropped from TNT and decreases the\n[[YELLOW]]debris dropped. ##Repair Guides.Repair.Section.0=[[DARK_AQUA]]About Repair:\n[[YELLOW]]Repair allows you to use an iron block to repair armor and\n[[YELLOW]]tools.\n\n[[DARK_AQUA]]XP GAIN:\n[[YELLOW]]Repair tools or armor using the mcMMO Anvil. This is an\n[[YELLOW]]iron block by default and should not be confused with\n[[YELLOW]]the Vanilla Minecraft Anvil. From b8b0be71b19b393952be58ac8b7dfcc310fda213 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 3 Apr 2019 22:01:45 -0700 Subject: [PATCH 2/3] 2.1.34 --- Changelog.txt | 1 + pom.xml | 2 +- .../java/com/gmail/nossr50/skills/mining/MiningManager.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index ff527ad20..f87862135 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -12,6 +12,7 @@ Version 2.1.34 Added Parrot to taming XP tables Pickaxes are now used to activate Blast Mining instead of Flint The detonator for Blast Mining is no longer configurable + Fixed a bug where Blast Mining did not show cooldown length correctly NOTE: You'll have to add these entries in yourself, this is what it should look like: https://paste.gg/p/anonymous/aadbcfde3eb3470fb13caebde4065a03 Alternatively you can delete the experience config file to generate a new one diff --git a/pom.xml b/pom.xml index 3e13c5a68..722b2b0c1 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.34-SNAPSHOT + 2.1.34 mcMMO https://github.com/mcMMO-Dev/mcMMO diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index fdbcab633..5bc2c29d5 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -261,7 +261,7 @@ public class MiningManager extends SkillManager { if (timeRemaining > 0) { //getPlayer().sendMessage(LocaleLoader.getString("Skills.TooTired", timeRemaining)); - NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.ABILITY_COOLDOWN, "Skills.TooTired", String.valueOf("timeRemaining")); + NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.ABILITY_COOLDOWN, "Skills.TooTired", String.valueOf(timeRemaining)); return false; } From f1d9f787f4793b9a4ac2065f2a43903570bcf983 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 4 Apr 2019 00:39:00 -0700 Subject: [PATCH 3/3] 2.1.35 --- Changelog.txt | 6 ++++++ pom.xml | 2 +- src/main/java/com/gmail/nossr50/config/Config.java | 2 +- .../java/com/gmail/nossr50/skills/mining/MiningManager.java | 2 +- src/main/resources/config.yml | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index f87862135..5227cac81 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -7,6 +7,12 @@ Key: ! Change - Removal +Version 2.1.35 + Readded the detonator config option + + NOTE: I decided to make the detonator configurable again because 2.2 is some ways off. Sorry for the inconvenience. + NOTE: Pickaxes are now usable for blast mining, this is in addition to the detonator that you can specify in the config. This will be more configurable in the upcoming 2.2 update. + Version 2.1.34 Added Llama to taming XP tables Added Parrot to taming XP tables diff --git a/pom.xml b/pom.xml index 722b2b0c1..85060027b 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.34 + 2.1.35 mcMMO https://github.com/mcMMO-Dev/mcMMO diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index 1092029c2..2082d7522 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -500,7 +500,7 @@ public class Config extends AutoUpdateConfigLoader { public double getFishingLureModifier() { return config.getDouble("Skills.Fishing.Lure_Modifier", 4.0D); } /* Mining */ - public int getMiningGate() { return config.getInt("Skills.Mining.Ability_Activation_Level_Gate", 10); } + public Material getDetonatorItem() { return Material.matchMaterial(config.getString("Skills.Mining.Detonator_Name", "FLINT_AND_STEEL")); } /* Excavation */ public int getExcavationGate() { return config.getInt("Skills.Excavation.Ability_Activation_Level_Gate", 10); } diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index 5bc2c29d5..f4569018f 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -43,7 +43,7 @@ public class MiningManager extends SkillManager { Player player = getPlayer(); return canUseBlastMining() && player.isSneaking() - && ItemUtils.isPickaxe(getPlayer().getInventory().getItemInMainHand()) + && (ItemUtils.isPickaxe(getPlayer().getInventory().getItemInMainHand()) || player.getInventory().getItemInMainHand().getType() == Config.getInstance().getDetonatorItem()) && Permissions.remoteDetonation(player); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 0cd309e50..1eae04589 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -348,6 +348,7 @@ Skills: Prevent_AFK_Leveling: true Mining: Level_Cap: 0 + Detonator_Name: FLINT_AND_STEEL Ability_Activation_Level_Gate: 10 Repair: Level_Cap: 0