Comments (3)
skull emoji
from meteor-client.
did this guy just code it
from meteor-client.
/*
* This file is part of the Meteor Client distribution (https://github.com/MeteorDevelopment/meteor-client).
* Copyright (c) Meteor Development.
*/
package meteordevelopment.meteorclient.systems.modules.combat;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.mixin.PlayerMoveC2SPacketAccessor;
import meteordevelopment.meteorclient.settings.EnumSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Categories;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.network.ClientPlayNetworkHandler;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
public class SuperMace extends Module {
public SuperMace() {
super(Categories.Combat, "SuperMace", "i");
}
private final SettingGroup sgModify = settings.createGroup("Modify");
private final Setting<SuperMace.Mode> mode = sgModify.add(new EnumSetting.Builder<SuperMace.Mode>()
.name("Mode")
.description("m")
.defaultValue(SuperMace.Mode.Mace20)
.build()
);
private final Setting<SuperMace.ClipMode> clipMode = sgModify.add(new EnumSetting.Builder<SuperMace.ClipMode>()
.name("ClipMode")
.description("c")
.defaultValue(SuperMace.ClipMode.Up)
.build()
);
private static final PlayerMoveC2SPacket.OnGroundOnly onGroundOnly = new PlayerMoveC2SPacket.OnGroundOnly(false);
private static final double magic20 = 20;
private static final double magic22 = 22.36;
private static final double nMagic20 = -magic20;
private static final double nMagic22 = -magic22;
@EventHandler
public void onSendPacket(PacketEvent.Send event) {
if (event.packet instanceof PlayerMoveC2SPacket) {
PlayerMoveC2SPacketAccessor packet = (PlayerMoveC2SPacketAccessor) event.packet;
packet.setOnGround(false);
return;
}
final ClientPlayerEntity player;
final ItemStack stack;
if ((player = mc.player) != null && (stack = player.getMainHandStack()) != null && stack.getItem() == Items.MACE) {
if (event.packet instanceof PlayerInteractEntityC2SPacket) {
final ClientPlayNetworkHandler networkHandler = player.networkHandler;
switch (mode.get()) {
case VClip20 -> {
repeatOnGround(networkHandler, 3);
mc.player.setPosition(mc.player.getX(), mc.player.getY() + ((clipMode.get() == ClipMode.Up) ? magic20 : nMagic20), mc.player.getZ());
}
case Mace20 -> {
repeatOnGround(networkHandler, 3);
networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(player.getX(), player.getY() + magic20, player.getZ(), false));
networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(player.getX(), player.getY(), player.getZ(), false));
}
case VClip22 -> {
repeatOnGround(networkHandler, 4);
mc.player.setPosition(mc.player.getX(), mc.player.getY() + ((clipMode.get() == ClipMode.Up) ? magic22 : nMagic22), mc.player.getZ());
}
case Mace22 -> {
repeatOnGround(networkHandler, 4);
networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(player.getX(), player.getY() + magic22, player.getZ(), false));
networkHandler.sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(player.getX(), player.getY(), player.getZ(), false));
}
}
}
}
}
private void repeatOnGround(final ClientPlayNetworkHandler networkHandler, final int c) {
for (int i = 0; i < c; ++i) {
networkHandler.sendPacket(onGroundOnly);
}
}
public enum Mode {
VClip20,
Mace20,
VClip22,
Mace22
}
public enum ClipMode {
Up,
Down
}
}
from meteor-client.
Related Issues (20)
- Trajectories hand preview option HOT 3
- Crashed with Baritone in 1.20.6 HOT 1
- BRING BACK Auto Mine HOT 8
- Better block esp HOT 2
- Shield Breaker HOT 1
- [Suggestion] Client
- Fix rendering for Explosive firework in Crossbow in Trajectory Module
- Block Esp exposed to air option. HOT 1
- crash the server without getting kicked by packets like papermc and bukkit and spigot HOT 2
- offhand crash kicks you because of plugins HOT 12
- Meteor natural crash HOT 2
- incorrect display of armor and items in nametags HOT 10
- Add Trade System Exploit HOT 3
- Translation exploit HOT 1
- dupe feature HOT 1
- Improve Tracers
- Unscrambler module HOT 3
- [Enhancement] Auto Tool: switch to hand and custom tool
- No Mining Trace crashes
- [Suggestion] anti fire mode and water breathing mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-client.