aaaaaaaaaa

This commit is contained in:
Saturn5Vfive 2022-03-31 14:29:03 -05:00
parent 5174d265ab
commit f081006aca
3 changed files with 14 additions and 2 deletions

View file

@ -27,6 +27,6 @@ public class Vclip extends Command {
ClientPlayerEntity player = ShadowMain.client.player; ClientPlayerEntity player = ShadowMain.client.player;
player.updatePosition(player.getX(), player.updatePosition(player.getX(),
player.getY() + new DoubleArgumentParser().parse(args[1]), player.getZ()); player.getY() + new DoubleArgumentParser().parse(args[0]), player.getZ());
} }
} }

View file

@ -23,10 +23,12 @@ public class AirPlace extends Module {
public AirPlace() { public AirPlace() {
super("AirPlace", "template", ModuleType.MISC); super("AirPlace", "template", ModuleType.MISC);
Events.registerEventHandler(EventType.MOUSE_EVENT, event -> { Events.registerEventHandler(EventType.MOUSE_EVENT, event -> {
if(enabled && ((MouseEvent)event).getButton() == 0 && ((MouseEvent)event).getAction() == 1){ if(enabled && ((MouseEvent)event).getButton() == 1 && ((MouseEvent)event).getAction() == 1){
if(ShadowMain.client.currentScreen != null) return;
try { try {
ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, (BlockHitResult) ShadowMain.client.crosshairTarget)); ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, (BlockHitResult) ShadowMain.client.crosshairTarget));
ShadowMain.client.player.swingHand(Hand.MAIN_HAND); ShadowMain.client.player.swingHand(Hand.MAIN_HAND);
event.setCancelled(true);
} catch (Exception ignored) {} } catch (Exception ignored) {}
} }
}); });

View file

@ -13,10 +13,14 @@ import net.minecraft.entity.Entity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.StringNbtReader; import net.minecraft.nbt.StringNbtReader;
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
import net.minecraft.screen.slot.SlotActionType; import net.minecraft.screen.slot.SlotActionType;
import net.minecraft.text.LiteralText; import net.minecraft.text.LiteralText;
import net.minecraft.text.TextColor; import net.minecraft.text.TextColor;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
import net.minecraft.world.RaycastContext; import net.minecraft.world.RaycastContext;
@ -193,6 +197,12 @@ public class Utils {
} }
} }
public static class Packet {
public static void placeBlock(BlockPos block){
ShadowMain.client.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(new Vec3d(block.getX() + 0.5, block.getY() + 0.5, block.getZ() + 0.5), Direction.UP, block, false)));
}
}
public static class Math { public static class Math {
public static boolean isNumber(String in) { public static boolean isNumber(String in) {