mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
parent
8770ac6cd7
commit
d7379b7e71
1 changed files with 2 additions and 2 deletions
|
@ -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 -> {
|
||||
|
|
Loading…
Reference in a new issue