From 071f7edade427216d2f4f582075042ea3c679648 Mon Sep 17 00:00:00 2001 From: bm01 Date: Fri, 25 Jan 2013 21:45:30 +0100 Subject: [PATCH] Fixed inverted check of mob spawner / egg entities --- Changelog.txt | 1 + .../java/com/gmail/nossr50/listeners/EntityListener.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index cc3fee597..0c2d6a7a8 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -22,6 +22,7 @@ Version 1.4.00-dev = Fixed Hylian Luck not checking the block-placed flag on flowers. = Fixed Leaf Blower not respecting the unlock level set in advanced.yml = Fixed abilities activating with the wrong tool in hand + = Fixed Experience.Gains.Mobspawners.Enabled not being used correctly (the check was inverted) ! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent ! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR. ! Changed how Tree Feller is handled, it should now put less stress on the CPU diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 46435265c..a36b96ff3 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -217,9 +217,13 @@ public class EntityListener implements Listener { */ @EventHandler (priority = EventPriority.MONITOR, ignoreCancelled = true) public void onCreatureSpawn(CreatureSpawnEvent event) { + if (Misc.isSpawnerXPEnabled) { + return; + } + SpawnReason reason = event.getSpawnReason(); - if ((reason.equals(SpawnReason.SPAWNER) || reason.equals(SpawnReason.SPAWNER_EGG)) && Misc.isSpawnerXPEnabled) { + if (reason.equals(SpawnReason.SPAWNER) || reason.equals(SpawnReason.SPAWNER_EGG)) { mcMMO.placeStore.addSpawnedMob(event.getEntity()); } }