title: Rideable Controllable Entity minecraft
body: <p>I am having a problem making an entity controllable in minecraft. I am are able to mount it, and it will move, but a few seconds after you move it, it just jumps back to where it was before you moved it. Here is my Entity class:</p>
  
  <pre><code>package net.minecraft.src;
  
  public class mod_EntityMech extends EntityMob // this to make mob hostile
  {
    public boolean stationary;
    public mod_EntityMech(World par1World)
    {
      super(par1World);
      isImmuneToFire = false;
    }
    public int func_82193_c(Entity par1Entity) //the amount of damage
    {
      return 4;
    }
    protected void fall(float par1)
    {}
    public int getMaxHealth() // Mob health
    {
      return 1000;
    }
    protected int getDropItemId()
    {
      return 0;
    }
    protected boolean canDespawn()
    {
      return false;
    }
    public boolean interact(EntityPlayer entityplayer)
    {
      if (riddenByEntity == null || riddenByEntity == entityplayer)
      {
        entityplayer.mountEntity(this);
        return true;
      }
      else
      {
        return false;
      }
    }
    protected boolean isMovementCeased()
    {
      return stationary;
    }
    public void moveEntity(double d, double d1, double d2)
    {
      if (riddenByEntity != null)
      {
        this.prevRotationYaw = this.rotationYaw = this.riddenByEntity.rotationYaw;
        this.rotationPitch = this.riddenByEntity.rotationPitch * 0.5F;
        this.setRotation(this.rotationYaw, this.rotationPitch);
        this.rotationYawHead = this.renderYawOffset = this.rotationYaw;
        stationary = true;
        motionX += riddenByEntity.motionX * 10; // * 0.20000000000000001D;
        motionZ += riddenByEntity.motionZ * 10; // * 0.20000000000000001D;
        if (isCollidedHorizontally)
        {
          isJumping = true;
        }
        else
        {
          isJumping = false;
        }
        super.moveEntity(motionX, motionY, motionZ);
      }
      else
      {
        stationary = false;
        super.moveEntity(d, d1, d2);
      }
    }
    public void onUpdate()
    {
      super.onUpdate();
      if (riddenByEntity != null) //check if there is a rider
      {
        //currentTarget = this;
        this.randomYawVelocity = 0; //try not to let the horse control where to look.
        this.rotationYaw = riddenByEntity.rotationYaw;
      }
    }
    protected boolean isAIEnabled() //Allow your AI task to work?
    {
      return true;
    }
  }
  </code></pre>
  
  <p>P.S. I am using ModLoader</p>