diff --git a/Changelog.txt b/Changelog.txt
index adcf2f8a3c..5864af1db5 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,14 +1,16 @@
Version 2.2.049
Combat abilities work with spear in off-hand again (see notes)
Sweet berry bushes now work with Herbalism (thanks dnocturne)
- (Codebase) Fixed unit tests for Java 25 (thanks Warriorrrr)
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 rare 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)
+ (Codebase) Fixed unit tests when building mcMMO with Java 25 (thanks Warriorrrr)
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/pom.xml b/pom.xml
index 8d0240bc1e..201f447160 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.gmail.nossr50.mcMMO
mcMMO
- 2.2.049-SNAPSHOT
+ 2.2.050-SNAPSHOT
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 e42bc2e762..30fa7d9e9e 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 void onEntityBlockFormEvent(EntityBlockFormEvent event) {
*/
@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,12 +267,16 @@ public void onBlockFormEvent(BlockFormEvent event) {
}
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(
PrimarySkillType.MINING, newState.getType())) {
- Block block = newState.getBlock();
+ final Block block = newState.getBlock();
if (BlockUtils.isWithinWorldBounds(block)) {
BlockUtils.setUnnaturalBlock(block);
}