Posted July 17, 20169 yr Hi there, here is my entity class package com.practise.NPC; import com.practise.ai.AttackerAi; import net.minecraft.entity.ai.EntityAIAttackOnCollide; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class Attacker extends EntityWolf{ public Attacker(World worldIn) { super(worldIn); this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.2D, false)); } } I use the spawn egg create the entity, but the EntityAIAttackOnCollide doesn't work, the entity doesn't attack player.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.