mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fixed inverted check of mob spawner / egg entities
This commit is contained in:
parent
46f1157030
commit
071f7edade
@ -22,6 +22,7 @@ Version 1.4.00-dev
|
|||||||
= Fixed Hylian Luck not checking the block-placed flag on flowers.
|
= Fixed Hylian Luck not checking the block-placed flag on flowers.
|
||||||
= Fixed Leaf Blower not respecting the unlock level set in advanced.yml
|
= Fixed Leaf Blower not respecting the unlock level set in advanced.yml
|
||||||
= Fixed abilities activating with the wrong tool in hand
|
= 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
|
! 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.
|
! 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
|
! Changed how Tree Feller is handled, it should now put less stress on the CPU
|
||||||
|
@ -217,9 +217,13 @@ public class EntityListener implements Listener {
|
|||||||
*/
|
*/
|
||||||
@EventHandler (priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler (priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onCreatureSpawn(CreatureSpawnEvent event) {
|
public void onCreatureSpawn(CreatureSpawnEvent event) {
|
||||||
|
if (Misc.isSpawnerXPEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SpawnReason reason = event.getSpawnReason();
|
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());
|
mcMMO.placeStore.addSpawnedMob(event.getEntity());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user