Java Code Examples for net.minecraft.item.ItemStack#useItemRightClick()
The following examples show how to use
net.minecraft.item.ItemStack#useItemRightClick() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TriggerBot.java From ehacks-pro with GNU General Public License v3.0 | 6 votes |
@Override public void onTicks() { try { if (Wrapper.INSTANCE.mc().objectMouseOver != null && Wrapper.INSTANCE.mc().objectMouseOver.entityHit != null && this.isValidTarget(Wrapper.INSTANCE.mc().objectMouseOver.entityHit) && TriggerBot.hasReached(150 + rand.nextInt(100))) { if (Criticals.isActive && !Wrapper.INSTANCE.player().isInWater() && !Wrapper.INSTANCE.player().isInsideOfMaterial(Material.lava) && !Wrapper.INSTANCE.player().isInsideOfMaterial(Material.web) && Wrapper.INSTANCE.player().onGround) { Wrapper.INSTANCE.player().motionY = 0.1; Wrapper.INSTANCE.player().fallDistance = 0.1f; Wrapper.INSTANCE.player().onGround = false; } if (AutoBlock.isActive && Wrapper.INSTANCE.player().getCurrentEquippedItem() != null && Wrapper.INSTANCE.player().getCurrentEquippedItem().getItem() instanceof ItemSword) { ItemStack lel = Wrapper.INSTANCE.player().getCurrentEquippedItem(); lel.useItemRightClick(Wrapper.INSTANCE.world(), Wrapper.INSTANCE.player()); } Wrapper.INSTANCE.player().swingItem(); Wrapper.INSTANCE.mc().playerController.attackEntity(Wrapper.INSTANCE.player(), Wrapper.INSTANCE.mc().objectMouseOver.entityHit); this.reset(); } } catch (Exception ex) { } }
Example 2
Source File: Forcefield.java From ehacks-pro with GNU General Public License v3.0 | 6 votes |
private void hitEntity(Entity e, boolean block, boolean criticals, boolean aimbot, boolean auto) { if (block && Wrapper.INSTANCE.player().getCurrentEquippedItem().getItem() instanceof ItemSword) { ItemStack lel = Wrapper.INSTANCE.player().getCurrentEquippedItem(); lel.useItemRightClick(Wrapper.INSTANCE.world(), Wrapper.INSTANCE.player()); } if (criticals && !Wrapper.INSTANCE.player().isInWater() && !Wrapper.INSTANCE.player().isInsideOfMaterial(Material.lava) && !Wrapper.INSTANCE.player().isInsideOfMaterial(Material.web) && Wrapper.INSTANCE.player().onGround) { Wrapper.INSTANCE.player().motionY = 0.1000000014901161; Wrapper.INSTANCE.player().fallDistance = 0.1f; Wrapper.INSTANCE.player().onGround = false; } if (aimbot) { AimBot.faceEntity(e); } Wrapper.INSTANCE.mc().playerController.attackEntity(Wrapper.INSTANCE.player(), e); Wrapper.INSTANCE.player().swingItem(); }
Example 3
Source File: KillAura.java From ehacks-pro with GNU General Public License v3.0 | 5 votes |
@Override public void onTicks() { block6: { try { this.currentMS = System.nanoTime() / 900000L; if (!this.hasDelayRun(133L)) { break block6; } for (Object o : Wrapper.INSTANCE.world().loadedEntityList) { EntityPlayer e; if (!(o instanceof EntityPlayer) || (e = (EntityPlayer) o) instanceof EntityPlayerSP || Wrapper.INSTANCE.player().getDistanceToEntity(e) > CheatConfiguration.config.auraradius || e.isDead) { continue; } if (AuraConfiguration.config.friends.contains(e.getCommandSenderName().trim())) { continue; } if (AutoBlock.isActive && Wrapper.INSTANCE.player().getCurrentEquippedItem() != null && Wrapper.INSTANCE.player().getCurrentEquippedItem().getItem() instanceof ItemSword) { ItemStack lel = Wrapper.INSTANCE.player().getCurrentEquippedItem(); lel.useItemRightClick(Wrapper.INSTANCE.world(), Wrapper.INSTANCE.player()); } if (Criticals.isActive && !Wrapper.INSTANCE.player().isInWater() && !Wrapper.INSTANCE.player().isInsideOfMaterial(Material.lava) && !Wrapper.INSTANCE.player().isInsideOfMaterial(Material.web) && Wrapper.INSTANCE.player().onGround) { Wrapper.INSTANCE.player().motionY = 0.1000000014901161; Wrapper.INSTANCE.player().fallDistance = 0.1f; Wrapper.INSTANCE.player().onGround = false; } if (AimBot.isActive) { AimBot.faceEntity(e); } Wrapper.INSTANCE.player().setSprinting(false); Wrapper.INSTANCE.player().swingItem(); Wrapper.INSTANCE.mc().playerController.attackEntity(Wrapper.INSTANCE.player(), e); this.lastMS = System.nanoTime() / 900000L; break; } } catch (Exception ex) { } } }
Example 4
Source File: AutoBlock.java From ehacks-pro with GNU General Public License v3.0 | 5 votes |
@Override public void onTicks() { if (!(KillAura.isActive || MobAura.isActive || ProphuntAura.isActive || Forcefield.isActive || TriggerBot.isActive || !Wrapper.INSTANCE.mcSettings().keyBindAttack.getIsKeyPressed() || Wrapper.INSTANCE.player().getCurrentEquippedItem() == null || !(Wrapper.INSTANCE.player().getCurrentEquippedItem().getItem() instanceof ItemSword))) { ItemStack lel = Wrapper.INSTANCE.player().getCurrentEquippedItem(); lel.useItemRightClick(Wrapper.INSTANCE.world(), Wrapper.INSTANCE.player()); } }