title: How do I code a speed hack on Minecraft 1.10?
body: <p>So, I am trying to make a hacked client for Minecraft version 1.10 (just for the purpose of learning Java), but I have hit a bit of a block. I have been able to make many different kinds of hacks such as KillAura, Nuker, etc. but I can't seem to figure out how to increase the movement speed of a player. Again, I am just doing this to learn Java and to see how Minecraft works. Here is what I have tried so far (all refferences to mc are <code>Minecraft.getMinecraft()</code>):</p>
  
  <p>Attempt 1:</p>
  
  <pre><code>public void onUpdate() {
      if (!this.getState()) return;
  
      if (mc.thePlayer.moveForward &gt; 0.0F) {
          mc.thePlayer.moveForward = 20F;
      }
  }
  </code></pre>
  
  <p>Attempt 2 (Some success, but exponential speed increase is unwanted):</p>
  
  <pre><code>public void onUpdate() {
      if (!this.getState()) return;
  
      if (mc.thePlayer.moveForward &gt; 0.0F) {
          mc.thePlayer.motionX *= 2;
          mc.thePlayer.motionZ *= 2;
      }
  }
  </code></pre>
  
  <p>Attempt 3:</p>
  
  <pre><code>public void onUpdate() {
      if (!this.getState()) return;
  
      if (mc.thePlayer.moveForward &gt; 0.0F &amp;&amp; mc.thePlayer.moveForward &lt; 10F) {
          mc.thePlayer.motionX *= 2;
          mc.thePlayer.motionZ *= 2;
      }
  }
  </code></pre>
  
  <p>Attempts 4+ were all different tutorials for Minecraft 1.8 on YouTube that I tried adapting to 1.10 (I will update with links to the different tutorials if needed)</p>
  
  <p><strong>Update</strong>
  There are no errors in the code, no stacktraces that are created, I am just not getting the desired effect. With attempt 1 and attempts 4+, nothing changed the gameplay when the hack was activated. With attempts 2 and 3, the movement of the player was increased, but it was an exponential (might not be the correct word) increase that I could not limit. Neither of these are the desired effect, and I could not seem to get any sort of working code without causing the game to crash due to extreme world generation lag (due to the speed).</p>
  
  <p>Thanks in advance for any help!</p>
  
  <p>P.S. Sorry for the long post</p>