Sfoglia il codice sorgente

Fixed inverted check of mob spawner / egg entities

bm01 12 anni fa
parent
commit
071f7edade

+ 1 - 0
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

+ 5 - 1
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());
         }
     }