From d7379b7e719120760935015a27ea45e6cf822d84 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 20 May 2022 20:48:10 +0200 Subject: [PATCH] fixed the disentangler of mortals not working Closes #251 --- .../de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java index 186ff08d..7b9571ae 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAnimalGenerator.java @@ -37,7 +37,7 @@ public class BlockAnimalGenerator extends BlockContainerImpl implements IVisuali @SubscribeEvent public void onLivingUpdate(LivingEvent.LivingUpdateEvent event) { var entity = event.getEntityLiving(); - if (entity.level.isClientSide || entity.level.getGameTime() % 40 != 0 || !(entity instanceof Animal) || entity instanceof Mob || entity instanceof Npc) + if (entity.level.isClientSide || entity.level.getGameTime() % 40 != 0 || !(entity instanceof Animal) || entity instanceof Npc) return; var data = entity.getPersistentData(); var timeAlive = data.getInt(NaturesAura.MOD_ID + ":time_alive"); @@ -47,7 +47,7 @@ public class BlockAnimalGenerator extends BlockContainerImpl implements IVisuali @SubscribeEvent public void onEntityDeath(LivingDeathEvent event) { var entity = event.getEntityLiving(); - if (entity.level.isClientSide || !(entity instanceof Animal) || entity instanceof Mob || entity instanceof Npc) + if (entity.level.isClientSide || !(entity instanceof Animal) || entity instanceof Npc) return; var pos = entity.blockPosition(); Helper.getBlockEntitiesInArea(entity.level, pos, 5, tile -> {