Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. package me.aristhena.client.module.modules.combat;
  2.  
  3. import me.aristhena.client.module.*;
  4. import me.aristhena.event.events.*;
  5. import net.minecraft.client.*;
  6. import net.minecraft.potion.*;
  7. import me.aristhena.utils.*;
  8. import net.minecraft.entity.*;
  9. import net.minecraft.network.play.client.*;
  10. import net.minecraft.network.*;
  11. import me.aristhena.event.*;
  12.  
  13. @Mod
  14. public class Regen extends Module
  15. {
  16. @EventTarget
  17. public void onEventCalled(final UpdateEvent event) {
  18. if (Minecraft.getMinecraft().thePlayer.getActivePotionEffect(Potion.regeneration) != null && (Minecraft.getMinecraft().thePlayer.onGround || BlockUtils.isOnLadder(Minecraft.getMinecraft().thePlayer) || BlockUtils.isInLiquid(Minecraft.getMinecraft().thePlayer) || BlockUtils.isOnLiquid(Minecraft.getMinecraft().thePlayer)) && Minecraft.getMinecraft().thePlayer.getHealth() < Minecraft.getMinecraft().thePlayer.getMaxHealth()) {
  19. for (int i = 0; i < Minecraft.getMinecraft().thePlayer.getMaxHealth() - Minecraft.getMinecraft().thePlayer.getHealth(); ++i) {
  20. Minecraft.getMinecraft().thePlayer.sendQueue.addToSendQueue(new C03PacketPlayer(Minecraft.getMinecraft().thePlayer.onGround));
  21. }
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement