GooberGunter Posted July 13, 2017 Posted July 13, 2017 (edited) So, I have an animation for walking, but the entity only starts it for a second and jumps to the place it's wandering to instead of walking smoothly. It just move-stops, move-stops, move-stops. Like like a monopoly piece. i.e. it isn't wandering at a contant speed with a far destination, it just skips to a couple blocks in front with a little jitter, instead of wandering like any other mob. package com.ninja3659.explorationexpansion.entitites; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackMelee; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class EntityMindFlayer extends EntityMob{ public EntityMindFlayer(World worldIn) { super(worldIn); this.experienceValue = 20; } @Override protected void entityInit() { super.entityInit(); } @Override protected void initEntityAI() { this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true, false)); this.tasks.addTask(0, new EntityAIAttackMelee(this, .5D, true)); this.tasks.addTask(3, new EntityAIWander(this, 1D));//compare to EntityPig } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(10); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(.000001D); this.getEntityAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(2); this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(20); this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(32); } @Override public void onLivingUpdate() { super.onLivingUpdate(); } } EDIT: TIL, I suck at searching problems on google. I put the update frequency way too high. Edited July 14, 2017 by GooberGunter Solved Quote
Recommended Posts
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.