From 08b08b12856470cdd98bf2e04def4d0a9cbbec55 Mon Sep 17 00:00:00 2001 From: nopeless <38830903+nopeless@users.noreply.github.com> Date: Sat, 28 Jan 2023 13:57:31 -0600 Subject: [PATCH 01/22] Fix: player is no longer immune to projectiles shot by themselves (#4856) --- .../nossr50/listeners/EntityListener.java | 46 ++++++++----------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index e94ff9c6a..d795a84eb 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -362,40 +362,30 @@ public class EntityListener implements Listener { //Friendly fire checks if (defender instanceof Player defendingPlayer) { - Player attackingPlayer; - //If the attacker is a Player or a projectile belonging to a player - if(attacker instanceof Projectile || attacker instanceof Player) { - if(attacker instanceof Projectile projectile) { - if(((Projectile) attacker).getShooter() instanceof Player) { - attackingPlayer = (Player) projectile.getShooter(); + if(attacker instanceof Projectile projectile) { + if(projectile.getShooter() instanceof Player attackingPlayer && !attackingPlayer.equals(defendingPlayer)) { + //Check for party friendly fire and cancel the event + if (checkParties(event, defendingPlayer, attackingPlayer)) { + return; + } + } - //Check for party friendly fire and cancel the event - if (checkParties(event, defendingPlayer, attackingPlayer)) - { + //Deflect checks + final McMMOPlayer mcMMOPlayer = UserManager.getPlayer(defendingPlayer); + if (mcMMOPlayer != null) { + UnarmedManager unarmedManager = mcMMOPlayer.getUnarmedManager(); + + if (unarmedManager.canDeflect()) { + if (projectile instanceof Arrow && unarmedManager.deflectCheck()) { + event.setCancelled(true); return; } - } - - //Deflect checks - final McMMOPlayer mcMMOPlayer = UserManager.getPlayer(defendingPlayer); - if (mcMMOPlayer != null) { - UnarmedManager unarmedManager = mcMMOPlayer.getUnarmedManager(); - - if (unarmedManager.canDeflect()) { - if (projectile instanceof Arrow && unarmedManager.deflectCheck()) { - event.setCancelled(true); - return; - } - } - } - } else { - attackingPlayer = (Player) attacker; - //Check for party friendly fire and cancel the event - if (checkParties(event, defendingPlayer, attackingPlayer)) - return; } + } else if (attacker instanceof Player attackingPlayer){ + if (checkParties(event, defendingPlayer, attackingPlayer)) + return; } } From 2362fe994a5f504935c703a3b9f287430a3af2eb Mon Sep 17 00:00:00 2001 From: Jok <7284033+Elioby@users.noreply.github.com> Date: Fri, 10 Feb 2023 02:11:30 +0000 Subject: [PATCH 02/22] Don't call EntityDamageByEntityEvent with null damager (#4863) Co-authored-by: Elioby --- .../com/gmail/nossr50/util/skills/CombatUtils.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 bf4a3a4ee..ac9cc6388 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java @@ -8,6 +8,7 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent; +import com.gmail.nossr50.events.fake.FakeEntityDamageEvent; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.metadata.MobMetaFlagType; import com.gmail.nossr50.metadata.MobMetadataService; @@ -885,8 +886,14 @@ public final class CombatUtils { return false; } - public static boolean canDamage(@NotNull Entity attacker, @NotNull Entity target, @NotNull DamageCause damageCause, double damage) { - EntityDamageEvent damageEvent = new FakeEntityDamageByEntityEvent(attacker, target, damageCause, damage); + public static boolean canDamage(@Nullable Entity attacker, @NotNull Entity target, @NotNull DamageCause damageCause, double damage) { + EntityDamageEvent damageEvent; + if (attacker != null) { + damageEvent = new FakeEntityDamageByEntityEvent(attacker, target, damageCause, damage); + } else { + damageEvent = new FakeEntityDamageEvent(target, damageCause, damage); + } + mcMMO.p.getServer().getPluginManager().callEvent(damageEvent); return !damageEvent.isCancelled(); From 01fbfccc0d0d48051f6f78aa507a6d4f40527de2 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 9 Feb 2023 18:12:46 -0800 Subject: [PATCH 03/22] feat: Make power level display for offline players (#4861) Fixes #4599 --- .../gmail/nossr50/commands/player/InspectCommand.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/player/InspectCommand.java b/src/main/java/com/gmail/nossr50/commands/player/InspectCommand.java index f1b93b1af..816656b1f 100644 --- a/src/main/java/com/gmail/nossr50/commands/player/InspectCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/player/InspectCommand.java @@ -47,21 +47,28 @@ public class InspectCommand implements TabExecutor { sender.sendMessage(LocaleLoader.getString("Inspect.OfflineStats", playerName)); + // Sum power level + int powerLevel = 0; + sender.sendMessage(LocaleLoader.getString("Stats.Header.Gathering")); for (PrimarySkillType skill : mcMMO.p.getSkillTools().GATHERING_SKILLS) { sender.sendMessage(CommandUtils.displaySkill(profile, skill)); + powerLevel += profile.getSkillLevel(skill); } sender.sendMessage(LocaleLoader.getString("Stats.Header.Combat")); for (PrimarySkillType skill : mcMMO.p.getSkillTools().COMBAT_SKILLS) { sender.sendMessage(CommandUtils.displaySkill(profile, skill)); + powerLevel += profile.getSkillLevel(skill); } sender.sendMessage(LocaleLoader.getString("Stats.Header.Misc")); for (PrimarySkillType skill : mcMMO.p.getSkillTools().MISC_SKILLS) { sender.sendMessage(CommandUtils.displaySkill(profile, skill)); + powerLevel += profile.getSkillLevel(skill); } + sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", powerLevel)); } else { Player target = mcMMOPlayer.getPlayer(); boolean isVanished = false; @@ -95,9 +102,7 @@ public class InspectCommand implements TabExecutor { CommandUtils.printCombatSkills(target, sender); CommandUtils.printMiscSkills(target, sender); - if (!isVanished) { - sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", mcMMOPlayer.getPowerLevel())); - } + sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", mcMMOPlayer.getPowerLevel())); } return true; From 643dff7915f188cff9a01ef4ea09dfc0ccad9f94 Mon Sep 17 00:00:00 2001 From: CuteLittleSky <62592731+CuteLittleSky@users.noreply.github.com> Date: Fri, 10 Feb 2023 10:16:26 +0800 Subject: [PATCH 04/22] Update locale_zh_CN.properties (#4858) --- src/main/resources/locale/locale_zh_CN.properties | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/resources/locale/locale_zh_CN.properties b/src/main/resources/locale/locale_zh_CN.properties index fcb88284c..0b139369c 100644 --- a/src/main/resources/locale/locale_zh_CN.properties +++ b/src/main/resources/locale/locale_zh_CN.properties @@ -999,12 +999,12 @@ Skills.Parents=主技能 Skills.Stats={0}&a{1}&3 XP(&7{2}&3/&7{3}&3) Skills.ChildStats={0}&a{1} Skills.MaxXP=最大 -Skills.TooTired=你太累了暂时无法使用该技能.&e({0}s) +Skills.TooTired=你太累了,暂时无法使用该技能.&e({0}s) Skills.TooTired.Named=&7(&6{0}&e {1}s&7) Skills.TooTired.Extra=&6{0} &e技能冷却时间 - {1} Skills.Cancelled=&6{0} &c已取消! Skills.ConfirmOrCancel=&a再次右键以确定 &6{0}&a. 左键取消. -Skills.AbilityGateRequirementFail=&7你需要 &e{0}&7 级以上的 &3{1}&7 来使用这个能力. +Skills.AbilityGateRequirementFail=&7你还需要提升 &e{0}&7 级 &3{1}&7 才能使用这个能力. #数据 Stats.Header.Combat=&6-=格斗技能=- Stats.Header.Gathering=&6-=采集技能=- @@ -1066,7 +1066,7 @@ Commands.Description.addlevels=给玩家增加 mcMMO 等级 Commands.Description.adminchat=切换 mcMMO 管理员聊天或发送管理员聊天信息 Commands.Description.addxp=给玩家增加 mcMMO 经验 Commands.Description.hardcore=修改 mcMMO hardcore 百分比或切换 hardcore 模式开/关 -Commands.Description.inspect=查看玩家详细的 mcMMO 信息 +Commands.Description.inspect=查看玩家的 mcMMO 详细信息 Commands.Description.mcability=切换 mcMMO 技能右键激活 开/关 Commands.Description.mccooldown=查看所有mcMMO技能冷却时间 Commands.Description.mcchatspy=切换对完聊天监视开/关 @@ -1095,8 +1095,8 @@ Commands.Description.vampirism=更改 mcMMO 榨取百分比 或切换 vampirism Commands.Description.xplock=锁定指定 mcMMO 技能的经验条 Commands.Description.xprate=更改 mcMMO 经验倍率或开启一个 mcMMO 经验翻倍事件 #更新检查器 -UpdateChecker.Outdated=你正在使用这一个旧版本的 mcMMO! -UpdateChecker.NewAvailable=Spigot 上有一个新版本. +UpdateChecker.Outdated=你正在使用旧版本的 mcMMO! +UpdateChecker.NewAvailable=在 Spigot 上有一个新版本. #记分板抬头 Scoreboard.Header.PlayerStats=&emcMMO 统计 Scoreboard.Header.PlayerCooldowns=&emcMMO 冷却 @@ -1111,7 +1111,7 @@ Scoreboard.Misc.Cooldown=&d冷却 Scoreboard.Misc.Overall=&6总体 Scoreboard.Misc.Ability=能力 #数据库恢复 -Profile.PendingLoad=&c你的mcMMO玩家数据未加载. +Profile.PendingLoad=&c你的mcMMO玩家数据未正常加载. Profile.Loading.Success=&a你的mcMMO数据已加载 Profile.Loading.Failure=&cmcMMO 无法加载你的数据. 请联系 &b服务器管理员反馈你的问题.\n&e你可以继续在服务器游玩, 但是你 &l没有mcMMO等级&e 并且你获得的任何经验都 &l不会被保存&e. Profile.Loading.AdminFailureNotice=&4[A]&c mcMMO 无法加载玩家 &e{0}&c 的数据. &d请检查你的数据库. @@ -1141,4 +1141,4 @@ Chat.Channel.Off=&6(&amcMMO-聊天&6) &7你的聊天消息将不再自动发送 Chat.Spy.Party=&6[&eSPY&6-&a{2}&6] &r{0} &b→ &r{1} Broadcasts.LevelUpMilestone=&6(&amcMMO&6) {0}&7 的 &3{2}&7 技能等级提升到了 &a{1}&7! Broadcasts.PowerLevelUpMilestone=&6(&amcMMO&6) {0}&7 总等级已达到 &a{1}&7! -Scoreboard.Recovery=正在尝试恢复 mcMMO 记分牌... \ No newline at end of file +Scoreboard.Recovery=正在尝试恢复 mcMMO 记分牌... From af15617196af098cbcb03f07f79f78c8aa84d25f Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 19 Feb 2023 13:40:14 -0800 Subject: [PATCH 05/22] Add config toggle for Blast Mining bonus drops to advanced.yml --- Changelog.txt | 3 ++ pom.xml | 2 +- .../gmail/nossr50/config/AdvancedConfig.java | 4 +++ .../datatypes/skills/PrimarySkillType.java | 34 ------------------- .../nossr50/skills/mining/MiningManager.java | 26 ++++++-------- src/main/resources/advanced.yml | 2 ++ 6 files changed, 21 insertions(+), 50 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 01e963a4b..7cf558e61 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,6 @@ +Version 2.1.219 + Added 'Skills.Mining.BlastMining.Bonus_Drops.Enabled' to advanced.yml to enable/disable bonus drops from Blast Mining + Version 2.1.218 Fixed locale pt_BR type (thanks MrPowerGamerBR) Updated Russian Locale (thanks imDaniX) diff --git a/pom.xml b/pom.xml index 1b70bbae7..cac58a15e 100755 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.gmail.nossr50.mcMMO mcMMO - 2.1.218 + 2.1.219-SNAPSHOT mcMMO https://github.com/mcMMO-Dev/mcMMO diff --git a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java index 84da46281..25425a0a3 100644 --- a/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java +++ b/src/main/java/com/gmail/nossr50/config/AdvancedConfig.java @@ -777,6 +777,10 @@ public class AdvancedConfig extends BukkitConfig { return config.getDouble("Skills.Mining.BlastMining.OreBonus.Rank_" + rank); } + public boolean isBlastMiningBonusDropsEnabled() { + return config.getBoolean("Skills.Mining.BlastMining.Bonus_Drops.Enabled", true); + } + public double getDebrisReduction(int rank) { return config.getDouble("Skills.Mining.BlastMining.DebrisReduction.Rank_" + rank); } diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java b/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java index 22ab7f4a6..5b513c280 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java @@ -27,40 +27,6 @@ public enum PrimarySkillType { TAMING, UNARMED, WOODCUTTING; -// boolean issueWarning = true; - - /* - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - * Everything below here will be removed in 2.2 (Tridents & Crossbows) - */ - - -// private void processWarning() { -// if(issueWarning) { -// StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); -// Bukkit.getScheduler().scheduleSyncDelayedTask(mcMMO.p, () -> { -// mcMMO.p.getLogger().severe("A plugin that hooks into mcMMO via the mcMMO API is using soon to be deprecated API calls. Contact the plugin author and inform them to update their code before it breaks."); -// mcMMO.p.getLogger().severe("Deprecation Call from: " + stackTraceElements[2].toString()); -// mcMMO.p.getLogger().severe("This warning will not repeat itself. Nothing is broken for now, but in the future it will be."); -// }); -// -// issueWarning = !issueWarning; -// } -// } /** * WARNING: Being removed in an upcoming update, you should be using mcMMO.getSkillTools() instead 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 6205173aa..1e2dacc88 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -1,6 +1,7 @@ package com.gmail.nossr50.skills.mining; import com.gmail.nossr50.api.ItemSpawnReason; +import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.experience.XPGainReason; import com.gmail.nossr50.datatypes.interactions.NotificationType; @@ -188,7 +189,7 @@ public class MiningManager extends SkillManager { Misc.spawnItem(getPlayer(), Misc.getBlockCenter(blockState), new ItemStack(blockState.getType()), ItemSpawnReason.BLAST_MINING_ORES); // Initial block that would have been dropped - if (!mcMMO.getPlaceStore().isTrue(blockState)) { + if (mcMMO.p.getAdvancedConfig().isBlastMiningBonusDropsEnabled() && !mcMMO.getPlaceStore().isTrue(blockState)) { for (int i = 1; i < dropMultiplier; i++) { // Bukkit.broadcastMessage("Bonus Drop on Ore: "+blockState.getType().toString()); Misc.spawnItem(getPlayer(), Misc.getBlockCenter(blockState), new ItemStack(blockState.getType()), ItemSpawnReason.BLAST_MINING_ORES_BONUS_DROP); // Initial block that would have been dropped @@ -275,21 +276,16 @@ public class MiningManager extends SkillManager { * @return the Blast Mining tier */ public int getDropMultiplier() { - switch(getBlastMiningTier()) { - case 8: - case 7: - return 3; - case 6: - case 5: - case 4: - case 3: - return 2; - case 2: - case 1: - return 1; - default: - return 0; + if (mcMMO.p.getAdvancedConfig().isBlastMiningBonusDropsEnabled()) { + return 0; } + + return switch (getBlastMiningTier()) { + case 8, 7 -> 3; + case 6, 5, 4, 3 -> 2; + case 2, 1 -> 1; + default -> 0; + }; } /** diff --git a/src/main/resources/advanced.yml b/src/main/resources/advanced.yml index 66b79f79a..4ade2d77c 100644 --- a/src/main/resources/advanced.yml +++ b/src/main/resources/advanced.yml @@ -289,6 +289,8 @@ Skills: RetroMode: 1000 BlastMining: + Bonus_Drops: + Enabled: true # BlastDamageDecrease Ranks: % of damage reduced from TNT explosions BlastDamageDecrease: Rank_1: 0.0 From 6bdc51be762c63232c77b67acb149419bc212215 Mon Sep 17 00:00:00 2001 From: Warrior <50800980+Warriorrrr@users.noreply.github.com> Date: Sun, 26 Feb 2023 00:20:45 +0100 Subject: [PATCH 06/22] Fix missing return in notify command (#4870) --- src/main/java/com/gmail/nossr50/commands/McnotifyCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/commands/McnotifyCommand.java b/src/main/java/com/gmail/nossr50/commands/McnotifyCommand.java index 2ffb16910..d693a99c7 100644 --- a/src/main/java/com/gmail/nossr50/commands/McnotifyCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/McnotifyCommand.java @@ -24,8 +24,10 @@ public class McnotifyCommand implements TabExecutor { McMMOPlayer mcMMOPlayer = UserManager.getPlayer((Player) sender); //Not Loaded yet - if (mcMMOPlayer == null) + if (mcMMOPlayer == null) { sender.sendMessage(LocaleLoader.getString("Profile.PendingLoad")); + return true; + } sender.sendMessage(LocaleLoader.getString("Commands.Notifications." + (mcMMOPlayer.useChatNotifications() ? "Off" : "On"))); mcMMOPlayer.toggleChatNotifications(); From 2d78eaa495f5a2ee7629aad97cec27125431cbdd Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 19 Mar 2023 21:21:54 -0700 Subject: [PATCH 07/22] Fixed Beetroots double drop issue #4667 --- Changelog.txt | 1 + .../java/com/gmail/nossr50/listeners/BlockListener.java | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 7cf558e61..469039924 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,4 +1,5 @@ Version 2.1.219 + Fixed double drop issue with Beetroots Added 'Skills.Mining.BlastMining.Bonus_Drops.Enabled' to advanced.yml to enable/disable bonus drops from Blast Mining Version 2.1.218 diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index fcfb8096a..d931d6ca9 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -38,6 +38,7 @@ import org.bukkit.event.block.*; import org.bukkit.inventory.ItemStack; import java.util.HashSet; +import java.util.Locale; public class BlockListener implements Listener { private final mcMMO plugin; @@ -56,6 +57,12 @@ public class BlockListener implements Listener { return; } + int tileEntityTolerance = 1; + + // beetroot hotfix, potentially other plants may need this fix + if(event.getBlockState().getType() == Material.BEETROOTS) + tileEntityTolerance = 2; + //Track how many "things" are being dropped HashSet uniqueMaterials = new HashSet<>(); boolean dontRewardTE = false; //If we suspect TEs are mixed in with other things don't reward bonus drops for anything that isn't a block @@ -70,7 +77,7 @@ public class BlockListener implements Listener { blockCount++; } - if(uniqueMaterials.size() > 1) { + if(uniqueMaterials.size() > tileEntityTolerance) { //Too many things are dropping, assume tile entities might be duped //Technically this would also prevent something like coal from being bonus dropped if you placed a TE above a coal ore when mining it but that's pretty edge case and this is a good solution for now dontRewardTE = true; From c072ae4990d0f5989fddbdccb4aa40458bf128a1 Mon Sep 17 00:00:00 2001 From: optimizing-ci-builds <108610715+optimizing-ci-builds@users.noreply.github.com> Date: Wed, 22 Mar 2023 00:05:40 -0500 Subject: [PATCH 08/22] disable xml report (#4880) --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 77c087bb6..ddd132071 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -49,4 +49,4 @@ jobs: # 4. Build via Maven - name: Build via Maven - run: mvn verify -B --file pom.xml + run: mvn verify -B --file pom.xml -DdisableXmlReport=true From d84a5b37b7a72227ad354196d5ed51696729e78e Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 26 Mar 2023 13:22:31 -0700 Subject: [PATCH 09/22] Update kyori dependencies --- pom.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index cac58a15e..4377c2962 100755 --- a/pom.xml +++ b/pom.xml @@ -254,37 +254,37 @@ net.kyori adventure-text-serializer-gson - 4.11.0 + 4.13.0 net.kyori adventure-api - 4.11.0 + 4.13.0 net.kyori adventure-nbt - 4.11.0 + 4.13.0 net.kyori adventure-key - 4.11.0 + 4.13.0 net.kyori adventure-text-serializer-gson-legacy-impl - 4.11.0 + 4.13.0 net.kyori adventure-platform-bukkit - 4.1.2 + 4.3.0 net.kyori adventure-platform-api - 4.1.2 + 4.3.0 org.apache.maven.scm From 668cc0e4a333602e3c64ad5cd7f93c598669d34e Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 19:53:13 -0700 Subject: [PATCH 10/22] Add support for upcoming Cherry trees --- Changelog.txt | 5 +++++ src/main/java/com/gmail/nossr50/util/MaterialMapStore.java | 3 +++ src/main/resources/experience.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index 469039924..94a53d562 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,10 @@ Version 2.1.219 + Added support for various things from Minecraft 1.20 Fixed double drop issue with Beetroots + Added 'Cherry_Log' to woodcutting experience in experience.yml + Added 'Cherry_Wood' to woodcutting experience in experience.yml + Added 'Stripped_Cherry_Log' to woodcutting experience in experience.yml + Added 'Stripped_Cherry_Wood' to woodcutting experience in experience.yml Added 'Skills.Mining.BlastMining.Bonus_Drops.Enabled' to advanced.yml to enable/disable bonus drops from Blast Mining Version 2.1.218 diff --git a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java index 446372101..400b95b00 100644 --- a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java +++ b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java @@ -1017,6 +1017,7 @@ public class MaterialMapStore { private void fillTreeFellerDestructibleWhiteList() { treeFellerDestructibleWhiteList.add("oak_leaves"); + treeFellerDestructibleWhiteList.add("cherry_leaves"); treeFellerDestructibleWhiteList.add("acacia_leaves"); treeFellerDestructibleWhiteList.add("birch_leaves"); treeFellerDestructibleWhiteList.add("dark_oak_leaves"); @@ -1267,6 +1268,8 @@ public class MaterialMapStore { toolBlackList.add("spruce_wall_sign"); toolBlackList.add("oak_sign"); toolBlackList.add("oak_wall_sign"); + toolBlackList.add("stripped_cherry_log"); + toolBlackList.add("stripped_cherry_wood"); toolBlackList.add("stripped_acacia_log"); toolBlackList.add("stripped_acacia_wood"); toolBlackList.add("stripped_birch_log"); diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index f1bde0450..31414a8c6 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -277,18 +277,21 @@ Experience_Values: Crimson_Stem: 35 Warped_Stem: 35 Oak_Log: 70 + Cherry_Log: 105 Spruce_Log: 80 Birch_Log: 90 Jungle_Log: 100 Acacia_Log: 90 Dark_Oak_Log: 90 Stripped_Oak_Log: 70 + Stripped_Cherry_Log: 105 Stripped_Spruce_Log: 80 Stripped_Birch_Log: 90 Stripped_Jungle_Log: 100 Stripped_Acacia_Log: 90 Stripped_Dark_Oak_Log: 90 Stripped_Oak_Wood: 70 + Stripped_Cherry_Wood: 70 Stripped_Spruce_Wood: 80 Stripped_Birch_Wood: 90 Stripped_Jungle_Wood: 100 @@ -298,6 +301,7 @@ Experience_Values: Stripped_Crimson_Stem: 50 Stripped_Warped_Stem: 50 Oak_Wood: 70 + Cherry_Wood: 105 Spruce_Wood: 70 Birch_Wood: 70 Jungle_Wood: 70 From ca710b4302573b8f9ff0a14da406e78d8903a3cb Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 19:55:30 -0700 Subject: [PATCH 11/22] Add chiseled_bookshelf to tool readiness blacklist --- Changelog.txt | 2 +- src/main/java/com/gmail/nossr50/util/MaterialMapStore.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 94a53d562..dce9c5746 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,5 @@ Version 2.1.219 - Added support for various things from Minecraft 1.20 + Added support for various new things from Minecraft 1.20 Fixed double drop issue with Beetroots Added 'Cherry_Log' to woodcutting experience in experience.yml Added 'Cherry_Wood' to woodcutting experience in experience.yml diff --git a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java index 400b95b00..5e215d228 100644 --- a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java +++ b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java @@ -1172,6 +1172,7 @@ public class MaterialMapStore { private void fillToolBlackList() { + toolBlackList.add("chiseled_bookshelf"); toolBlackList.add("black_bed"); toolBlackList.add("blue_bed"); toolBlackList.add("brown_bed"); From db4b820f80ab0d0b6de06df15ca9b7d9f2835f89 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 19:58:16 -0700 Subject: [PATCH 12/22] Add new hanging signs to tool readiness blacklist --- .../java/com/gmail/nossr50/util/MaterialMapStore.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java index 5e215d228..701d2b43c 100644 --- a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java +++ b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java @@ -1258,17 +1258,26 @@ public class MaterialMapStore { toolBlackList.add("yellow_shulker_box"); toolBlackList.add("shulker_box"); toolBlackList.add("acacia_sign"); + toolBlackList.add("acacia_hanging_sign"); toolBlackList.add("acacia_wall_sign"); toolBlackList.add("birch_sign"); + toolBlackList.add("birch_hanging_sign"); toolBlackList.add("birch_wall_sign"); toolBlackList.add("dark_oak_sign"); + toolBlackList.add("dark_oak_hanging_sign"); toolBlackList.add("dark_oak_wall_sign"); toolBlackList.add("jungle_sign"); + toolBlackList.add("jungle_hanging_sign"); toolBlackList.add("jungle_wall_sign"); toolBlackList.add("spruce_sign"); + toolBlackList.add("spruce_hanging_sign"); toolBlackList.add("spruce_wall_sign"); toolBlackList.add("oak_sign"); + toolBlackList.add("oak_hanging_sign"); toolBlackList.add("oak_wall_sign"); + toolBlackList.add("cherry_sign"); + toolBlackList.add("cherry_hanging_sign"); + toolBlackList.add("cherry_wall_sign"); toolBlackList.add("stripped_cherry_log"); toolBlackList.add("stripped_cherry_wood"); toolBlackList.add("stripped_acacia_log"); From 4c792c4f2cef08596038ae302ad2faf4638bebfe Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 20:00:58 -0700 Subject: [PATCH 13/22] Added Pink_Petals to experience.yml --- Changelog.txt | 1 + src/main/resources/experience.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index dce9c5746..c14e69f63 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,7 @@ Version 2.1.219 Added support for various new things from Minecraft 1.20 Fixed double drop issue with Beetroots + Added 'Pink_Petals' to herbalism experience in experience.yml Added 'Cherry_Log' to woodcutting experience in experience.yml Added 'Cherry_Wood' to woodcutting experience in experience.yml Added 'Stripped_Cherry_Log' to woodcutting experience in experience.yml diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index 31414a8c6..c9577279c 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -314,6 +314,7 @@ Experience_Values: Brown_Mushroom_Block: 70 Mushroom_Stem: 80 Herbalism: + Pink_Petals: 10 Small_Dripleaf: 140 Big_Dripleaf: 140 Cave_Vines: 90 From 100a7f8a8f178c486d7076f24aa64ea0624bd33c Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 20:02:32 -0700 Subject: [PATCH 14/22] Added pink_petals, cherry_wood, and cherry_log to bonus drops in config.yml --- Changelog.txt | 3 +++ src/main/resources/config.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index c14e69f63..412c45aed 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,9 @@ Version 2.1.219 Added support for various new things from Minecraft 1.20 Fixed double drop issue with Beetroots + Added 'Pink_Petals' to bonus drops in config.yml + Added 'Cherry_Log' to bonus drops in config.yml + Added 'Cherry_Wood' to bonus drops in config.yml Added 'Pink_Petals' to herbalism experience in experience.yml Added 'Cherry_Log' to woodcutting experience in experience.yml Added 'Cherry_Wood' to woodcutting experience in experience.yml diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 4bf2c25a2..711d2f40c 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -464,6 +464,7 @@ Green_Thumb_Replanting_Crops: ### Bonus_Drops: Herbalism: + Pink_Petals: true Glow_Berries: true Cave_Vines: true Cave_Vines_Plant: true @@ -601,6 +602,8 @@ Bonus_Drops: Acacia_Log: true Birch_Wood: true Birch_Log: true + Cherry_Wood: true + Cherry_Log: true Dark_Oak_Wood: true Dark_Oak_Log: true Oak_Wood: true From 6106f70c240160492cca63ba0f8afa4da3f8f720 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 20:05:52 -0700 Subject: [PATCH 15/22] Added Pitcher_Plants to bonus drops and herbalism experience --- Changelog.txt | 2 ++ src/main/resources/config.yml | 1 + src/main/resources/experience.yml | 1 + 3 files changed, 4 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index 412c45aed..9e410bba4 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,9 +1,11 @@ Version 2.1.219 Added support for various new things from Minecraft 1.20 Fixed double drop issue with Beetroots + Added 'Pitcher_Plant' to bonus drops in config.yml Added 'Pink_Petals' to bonus drops in config.yml Added 'Cherry_Log' to bonus drops in config.yml Added 'Cherry_Wood' to bonus drops in config.yml + Added 'Pitcher_Plant' to herbalism experience in experience.yml Added 'Pink_Petals' to herbalism experience in experience.yml Added 'Cherry_Log' to woodcutting experience in experience.yml Added 'Cherry_Wood' to woodcutting experience in experience.yml diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 711d2f40c..25684841d 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -464,6 +464,7 @@ Green_Thumb_Replanting_Crops: ### Bonus_Drops: Herbalism: + Pitcher_Plant: true Pink_Petals: true Glow_Berries: true Cave_Vines: true diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index c9577279c..d29a9d27e 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -314,6 +314,7 @@ Experience_Values: Brown_Mushroom_Block: 70 Mushroom_Stem: 80 Herbalism: + Pitcher_Plant: 160 Pink_Petals: 10 Small_Dripleaf: 140 Big_Dripleaf: 140 From 0b4d87aebc759ee5dff08f47b3da2368f752fc99 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 20:07:50 -0700 Subject: [PATCH 16/22] Add Sniffer and Snifflet to combat experience in experience.yml --- Changelog.txt | 2 ++ src/main/resources/experience.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index 9e410bba4..7bb5f42ec 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -5,6 +5,8 @@ Version 2.1.219 Added 'Pink_Petals' to bonus drops in config.yml Added 'Cherry_Log' to bonus drops in config.yml Added 'Cherry_Wood' to bonus drops in config.yml + Added 'Sniffer' to combat experience in experience.yml + Added 'Snifflet' to combat experience in experience.yml Added 'Pitcher_Plant' to herbalism experience in experience.yml Added 'Pink_Petals' to herbalism experience in experience.yml Added 'Cherry_Log' to woodcutting experience in experience.yml diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index d29a9d27e..241ac17f0 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -639,3 +639,5 @@ Experience_Values: Frog: 1.7 Warden: 6.0 Tadpole: 0.2 + Sniffer: 1.1 + Snifflet: 1.1 From ae961caeab3ed569b69afca3055b2864ad27c265 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 20:11:10 -0700 Subject: [PATCH 17/22] Added Torchflower to herbalism experience and bonus drops --- Changelog.txt | 2 ++ src/main/resources/config.yml | 1 + src/main/resources/experience.yml | 1 + 3 files changed, 4 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index 7bb5f42ec..52463fbe6 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -2,11 +2,13 @@ Version 2.1.219 Added support for various new things from Minecraft 1.20 Fixed double drop issue with Beetroots Added 'Pitcher_Plant' to bonus drops in config.yml + Added 'Torchflower' to bonus drops in config.yml Added 'Pink_Petals' to bonus drops in config.yml Added 'Cherry_Log' to bonus drops in config.yml Added 'Cherry_Wood' to bonus drops in config.yml Added 'Sniffer' to combat experience in experience.yml Added 'Snifflet' to combat experience in experience.yml + Added 'Torchflower' to herbalism experience in experience.yml Added 'Pitcher_Plant' to herbalism experience in experience.yml Added 'Pink_Petals' to herbalism experience in experience.yml Added 'Cherry_Log' to woodcutting experience in experience.yml diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 25684841d..b9eae9772 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -465,6 +465,7 @@ Green_Thumb_Replanting_Crops: Bonus_Drops: Herbalism: Pitcher_Plant: true + Torchflower: true Pink_Petals: true Glow_Berries: true Cave_Vines: true diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index 241ac17f0..a156db0dc 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -407,6 +407,7 @@ Experience_Values: Cornflower: 150 Lily_Of_The_Valley: 150 Wither_Rose: 500 + Torchflower: 90 Mining: Sculk: 4 Sculk_Vein: 3 From cd96bc79d8cf1f60e5d6d1caf6e26d9d31472160 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 20:24:04 -0700 Subject: [PATCH 18/22] Change isHerbalismDrop to use strings.. this method still needs more work --- Changelog.txt | 1 + .../com/gmail/nossr50/util/ItemUtils.java | 52 ++++++++++--------- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 52463fbe6..5ae385791 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -16,6 +16,7 @@ Version 2.1.219 Added 'Stripped_Cherry_Log' to woodcutting experience in experience.yml Added 'Stripped_Cherry_Wood' to woodcutting experience in experience.yml Added 'Skills.Mining.BlastMining.Bonus_Drops.Enabled' to advanced.yml to enable/disable bonus drops from Blast Mining + NOTE: There are plans to add experience for discovering items via the new brushing mechanic, but this will have to wait for new Spigot API to become available Version 2.1.218 Fixed locale pt_BR type (thanks MrPowerGamerBR) diff --git a/src/main/java/com/gmail/nossr50/util/ItemUtils.java b/src/main/java/com/gmail/nossr50/util/ItemUtils.java index 9f3d58e23..ed763fdf3 100644 --- a/src/main/java/com/gmail/nossr50/util/ItemUtils.java +++ b/src/main/java/com/gmail/nossr50/util/ItemUtils.java @@ -22,6 +22,7 @@ import org.jetbrains.annotations.Nullable; import java.util.Collections; import java.util.List; +import java.util.Locale; public final class ItemUtils { /** @@ -413,31 +414,31 @@ public final class ItemUtils { */ public static boolean isHerbalismDrop(ItemStack item) { //TODO: 1.14 This needs to be updated - switch (item.getType()) { - case WHEAT: - case WHEAT_SEEDS: - case CARROT: - case CHORUS_FRUIT: - case CHORUS_FLOWER: - case POTATO: - case BEETROOT: - case BEETROOTS: - case BEETROOT_SEEDS: - case NETHER_WART: - case BROWN_MUSHROOM: - case RED_MUSHROOM: - case ROSE_BUSH: - case DANDELION: - case CACTUS: - case SUGAR_CANE: - case MELON: - case MELON_SEEDS: - case PUMPKIN: - case PUMPKIN_SEEDS: - case LILY_PAD: - case VINE: - case TALL_GRASS: - case COCOA_BEANS: + switch (item.getType().getKey().getKey().toLowerCase()) { + case "wheat": + case "wheat_seeds": + case "carrot": + case "chorus_fruit": + case "chorus_flower": + case "potato": + case "beetroot": + case "beetroots": + case "beetroot_seeds": + case "nether_wart": + case "brown_mushroom": + case "red_mushroom": + case "rose_bush": + case "dandelion": + case "cactus": + case "sugar_cane": + case "melon": + case "melon_seeds": + case "pumpkin": + case "pumpkin_seeds": + case "lily_pad": + case "vine": + case "tall_grass": + case "cocoa_beans": return true; default: @@ -445,6 +446,7 @@ public final class ItemUtils { } } + /** * Checks to see if an item is a mob drop. * From 5f388a9906764191635fe8f9ebec08f3adef8594 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 20:38:05 -0700 Subject: [PATCH 19/22] Add support for torchflower replanting to herbalism --- .../skills/herbalism/HerbalismManager.java | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) 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 aae793b6d..129db8c67 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java @@ -42,10 +42,7 @@ import org.bukkit.inventory.PlayerInventory; import org.bukkit.scheduler.BukkitRunnable; import org.jetbrains.annotations.NotNull; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; +import java.util.*; public class HerbalismManager extends SkillManager { public HerbalismManager(McMMOPlayer mcMMOPlayer) { @@ -773,35 +770,40 @@ public class HerbalismManager extends SkillManager { PlayerInventory playerInventory = player.getInventory(); Material seed; - switch (blockState.getType()) { - case CARROTS: - seed = Material.CARROT; + switch (blockState.getType().getKey().getKey().toLowerCase(Locale.ROOT)) { + case "carrots": + seed = Material.matchMaterial("CARROT"); break; - case WHEAT: - seed = Material.WHEAT_SEEDS; + case "wheat": + seed = Material.matchMaterial("WHEAT_SEEDS"); break; - case NETHER_WART: - seed = Material.NETHER_WART; + case "nether_wart": + seed = Material.getMaterial("NETHER_WART"); break; - case POTATOES: - seed = Material.POTATO; + case "potatoes": + seed = Material.matchMaterial("POTATO"); break; - case BEETROOTS: - seed = Material.BEETROOT_SEEDS; + case "beetroots": + seed = Material.matchMaterial("BEETROOT_SEEDS"); break; - case COCOA: - seed = Material.COCOA_BEANS; + case "cocoa": + seed = Material.matchMaterial("COCOA_BEANS"); + break; + + case "torchflower": + seed = Material.matchMaterial("TORCHFLOWER_SEEDS"); break; default: return false; } + ItemStack seedStack = new ItemStack(seed); if (ItemUtils.isAxe(blockBreakEvent.getPlayer().getInventory().getItemInMainHand()) From 283fa14380a2f59a441394c8c7280a7890e791c4 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 20:42:06 -0700 Subject: [PATCH 20/22] Add Camel, Sniffer, and Snifflet to taming XP --- Changelog.txt | 4 ++++ src/main/resources/experience.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index 5ae385791..d92662b17 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,11 +1,15 @@ Version 2.1.219 Added support for various new things from Minecraft 1.20 Fixed double drop issue with Beetroots + Added 'Camel' to taming experience in experience.yml + Added 'Sniffer' to taming experience in experience.yml + Added 'Snifflet' to taming experience in experience.yml Added 'Pitcher_Plant' to bonus drops in config.yml Added 'Torchflower' to bonus drops in config.yml Added 'Pink_Petals' to bonus drops in config.yml Added 'Cherry_Log' to bonus drops in config.yml Added 'Cherry_Wood' to bonus drops in config.yml + Added 'Camel' to combat experience in experience.yml Added 'Sniffer' to combat experience in experience.yml Added 'Snifflet' to combat experience in experience.yml Added 'Torchflower' to herbalism experience in experience.yml diff --git a/src/main/resources/experience.yml b/src/main/resources/experience.yml index a156db0dc..88a3150dd 100644 --- a/src/main/resources/experience.yml +++ b/src/main/resources/experience.yml @@ -548,6 +548,9 @@ Experience_Values: Cobbled_Deepslate: 5 Taming: Animal_Taming: + Camel: 1300 + Sniffer: 1500 + Snifflet: 900 Llama: 1200 Wolf: 250 Ocelot: 500 @@ -642,3 +645,4 @@ Experience_Values: Tadpole: 0.2 Sniffer: 1.1 Snifflet: 1.1 + Camel: 1.2 From e011f545a77d85a0d83b754f31a586e6b30a9f96 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 2 Apr 2023 20:44:00 -0700 Subject: [PATCH 21/22] Added smithing_table to tool readiness blacklist --- src/main/java/com/gmail/nossr50/util/MaterialMapStore.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java index 701d2b43c..7ed67d191 100644 --- a/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java +++ b/src/main/java/com/gmail/nossr50/util/MaterialMapStore.java @@ -1321,6 +1321,7 @@ public class MaterialMapStore { toolBlackList.add("lodestone"); toolBlackList.add("respawn_anchor"); toolBlackList.add("sweet_berry_bush"); + toolBlackList.add("smithing_table"); } public boolean isIntendedToolPickaxe(@NotNull Material material) { From 7264e1a8d68d0fe90b60fcf45b7f01970cd90cc2 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 3 Apr 2023 12:07:34 -0700 Subject: [PATCH 22/22] Small tweaks --- Changelog.txt | 2 +- .../skills/herbalism/HerbalismManager.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index d92662b17..815f6fd34 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -20,7 +20,7 @@ Version 2.1.219 Added 'Stripped_Cherry_Log' to woodcutting experience in experience.yml Added 'Stripped_Cherry_Wood' to woodcutting experience in experience.yml Added 'Skills.Mining.BlastMining.Bonus_Drops.Enabled' to advanced.yml to enable/disable bonus drops from Blast Mining - NOTE: There are plans to add experience for discovering items via the new brushing mechanic, but this will have to wait for new Spigot API to become available + NOTE: There are plans to add experience and potentially subskills for discovering items via the new brushing mechanic, but this will have to wait for new Spigot API to become available Version 2.1.218 Fixed locale pt_BR type (thanks MrPowerGamerBR) 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 129db8c67..60bc758c5 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java @@ -798,7 +798,6 @@ public class HerbalismManager extends SkillManager { case "torchflower": seed = Material.matchMaterial("TORCHFLOWER_SEEDS"); break; - default: return false; } @@ -854,17 +853,17 @@ public class HerbalismManager extends SkillManager { return true; } - switch (blockState.getType()) { + switch (blockState.getType().getKey().getKey()) { - case POTATOES: - case CARROTS: - case WHEAT: + case "potatoes": + case "carrots": + case "wheat": finalAge = getGreenThumbStage(greenTerra); break; - case BEETROOTS: - case NETHER_WART: + case "beetroots": + case "nether_wart": if (greenTerra || greenThumbStage > 2) { finalAge = 2; @@ -875,9 +874,9 @@ public class HerbalismManager extends SkillManager { else { finalAge = 0; } - break; + break; - case COCOA: + case "cocoa": if (getGreenThumbStage(greenTerra) >= 2) { finalAge = 1; @@ -891,6 +890,7 @@ public class HerbalismManager extends SkillManager { return false; } + //Start the delayed replant startReplantTask(finalAge, blockBreakEvent, blockState, false); return true;