Advertisement
Guest User

Aura

a guest
Jun 19th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.91 KB | None | 0 0
  1. //
  2. // Decompiled by Procyon v0.5.30
  3. //
  4.  
  5. package me.aristhena.client.module.modules.combat;
  6.  
  7. import net.minecraft.network.play.client.C02PacketUseEntity;
  8. import net.minecraft.potion.Potion;
  9. import net.minecraft.enchantment.EnchantmentHelper;
  10. import net.minecraft.network.play.client.C09PacketHeldItemChange;
  11. import me.aristhena.event.events.PacketSendEvent;
  12. import net.minecraft.entity.passive.EntityVillager;
  13. import net.minecraft.entity.passive.EntityBat;
  14. import net.minecraft.entity.passive.EntitySquid;
  15. import net.minecraft.entity.passive.EntityAnimal;
  16. import net.minecraft.entity.monster.EntityGolem;
  17. import net.minecraft.entity.passive.EntityWolf;
  18. import net.minecraft.entity.monster.EntitySlime;
  19. import net.minecraft.entity.boss.EntityWither;
  20. import net.minecraft.entity.boss.EntityDragon;
  21. import net.minecraft.entity.monster.EntityGhast;
  22. import net.minecraft.entity.monster.EntityMob;
  23. import me.aristhena.client.friend.FriendManager;
  24. import net.minecraft.entity.EntityLivingBase;
  25. import me.aristhena.event.events.TickEvent;
  26. import me.aristhena.event.events.UpdateEvent;
  27. import me.aristhena.event.EventTarget;
  28. import me.aristhena.utils.StateManager;
  29. import me.aristhena.event.events.JumpEvent;
  30. import net.minecraft.entity.Entity;
  31. import net.minecraft.network.play.server.S30PacketWindowItems;
  32. import net.minecraft.entity.player.EntityPlayer;
  33. import net.minecraft.network.Packet;
  34. import net.minecraft.util.EnumFacing;
  35. import net.minecraft.util.BlockPos;
  36. import net.minecraft.network.play.client.C07PacketPlayerDigging;
  37. import net.minecraft.network.play.server.S2FPacketSetSlot;
  38. import net.minecraft.entity.item.EntityItem;
  39. import me.aristhena.utils.ClientUtils;
  40. import net.minecraft.network.play.server.S0DPacketCollectItem;
  41. import me.aristhena.event.events.PacketReceiveEvent;
  42. import me.aristhena.client.option.OptionManager;
  43. import me.aristhena.utils.Timer;
  44. import net.minecraft.item.ItemStack;
  45. import me.aristhena.client.option.Option;
  46. import me.aristhena.client.module.modules.combat.aura.Juan;
  47. import me.aristhena.client.module.modules.combat.aura.Dick22;
  48. import me.aristhena.client.module.modules.combat.aura.Single;
  49. import me.aristhena.client.module.modules.combat.aura.Vanilla;
  50. import me.aristhena.client.module.modules.combat.aura.Switch;
  51. import me.aristhena.client.module.Module;
  52. import me.aristhena.client.module.Module.Mod;;
  53.  
  54.  
  55. @Mod
  56. public class Aura extends Module
  57. {
  58. private Switch switchMode;
  59. private Vanilla vanilla;
  60. private Single single;
  61. private Dick22 tick;
  62. private Juan juan;
  63. @Option.Op(name = "KAD", min = 0.0, max = 30.0, increment = 0.01)
  64. public double speed;
  65. @Option.Op(min = 0.1, max = 10.0, increment = 0.01)
  66. public double range;
  67. @Option.Op(name = "Block Range", min = 3.5, max = 12.0, increment = 0.5)
  68. public double blockRange;
  69. @Option.Op(min = 0.0, max = 180.0, increment = 5.0)
  70. public double degrees;
  71. @Option.Op(name = "KAT", min = 0.0, max = 20.0, increment = 0.01)
  72. public double ticksExisted;
  73. @Option.Op
  74. private boolean players;
  75. @Option.Op
  76. private boolean monsters;
  77. @Option.Op
  78. private boolean animals;
  79. @Option.Op
  80. private boolean bats;
  81. @Option.Op
  82. private boolean villagers;
  83. @Option.Op
  84. private boolean golems;
  85. @Option.Op
  86. private boolean booblebee;
  87. @Option.Op
  88. private boolean noswing;
  89. @Option.Op
  90. public boolean noslowdown;
  91. @Option.Op
  92. public boolean criticals;
  93. @Option.Op
  94. public boolean focus;
  95. @Option.Op
  96. public boolean experimental;
  97. @Option.Op(name = "Durability")
  98. public boolean dura;
  99. @Option.Op(name = "Clans")
  100. public boolean clans;
  101. @Option.Op(name = "Auto Block")
  102. public boolean autoblock;
  103. @Option.Op(name = "Armor Check")
  104. private boolean armorCheck;
  105. @Option.Op(name = "Attack Friends")
  106. private boolean attackFriends;
  107. private boolean jumpNextTick;
  108. private ItemStack predictedItem;
  109. private Timer pickupTimer;
  110. private Timer potTimer;
  111.  
  112. public Aura() {
  113. this.switchMode = new Switch("RetardedSped", true, this);
  114. this.vanilla = new Vanilla("NormalForNiggers", false, this);
  115. this.single = new Single("RegenFaggot", false, this);
  116. this.tick = new Dick22("ThirdWorldInternetTypeAura", false, this);
  117. this.juan = new Juan("NiggerMode", false, this);
  118. this.speed = 8.0;
  119. this.range = 4.2;
  120. this.blockRange = 8.0;
  121. this.degrees = 90.0;
  122. this.ticksExisted = 10.0;
  123. this.players = true;
  124. this.booblebee = true;
  125. this.pickupTimer = new Timer();
  126. this.potTimer = new Timer();
  127. }
  128.  
  129. @Override
  130. public void preInitialize() {
  131. OptionManager.getOptionList().add(this.switchMode);
  132. OptionManager.getOptionList().add(this.vanilla);
  133. OptionManager.getOptionList().add(this.single);
  134. OptionManager.getOptionList().add(this.tick);
  135. OptionManager.getOptionList().add(this.juan);
  136. this.updateSuffix();
  137. super.preInitialize();
  138. }
  139.  
  140. @Override
  141. public void enable() {
  142. this.single.enable();
  143. this.tick.enable();
  144. this.juan.enable();
  145. super.enable();
  146. }
  147.  
  148. private void onPacketReceive(final PacketReceiveEvent event) {
  149. if (event.getPacket() instanceof S0DPacketCollectItem) {
  150. final S0DPacketCollectItem packet = (S0DPacketCollectItem)event.getPacket();
  151. final Entity item = ClientUtils.world().getEntityByID(packet.func_149354_c());
  152. if (item instanceof EntityItem) {
  153. final EntityItem itemEntity = (EntityItem)item;
  154. this.predictedItem = itemEntity.getEntityItem();
  155. this.pickupTimer.reset();
  156. }
  157. }
  158. if (event.getPacket() instanceof S2FPacketSetSlot) {
  159. final S2FPacketSetSlot packet2 = (S2FPacketSetSlot)event.getPacket();
  160. if (!this.potTimer.delay(3.0f) && packet2.func_149173_d() == -2 && packet2.func_149175_c() == -2) {
  161. this.potTimer.setDifference(7L);
  162. new Thread(new Runnable() {
  163. @Override
  164. public void run() {
  165. try {
  166. Thread.sleep(6L);
  167. }
  168. catch (InterruptedException ex) {}
  169. ClientUtils.sendMessage("Post - " + System.currentTimeMillis());
  170. ClientUtils.packet(new C07PacketPlayerDigging(C07PacketPlayerDigging.Action.DROP_ALL_ITEMS, BlockPos.ORIGIN, EnumFacing.DOWN));
  171. ClientUtils.playerController().windowClick(ClientUtils.player().inventoryContainer.windowId, -999, 3, 7, ClientUtils.player());
  172. ClientUtils.playerController().windowClick(ClientUtils.player().inventoryContainer.windowId, 33 + ClientUtils.player().inventory.currentItem, 1, 5, ClientUtils.player());
  173. ClientUtils.playerController().windowClick(ClientUtils.player().inventoryContainer.windowId, -999, 1, 3, ClientUtils.player());
  174. if (ClientUtils.player().inventory.getItemStack() != null) {
  175. ClientUtils.sendMessage("Fake Placingxd");
  176. ClientUtils.playerController().windowClick(ClientUtils.player().inventoryContainer.windowId, 36 + ClientUtils.player().inventory.currentItem, 0, 0, ClientUtils.player());
  177. }
  178. }
  179. }).start();
  180. }
  181. if (!this.pickupTimer.delay(5.0f) && this.predictedItem != null && ItemStack.areItemStackTagsEqual(this.predictedItem, packet2.func_149174_e()) && packet2.func_149173_d() == 36) {
  182. event.setCancelled(true);
  183. this.predictedItem = null;
  184. }
  185. else {
  186. this.predictedItem = null;
  187. }
  188. }
  189. if (event.getPacket() instanceof S30PacketWindowItems && this.potTimer.delay(400.0f)) {
  190. final S30PacketWindowItems packet3 = (S30PacketWindowItems)event.getPacket();
  191. ClientUtils.sendMessage("Pre - " + System.currentTimeMillis());
  192. this.potTimer.reset();
  193. }
  194. this.potTimer.delay(10.0f);
  195. }
  196.  
  197. @EventTarget
  198. private void onJump(final JumpEvent event) {
  199. if (StateManager.offsetLastPacketAura()) {
  200. event.setCancelled(this.jumpNextTick = true);
  201. }
  202. }
  203.  
  204. @EventTarget
  205. private void onUpdate(final UpdateEvent event) {
  206. if (this.jumpNextTick && !StateManager.offsetLastPacketAura()) {
  207. ClientUtils.player().jump();
  208. this.jumpNextTick = false;
  209. }
  210. this.vanilla.onUpdate(event);
  211. this.switchMode.onUpdate(event);
  212. this.single.onUpdate(event);
  213. this.tick.onUpdate(event);
  214. this.juan.onUpdate(event);
  215. }
  216.  
  217. @EventTarget
  218. private void onTick(final TickEvent event) {
  219. this.updateSuffix();
  220. }
  221.  
  222. private void updateSuffix() {
  223. if (this.switchMode.getValue()) {
  224. this.setSuffix("Switch");
  225. }
  226. else if (this.vanilla.getValue()) {
  227. this.setSuffix("Vanilla");
  228. }
  229. else if (this.tick.getValue()) {
  230. this.setSuffix("Tick");
  231. }
  232. else if (this.juan.getValue()) {
  233. this.setSuffix("Juan");
  234. }
  235. else {
  236. this.setSuffix("Single");
  237. }
  238. }
  239.  
  240. public boolean isEntityValid(final Entity entity) {
  241. if (entity instanceof EntityLivingBase) {
  242. final EntityLivingBase entityLiving = (EntityLivingBase)entity;
  243. if (!ClientUtils.player().isEntityAlive() || !entityLiving.isEntityAlive() || entityLiving.getDistanceToEntity(ClientUtils.player()) > (ClientUtils.player().canEntityBeSeen(entityLiving) ? this.range : 3.0)) {
  244. return false;
  245. }
  246. if (entityLiving.ticksExisted < this.ticksExisted) {
  247. return false;
  248. }
  249. if (this.players && entityLiving instanceof EntityPlayer) {
  250. final EntityPlayer entityPlayer = (EntityPlayer)entityLiving;
  251. if (FriendManager.isFriend(entityPlayer.getName()) && !this.attackFriends) {
  252. return false;
  253. }
  254. if (this.armorCheck && !this.hasArmor(entityPlayer)) {
  255. return false;
  256. }
  257. final ItemStack boots = entityPlayer.getEquipmentInSlot(1);
  258. final ItemStack legs = entityPlayer.getEquipmentInSlot(2);
  259. final ItemStack chest = entityPlayer.getEquipmentInSlot(3);
  260. final ItemStack helm = entityPlayer.getEquipmentInSlot(4);
  261. boolean fuckedUpArmorOrder = false;
  262. if (boots != null && boots.getUnlocalizedName().contains("helmet")) {
  263. fuckedUpArmorOrder = true;
  264. }
  265. if (legs != null && legs.getUnlocalizedName().contains("chestplate")) {
  266. fuckedUpArmorOrder = true;
  267. }
  268. if (chest != null && chest.getUnlocalizedName().contains("leggings")) {
  269. fuckedUpArmorOrder = true;
  270. }
  271. if (helm != null && helm.getUnlocalizedName().contains("boots")) {
  272. fuckedUpArmorOrder = true;
  273. }
  274. return !fuckedUpArmorOrder;
  275. }
  276. else {
  277. if (this.monsters && (entityLiving instanceof EntityMob || entityLiving instanceof EntityGhast || entityLiving instanceof EntityDragon || entityLiving instanceof EntityWither || entityLiving instanceof EntitySlime || (entityLiving instanceof EntityWolf && ((EntityWolf)entityLiving).getOwner() != ClientUtils.player()))) {
  278. return true;
  279. }
  280. if (this.golems && entityLiving instanceof EntityGolem) {
  281. return true;
  282. }
  283. if (this.animals && (entityLiving instanceof EntityAnimal || entityLiving instanceof EntitySquid)) {
  284. return true;
  285. }
  286. if (this.bats && entityLiving instanceof EntityBat) {
  287. return true;
  288. }
  289. if (this.villagers && entityLiving instanceof EntityVillager) {
  290. return true;
  291. }
  292. }
  293. }
  294. return false;
  295. }
  296.  
  297. @EventTarget
  298. private void onPacketSend(final PacketSendEvent event) {
  299. if (event.getPacket() instanceof C09PacketHeldItemChange) {
  300. Switch.potTimer.reset();
  301. }
  302. }
  303.  
  304. public boolean isEntityValidType(final Entity entity) {
  305. if (entity instanceof EntityLivingBase) {
  306. final EntityLivingBase entityLiving = (EntityLivingBase)entity;
  307. if (!ClientUtils.player().isEntityAlive() || !entityLiving.isEntityAlive()) {
  308. return false;
  309. }
  310. if (this.players && entityLiving instanceof EntityPlayer) {
  311. final EntityPlayer entityPlayer = (EntityPlayer)entityLiving;
  312. if (entityPlayer.isInvisible() && !this.booblebee) {
  313. return false;
  314. }
  315. if (FriendManager.isFriend(entityPlayer.getName()) && !this.attackFriends) {
  316. return false;
  317. }
  318. if (this.armorCheck && !this.hasArmor(entityPlayer)) {
  319. return false;
  320. }
  321. final ItemStack boots = entityPlayer.getEquipmentInSlot(1);
  322. final ItemStack legs = entityPlayer.getEquipmentInSlot(2);
  323. final ItemStack chest = entityPlayer.getEquipmentInSlot(3);
  324. final ItemStack helm = entityPlayer.getEquipmentInSlot(4);
  325. boolean fuckedUpArmorOrder = false;
  326. if (boots != null && boots.getUnlocalizedName().contains("helmet")) {
  327. fuckedUpArmorOrder = true;
  328. }
  329. if (legs != null && legs.getUnlocalizedName().contains("chestplate")) {
  330. fuckedUpArmorOrder = true;
  331. }
  332. if (chest != null && chest.getUnlocalizedName().contains("leggings")) {
  333. fuckedUpArmorOrder = true;
  334. }
  335. if (helm != null && helm.getUnlocalizedName().contains("boots")) {
  336. fuckedUpArmorOrder = true;
  337. }
  338. return !fuckedUpArmorOrder;
  339. }
  340. else {
  341. if (this.monsters && (entityLiving instanceof EntityMob || entityLiving instanceof EntityGhast || entityLiving instanceof EntityDragon || entityLiving instanceof EntityWither || entityLiving instanceof EntitySlime || (entityLiving instanceof EntityWolf && ((EntityWolf)entityLiving).getOwner() != ClientUtils.player()))) {
  342. return true;
  343. }
  344. if (this.golems && entityLiving instanceof EntityGolem) {
  345. return true;
  346. }
  347. if (this.animals && (entityLiving instanceof EntityAnimal || entityLiving instanceof EntitySquid)) {
  348. return true;
  349. }
  350. if (this.bats && entityLiving instanceof EntityBat) {
  351. return true;
  352. }
  353. if (this.villagers && entityLiving instanceof EntityVillager) {
  354. return true;
  355. }
  356. }
  357. }
  358. return false;
  359. }
  360.  
  361. private boolean hasArmor(final EntityPlayer player) {
  362. final ItemStack boots = player.inventory.armorInventory[0];
  363. final ItemStack pants = player.inventory.armorInventory[1];
  364. final ItemStack chest = player.inventory.armorInventory[2];
  365. final ItemStack head = player.inventory.armorInventory[3];
  366. return boots != null || pants != null || chest != null || head != null;
  367. }
  368.  
  369. public void attack(final EntityLivingBase entity) {
  370. this.attack(entity, this.criticals);
  371. }
  372.  
  373. public void attack(final EntityLivingBase entity, final boolean crit) {
  374. this.swingItem();
  375. final float sharpLevel = EnchantmentHelper.func_152377_a(ClientUtils.player().getHeldItem(), entity.getCreatureAttribute());
  376. final boolean vanillaCrit = ClientUtils.player().fallDistance > 0.0f && !ClientUtils.player().onGround && !ClientUtils.player().isOnLadder() && !ClientUtils.player().isInWater() && !ClientUtils.player().isPotionActive(Potion.blindness) && ClientUtils.player().ridingEntity == null;
  377. ClientUtils.packet(new C02PacketUseEntity(entity, C02PacketUseEntity.Action.ATTACK));
  378. if (crit || vanillaCrit) {
  379. ClientUtils.player().onCriticalHit(entity);
  380. }
  381. if (sharpLevel > 0.0f) {
  382. ClientUtils.player().onEnchantmentCritical(entity);
  383. }
  384. }
  385.  
  386. public void pseudoAttack(final EntityLivingBase entity, final boolean crit) {
  387. this.swingItem();
  388. final float sharpLevel = EnchantmentHelper.func_152377_a(ClientUtils.player().getHeldItem(), entity.getCreatureAttribute());
  389. final boolean vanillaCrit = ClientUtils.player().fallDistance > 0.0f && !ClientUtils.player().onGround && !ClientUtils.player().isOnLadder() && !ClientUtils.player().isInWater() && !ClientUtils.player().isPotionActive(Potion.blindness) && ClientUtils.player().ridingEntity == null;
  390. if (crit || vanillaCrit) {
  391. ClientUtils.player().onCriticalHit(entity);
  392. }
  393. if (sharpLevel > 0.0f) {
  394. ClientUtils.player().onEnchantmentCritical(entity);
  395. }
  396. }
  397.  
  398. public void swingItem() {
  399. if (!this.noswing) {
  400. ClientUtils.player().swingItem();
  401. }
  402. }
  403.  
  404. @Override
  405. public void disable() {
  406. StateManager.setOffsetLastPacketAura(false);
  407. this.tick.disable();
  408. super.disable();
  409. }
  410. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement