From 2c4c868982d78dd5e91cab230eb2514495512dab Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 21 Mar 2021 17:41:14 +0100 Subject: [PATCH] slightly increase corporeal eye range and update rate Closes #200 --- .../naturesaura/blocks/tiles/TileEntityAnimalContainer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityAnimalContainer.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityAnimalContainer.java index 56e9c0f7..e01003f1 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityAnimalContainer.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityAnimalContainer.java @@ -29,12 +29,11 @@ public class TileEntityAnimalContainer extends TileEntityImpl implements ITickab @Override public void tick() { - if (this.world.isRemote || this.world.getGameTime() % 2 != 0) + if (this.world.isRemote) return; - int radius = this.getRadius(); Set animalsInRange = new HashSet<>(this.world.getEntitiesWithinAABB(AnimalEntity.class, new AxisAlignedBB(this.pos).grow(radius - 1))); - List animalsOutRange = this.world.getEntitiesWithinAABB(AnimalEntity.class, new AxisAlignedBB(this.pos).grow(radius)); + List animalsOutRange = this.world.getEntitiesWithinAABB(AnimalEntity.class, new AxisAlignedBB(this.pos).grow(radius + 1)); for (AnimalEntity animal : animalsOutRange) { if (animalsInRange.contains(animal)) continue;