mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-19 17:02:13 +02:00
Add MaceDmgHack
This commit is contained in:
parent
76ec389f00
commit
bffead6233
@ -121,6 +121,7 @@ public final class HackList implements UpdateListener
|
||||
public final KillPotionHack killPotionHack = new KillPotionHack();
|
||||
public final LiquidsHack liquidsHack = new LiquidsHack();
|
||||
public final LsdHack lsdHack = new LsdHack();
|
||||
public final MaceDmgHack maceDmgHack = new MaceDmgHack();
|
||||
public final MassTpaHack massTpaHack = new MassTpaHack();
|
||||
public final MileyCyrusHack mileyCyrusHack = new MileyCyrusHack();
|
||||
public final MobEspHack mobEspHack = new MobEspHack();
|
||||
|
@ -8,6 +8,7 @@
|
||||
package net.wurstclient.hacks;
|
||||
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.util.hit.EntityHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
@ -68,6 +69,10 @@ public final class CriticalsHack extends Hack implements LeftClickListener
|
||||
if(!isEnabled())
|
||||
return;
|
||||
|
||||
if(WURST.getHax().maceDmgHack.isEnabled()
|
||||
&& MC.player.getMainHandStack().isOf(Items.MACE))
|
||||
return;
|
||||
|
||||
if(!MC.player.isOnGround())
|
||||
return;
|
||||
|
||||
|
69
src/main/java/net/wurstclient/hacks/MaceDmgHack.java
Normal file
69
src/main/java/net/wurstclient/hacks/MaceDmgHack.java
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2024 Wurst-Imperium and contributors.
|
||||
*
|
||||
* This source code is subject to the terms of the GNU General Public
|
||||
* License, version 3. If a copy of the GPL was not distributed with this
|
||||
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
|
||||
*/
|
||||
package net.wurstclient.hacks;
|
||||
|
||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket.PositionAndOnGround;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.wurstclient.Category;
|
||||
import net.wurstclient.SearchTags;
|
||||
import net.wurstclient.events.LeftClickListener;
|
||||
import net.wurstclient.hack.Hack;
|
||||
|
||||
@SearchTags({"mace dmg", "MaceDamage", "mace damage"})
|
||||
public final class MaceDmgHack extends Hack implements LeftClickListener
|
||||
{
|
||||
public MaceDmgHack()
|
||||
{
|
||||
super("MaceDMG");
|
||||
setCategory(Category.COMBAT);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onEnable()
|
||||
{
|
||||
EVENTS.add(LeftClickListener.class, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDisable()
|
||||
{
|
||||
EVENTS.remove(LeftClickListener.class, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLeftClick(LeftClickEvent event)
|
||||
{
|
||||
if(MC.crosshairTarget == null
|
||||
|| MC.crosshairTarget.getType() != HitResult.Type.ENTITY)
|
||||
return;
|
||||
|
||||
if(!MC.player.getMainHandStack().isOf(Items.MACE))
|
||||
return;
|
||||
|
||||
// See ServerPlayNetworkHandler.onPlayerMove()
|
||||
// for why it's using these numbers.
|
||||
// Also, let me know if you find a way to bypass that check in 1.21.
|
||||
for(int i = 0; i < 4; i++)
|
||||
sendFakeY(0);
|
||||
sendFakeY(Math.sqrt(500));
|
||||
sendFakeY(0);
|
||||
}
|
||||
|
||||
private void sendFakeY(double offset)
|
||||
{
|
||||
ClientPlayNetworkHandler netHandler = MC.player.networkHandler;
|
||||
double posX = MC.player.getX();
|
||||
double posY = MC.player.getY();
|
||||
double posZ = MC.player.getZ();
|
||||
|
||||
netHandler.sendPacket(
|
||||
new PositionAndOnGround(posX, posY + offset, posZ, false));
|
||||
}
|
||||
}
|
@ -133,6 +133,7 @@
|
||||
"description.wurst.hack.killpotion": "Generates a potion that can kill almost anything, including players in Creative mode. Does not work on undead mobs, since they are already dead.\n\nRequires Creative mode.",
|
||||
"description.wurst.hack.liquids": "Allows you to place blocks in liquids.",
|
||||
"description.wurst.hack.lsd": "Causes hallucinations.",
|
||||
"description.wurst.hack.macedmg": "Increases your damage when attacking with a mace.",
|
||||
"description.wurst.hack.masstpa": "Sends a TPA request to all players.",
|
||||
"description.wurst.hack.mileycyrus": "Makes you twerk.",
|
||||
"description.wurst.hack.mobesp": "Highlights nearby mobs.",
|
||||
|
Loading…
Reference in New Issue
Block a user