Search in sources :

Example 1 with EntityAIGoldGolemLookAtPigtificate

use of nex.entity.ai.EntityAIGoldGolemLookAtPigtificate in project NetherEx by LogicTechCorp.

the class EntityGoldGolem method initEntityAI.

@Override
protected void initEntityAI() {
    tasks.addTask(1, new EntityAIAttackMelee(this, 1.0D, true));
    tasks.addTask(2, new EntityAIMoveTowardsTarget(this, 0.9D, 32.0F));
    tasks.addTask(3, new EntityAIMoveThroughVillage(this, 0.6D, true));
    tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
    tasks.addTask(5, new EntityAIGoldGolemLookAtPigtificate(this));
    tasks.addTask(6, new EntityAIWanderAvoidWater(this, 0.6D));
    tasks.addTask(7, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
    tasks.addTask(8, new EntityAILookIdle(this));
    targetTasks.addTask(1, new EntityAIGoldGolemDefendVillage(this));
    targetTasks.addTask(2, new EntityAIHurtByTarget(this, false));
    targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityLiving.class, 10, false, true, entity -> entity != null && IMob.VISIBLE_MOB_SELECTOR.apply((EntityLiving) entity) && !(entity instanceof EntitySporeCreeper)));
}
Also used : EntityAIGoldGolemDefendVillage(nex.entity.ai.EntityAIGoldGolemDefendVillage) EntityDataManager(net.minecraft.network.datasync.EntityDataManager) NetherExLootTables(nex.init.NetherExLootTables) EntityAIGoldGolemLookAtPigtificate(nex.entity.ai.EntityAIGoldGolemLookAtPigtificate) EntitySporeCreeper(nex.entity.monster.EntitySporeCreeper) Block(net.minecraft.block.Block) EntityGolem(net.minecraft.entity.monster.EntityGolem) EntityLiving(net.minecraft.entity.EntityLiving) Side(net.minecraftforge.fml.relauncher.Side) PigtificateVillage(nex.village.PigtificateVillage) net.minecraft.entity.ai(net.minecraft.entity.ai) SideOnly(net.minecraftforge.fml.relauncher.SideOnly) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) Entity(net.minecraft.entity.Entity) EntityAIGoldGolemDefendVillage(nex.entity.ai.EntityAIGoldGolemDefendVillage) SoundEvents(net.minecraft.init.SoundEvents) PigtificateVillageManager(nex.village.PigtificateVillageManager) World(net.minecraft.world.World) BlockPos(net.minecraft.util.math.BlockPos) DataParameter(net.minecraft.network.datasync.DataParameter) DamageSource(net.minecraft.util.DamageSource) SharedMonsterAttributes(net.minecraft.entity.SharedMonsterAttributes) IBlockState(net.minecraft.block.state.IBlockState) DataSerializers(net.minecraft.network.datasync.DataSerializers) Material(net.minecraft.block.material.Material) EntityLivingBase(net.minecraft.entity.EntityLivingBase) IMob(net.minecraft.entity.monster.IMob) EntityPlayer(net.minecraft.entity.player.EntityPlayer) MathHelper(net.minecraft.util.math.MathHelper) ResourceLocation(net.minecraft.util.ResourceLocation) EnumParticleTypes(net.minecraft.util.EnumParticleTypes) SoundEvent(net.minecraft.util.SoundEvent) EntityLiving(net.minecraft.entity.EntityLiving) EntitySporeCreeper(nex.entity.monster.EntitySporeCreeper) EntityAIGoldGolemLookAtPigtificate(nex.entity.ai.EntityAIGoldGolemLookAtPigtificate) EntityPlayer(net.minecraft.entity.player.EntityPlayer)

Aggregations

Block (net.minecraft.block.Block)1 Material (net.minecraft.block.material.Material)1 IBlockState (net.minecraft.block.state.IBlockState)1 Entity (net.minecraft.entity.Entity)1 EntityLiving (net.minecraft.entity.EntityLiving)1 EntityLivingBase (net.minecraft.entity.EntityLivingBase)1 SharedMonsterAttributes (net.minecraft.entity.SharedMonsterAttributes)1 net.minecraft.entity.ai (net.minecraft.entity.ai)1 EntityGolem (net.minecraft.entity.monster.EntityGolem)1 IMob (net.minecraft.entity.monster.IMob)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 SoundEvents (net.minecraft.init.SoundEvents)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 DataParameter (net.minecraft.network.datasync.DataParameter)1 DataSerializers (net.minecraft.network.datasync.DataSerializers)1 EntityDataManager (net.minecraft.network.datasync.EntityDataManager)1 DamageSource (net.minecraft.util.DamageSource)1 EnumParticleTypes (net.minecraft.util.EnumParticleTypes)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 SoundEvent (net.minecraft.util.SoundEvent)1