Advertisement
ZornTaov

Mod_ankle base

Oct 3rd, 2011
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.30 KB | None | 0 0
  1. package net.minecraft.src;
  2.  
  3. // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
  4. // Jad home page: http://www.kpdus.com/jad.html
  5. // Decompiler options: packimports(3) braces deadcode
  6. import net.minecraft.client.Minecraft;
  7. import org.lwjgl.input.*;
  8.  
  9. public class mod_Ankle extends BaseMod
  10. {
  11.  
  12.     public mod_Ankle()
  13.     {
  14.     ModLoader.SetInGameHook(this, true, false);
  15.  
  16.     }
  17.  
  18.     public boolean OnTickInGame(float tick, Minecraft minecraft)
  19.     {
  20.     world = minecraft.theWorld;
  21.     EntityPlayerSP entityplayersp = minecraft.thePlayer;
  22.  
  23.     if (entityplayersp == null)
  24.     {
  25.         return false;
  26.     }
  27.     if (world == null)
  28.     {
  29.         return false;
  30.  
  31.     }
  32.     timeA = world.getWorldTime();
  33.     //CHECK FALL HIGHT WITH AN IF
  34.         if (!timeSet)
  35.         {
  36.             timeB = world.getWorldTime() + 10L;//12000 = one day
  37.             timeSet = !timeSet;
  38.  
  39.         }
  40.        
  41.         if (timeA >= timeB && timeSet)
  42.         {
  43.         entityplayersp.motionX = 1.0D;
  44.         entityplayersp.motionZ = 1.0D;
  45.         timeSet = !timeSet;
  46.         }else
  47.         {
  48.         entityplayersp.motionX *= 0.8;
  49.         entityplayersp.motionZ *= 0.8;
  50.         }
  51.  
  52.         return true;
  53.  
  54.     }
  55.  
  56.     public String Version()
  57.     {
  58.     return "1.8.1";
  59.     }
  60.  
  61.     public boolean timeSet = false;
  62.     public long timeA = 1L;
  63.     public long timeB = 2L;
  64.     protected World world;
  65.     static
  66.     {
  67.  
  68.     }
  69. }
  70.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement