Permalink
Browse files

The Matriarch attacks enemies again. Additionally will not grow her o…

…vipositor if not indoors.
  • Loading branch information...
Ri5ux committed Dec 30, 2018
1 parent 21e7f26 commit 9140c488f8699cd6c3c1e892b6006f33ba30da32
@@ -7,6 +7,7 @@

import com.google.common.base.Predicate;

import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;

@@ -44,6 +45,11 @@ public boolean apply(EntityLivingBase potentialTarget)
}
}

if (!(potentialTarget instanceof EntityLiving))
{
return false;
}

return true;
}
}
@@ -6,6 +6,7 @@
import org.avp.AliensVsPredator;
import org.avp.client.Sounds;
import org.avp.entities.ai.EntityAICustomAttackOnCollide;
import org.avp.entities.ai.alien.EntitySelectorXenomorph;
import org.avp.packets.server.PacketSpawnEntity;
import org.avp.world.hives.HiveHandler;

@@ -14,9 +15,11 @@
import com.arisux.mdx.lib.world.entity.Entities;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILeapAtTarget;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.monster.IMob;
@@ -100,7 +103,7 @@ protected void addStandardXenomorphAISet()
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIWander(this, 0.8D));
this.tasks.addTask(4, new EntityAICustomAttackOnCollide(this, 0.8D, true));
//this.targetTasks.addTask(0, new EntityAINearestAttackableTarget<>(this, Entity.class, 0, false, false, EntitySelectorXenomorph.instance));
this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntityLiving.class, 0, false, false, EntitySelectorXenomorph.instance));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAILeapAtTarget(this, 1.6F));
}
@@ -152,7 +155,7 @@ private void handleOvipositorGrowth()
{
boolean ovipositorHealthy = this.getJellyLevel() >= OVIPOSITOR_UNHEALTHY_THRESHOLD;

if (ovipositorHealthy)
if (ovipositorHealthy && !this.world.canSeeSky(this.getPosition()))
{
if (this.getOvipositorSize() < OVIPOSITOR_THRESHOLD_SIZE)
{

0 comments on commit 9140c48

Please sign in to comment.