From 8ac3198386a4f5f4ad0ebc809cd0908fa9b437d2 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 26 Jan 2026 11:23:45 -0800 Subject: [PATCH] improved compatibility with Excellent Enchants --- Changelog.txt | 2 ++ .../java/com/gmail/nossr50/listeners/BlockListener.java | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index adcf2f8a3..655e080e6 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -5,10 +5,12 @@ Version 2.2.049 Fixed copper items not giving XP for Repair (thanks Remski01) Fixed edge case where mcMMO could drop items with stack size set outside normal bounds Fixed a bug where tamed wolves could cause errors on Folia (thanks Warriorrrr) + Improved compatibility with Excellent Enchants (fixed error spam from Flame Walker) NOTES: As a semi-permanent work around, mcMMO keeps track of when players swing their weapon, if they have swung it recently enough combat skills will work even if you have a spear in your off-hand. Prior to this patch, mcMMO disabled combat abilities when spear was in off-hand to prevent the off-hand spear charge from applying combat abilities from other skills, as mcMMO was unable to determine which item (mainhand vs offhand) caused the damage from the event information alone. + Version 2.2.048 Fixed error when loading Spears skill manager on older Minecraft versions Fixed error when using /spears command on an older Minecraft version diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index e42bc2e76..1f03e6980 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -259,7 +259,7 @@ public class BlockListener implements Listener { */ @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onBlockFormEvent(BlockFormEvent event) { - World world = event.getBlock().getWorld(); + final World world = event.getBlock().getWorld(); /* WORLD BLACKLIST CHECK */ if (WorldBlacklist.isWorldBlacklisted(world)) { @@ -267,7 +267,11 @@ public class BlockListener implements Listener { } if (ExperienceConfig.getInstance().preventStoneLavaFarming()) { - BlockState newState = event.getNewState(); + final BlockState newState = event.getNewState(); + if (!newState.isPlaced()) { + // not backed by a real block + return; + } if (newState.getType() != Material.OBSIDIAN && ExperienceConfig.getInstance().doesBlockGiveSkillXP(