Skip to content
Permalink
Browse files

Deacons are now classified as EntitySpecies223ODe instead of EntityXe…

…nomorph
  • Loading branch information...
Ri5ux committed Mar 13, 2019
1 parent e138889 commit b6a89ad3a347bb0b14c3bb793f91e31627392715
@@ -1,15 +1,24 @@
package org.avp.entities.living;

import org.avp.DamageSources;
import org.avp.api.parasitoidic.INascentic;
import org.avp.client.Sounds;
import org.avp.world.capabilities.IOrganism.Organism;
import org.avp.world.capabilities.IOrganism.Provider;

import com.asx.mdx.lib.world.Pos;
import com.asx.mdx.lib.world.entity.Entities;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent;
import net.minecraft.world.World;

public class EntityDeacon extends EntityXenomorph
public class EntityDeacon extends EntitySpecies223ODe implements INascentic
{
public EntityDeacon(World world)
{
@@ -18,13 +27,12 @@ public EntityDeacon(World world)
this.jumpMovementFactor = 0.02F;
this.experienceValue = 100;
this.setSize(0.8F, 1.8F);
this.ableToClimb = false;
// this.ableToClimb = false;
this.isDependant = false;



this.tasks.addTask(0, new EntityAISwimming(this));
this.addStandardXenomorphAISet();

// this.addStandardXenomorphAISet();
}

@Override
@@ -71,10 +79,52 @@ public void writeEntityToNBT(NBTTagCompound nbt)
{
super.writeEntityToNBT(nbt);
}

@Override
public void identifyHive()
{
;
return;
}

@Override
public Class<? extends Entity> getMatureState()
{
return EntityDeaconAdult.class;
}

@Override
public int getMaturityTime()
{
return (15 * 60) * 20;
}

@Override
public int getMaturityLevel()
{
return 6400;
}

@Override
public void grow(EntityLivingBase host)
{
Organism organism = (Organism) host.getCapability(Provider.CAPABILITY, null);
}

@Override
public void vitalize(EntityLivingBase host)
{
Organism organism = (Organism) host.getCapability(Provider.CAPABILITY, null);
Pos safeLocation = Entities.getSafeLocationAround(this, new Pos((int) host.posX, (int) host.posY, (int) host.posZ));

if (safeLocation == null)
{
safeLocation = new Pos((int) host.posX, (int) host.posY, (int) host.posZ);
}

this.setLocationAndAngles(safeLocation.x(), safeLocation.y(), safeLocation.z(), 0.0F, 0.0F);
host.world.spawnEntity(this);
organism.removeEmbryo();
host.getActivePotionEffects().clear();
host.attackEntityFrom(DamageSources.causeDeaconBursterDamage(this, host), 100000F);
}
}
@@ -1,15 +1,25 @@
package org.avp.entities.living;

import org.avp.client.Sounds;
import org.avp.entities.ai.EntityAICustomAttackOnCollide;
import org.avp.entities.ai.alien.EntitySelectorXenomorph;

import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLivingBase;
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.ai.EntityAIWatchClosest;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent;
import net.minecraft.world.World;

public class EntityDeaconAdult extends EntityXenomorph
public class EntityDeaconAdult extends EntitySpecies223ODe
{
public EntityDeaconAdult(World world)
{
@@ -18,13 +28,16 @@ public EntityDeaconAdult(World world)
this.jumpMovementFactor = 0.02F;
this.experienceValue = 100;
this.setSize(0.8F, 3.2F);
this.ableToClimb = false;
this.isDependant = false;


this.tasks.addTask(0, new EntityAISwimming(this));

this.addStandardXenomorphAISet();
this.tasks.addTask(1, new EntityAIWander(this, 0.8D));
this.tasks.addTask(2, new EntityAICustomAttackOnCollide(this, EntityCreature.class, 1.0D, false));
this.tasks.addTask(2, new EntityAICustomAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
this.tasks.addTask(2, new EntityAIWatchClosest(this, EntityLivingBase.class, 16F));
this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.6F));
this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<EntityCreature>(this, EntityCreature.class, 0, false, false, EntitySelectorXenomorph.instance));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<EntityPlayer>(this, EntityPlayer.class, 0, false, false, EntitySelectorXenomorph.instance));
}

@Override
@@ -0,0 +1,11 @@
package org.avp.entities.living;

import net.minecraft.world.World;

public abstract class EntitySpecies223ODe extends EntitySpeciesAlien
{
public EntitySpecies223ODe(World world)
{
super(world);
}
}

0 comments on commit b6a89ad

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.