From 6168309ec95519989ffe13ca7e08694bf1b45798 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 19 Feb 2020 17:41:47 -0800 Subject: [PATCH] 2.1.115 --- Changelog.txt | 10 ++++++---- pom.xml | 2 +- .../com/gmail/nossr50/listeners/BlockListener.java | 1 - .../nossr50/runnables/skills/DelayedCropReplant.java | 5 +---- .../com/gmail/nossr50/skills/herbalism/Herbalism.java | 2 -- .../nossr50/skills/herbalism/HerbalismManager.java | 9 ++++++--- src/main/resources/locale/locale_en_US.properties | 2 +- 7 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index b3440eba1..3f896291c 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,17 +1,19 @@ Version 2.1.115 + Green Thumb now requires a hoe to activate + Hoes no longer give free replants + You can sneak to break plants with a hoe in your hand (or just put the hoe away) + Using a hoe on non-fully grown crops will replant them as a convenience feature + New sound option in sounds.yml called 'ITEM_CONSUMED', plays when eating seeds for Green Thumb Cocoa plants now require GT of at least 2 to start at the second stage of growth Green Terra now boosts growth on Green Thumb by 1 stage (doesn't go above the maximum value though) - Green Thumb now requires a hoe to activate - You can sneak to break plants with a hoe in your hand (or just put the hoe away) - Hoes no longer give free replants There is now a feature in place to prevent breaking a newly automatically replanted (via green thumb) crop from being breakable for a few seconds after it appears - Using a hoe on non-fully grown crops will replant them as a convenience feature for those who can't bother to wait for all of their plants to grow (put away the hoe to break non-fully grown crops) Fixed a bug where Salvage always gave the best results Fixed an issue with arrows causing exceptions with players not yet having data loaded Spectral arrows are now tracked by mcMMO Use minimum level of salvageable properly Fix Axes Critical Strikes default permissions ( new fixed permission: mcmmo.ability.axes.criticalstrikes ) Fix potential null pointer exception for salvage + Updated locale entry 'Herbalism.SubSkill.GreenTerra.Description' Version 2.1.114 Fix some more locale usages, should aim to further prevent issues with oddball locales diff --git a/pom.xml b/pom.xml index 75680581b..99f42ca84 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.115-SNAPSHOT + 2.1.115 mcMMO https://github.com/mcMMO-Dev/mcMMO diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index 56503f3b0..c73e64f6a 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -14,7 +14,6 @@ import com.gmail.nossr50.events.fake.FakeBlockDamageEvent; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.skills.alchemy.Alchemy; import com.gmail.nossr50.skills.excavation.ExcavationManager; -import com.gmail.nossr50.skills.herbalism.Herbalism; import com.gmail.nossr50.skills.herbalism.HerbalismManager; import com.gmail.nossr50.skills.mining.MiningManager; import com.gmail.nossr50.skills.repair.Repair; diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/DelayedCropReplant.java b/src/main/java/com/gmail/nossr50/runnables/skills/DelayedCropReplant.java index f00f9579e..a1ee56320 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/DelayedCropReplant.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/DelayedCropReplant.java @@ -6,7 +6,6 @@ import com.gmail.nossr50.util.skills.ParticleEffectUtils; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; -import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState; import org.bukkit.block.data.Ageable; import org.bukkit.event.block.BlockBreakEvent; @@ -40,7 +39,7 @@ public class DelayedCropReplant extends BukkitRunnable { BlockState currentState = cropBlock.getState(); //Remove the metadata marking the block as recently replanted - new markPlantAsOld(blockBreakEvent.getBlock().getLocation()).runTaskLater(mcMMO.p, 20*5); + new markPlantAsOld(blockBreakEvent.getBlock().getLocation()).runTaskLater(mcMMO.p, 10); if(blockBreakEvent.isCancelled()) { wasImmaturePlant = true; @@ -90,8 +89,6 @@ public class DelayedCropReplant extends BukkitRunnable { Block cropBlock = cropLoc.getBlock(); if(cropBlock.getMetadata(mcMMO.REPLANT_META_KEY).size() > 0) cropBlock.setMetadata(mcMMO.REPLANT_META_KEY, new RecentlyReplantedCropMeta(mcMMO.p, false)); - - ParticleEffectUtils.playFluxEffect(cropLocation); } } diff --git a/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java index e461d2f37..60166dcdf 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java @@ -1,7 +1,5 @@ package com.gmail.nossr50.skills.herbalism; -import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.util.skills.SkillUtils; import org.bukkit.Material; import org.bukkit.block.BlockState; diff --git a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java index 8ff40c286..5e668a3db 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java @@ -17,7 +17,6 @@ import com.gmail.nossr50.datatypes.treasure.HylianTreasure; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.runnables.skills.DelayedCropReplant; import com.gmail.nossr50.runnables.skills.DelayedHerbalismXPCheckTask; -import com.gmail.nossr50.runnables.skills.HerbalismBlockUpdaterTask; import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.util.*; import com.gmail.nossr50.util.player.NotificationManager; @@ -39,7 +38,6 @@ import org.bukkit.entity.Player; import org.bukkit.event.block.BlockBreakEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.PlayerInventory; -import org.bukkit.metadata.FixedMetadataValue; import java.util.ArrayList; import java.util.Collection; @@ -189,7 +187,12 @@ public class HerbalismManager extends SkillManager { //When replanting a immature crop we cancel the block break event and back out if(greenThumbActivated) { - return; + if(originalBreak.getBlock().getBlockData() instanceof Ageable) { + Ageable ageableCrop = (Ageable) originalBreak.getBlock().getBlockData(); + if(!isAgeableMature(ageableCrop)) { + return; + } + } } /* diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index b2f5b7533..e7457ee53 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -270,7 +270,7 @@ Herbalism.Ability.Lower=[[GRAY]]You lower your Hoe. Herbalism.Ability.Ready=[[DARK_AQUA]]You [[GOLD]]ready[[DARK_AQUA]] your Hoe. Herbalism.Ability.ShroomThumb.Fail=**SHROOM THUMB FAIL** Herbalism.SubSkill.GreenTerra.Name=Green Terra -Herbalism.SubSkill.GreenTerra.Description=Spread the Terra, 3x Drops +Herbalism.SubSkill.GreenTerra.Description=Spread the Terra, 3x Drops, Boosts Green Thumb Herbalism.SubSkill.GreenTerra.Stat=Green Terra Duration Herbalism.SubSkill.GreenThumb.Name=Green Thumb Herbalism.SubSkill.GreenThumb.Description=Auto-Plants crops when harvesting