Answer the question
In order to leave comments, you need to log in
How to make Minecraft entity jump frequently in Eclipse?
I am writing a mod, I created an entity, everything is fine, but I want it to often jump like a rabbit, and not move in the usual way. Reviewed hundreds of forums and sites. Didn't find anything. Below is AI entity code, thanks in advance!
@Override
protected void initEntityAI()
{
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIPanic(this, 0D));
this.tasks.addTask(2, new EntityAIWanderAvoidWater(this, 1.0D));
this.tasks.addTask(3, new EntityAILookIdle(this));
this.tasks.addTask(4, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
}
@Override
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(10D);
this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0D);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question