-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a059a0
commit 4c2ba82
Showing
52 changed files
with
2,980 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package net.fabricmc.smphack; | ||
|
||
import net.fabricmc.api.ModInitializer; | ||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; | ||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; | ||
import net.fabricmc.smphack.Hacks.Freecam.CameraEntity; | ||
import net.fabricmc.smphack.config.ConfigUtil; | ||
import net.fabricmc.smphack.config.ControllersConfig; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.option.KeyBinding; | ||
import net.minecraft.client.util.InputUtil; | ||
import org.lwjgl.glfw.GLFW; | ||
|
||
public class GeneralConfig implements ModInitializer { | ||
|
||
public static boolean enabled = false; | ||
private static boolean spectator; | ||
public static final KeyBinding FreecamKey = KeyBindingHelper.registerKeyBinding(new KeyBinding("Freecam toggle", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_UNKNOWN, "Imperials")); | ||
|
||
|
||
@Override | ||
public void onInitialize() { | ||
|
||
ConfigUtil.loadConfig(); | ||
|
||
|
||
ClientTickEvents.START_CLIENT_TICK.register(client -> { | ||
while (FreecamKey.wasPressed()) { | ||
toggleFreecam(client); | ||
|
||
} | ||
}); | ||
} | ||
|
||
public static void toggleFreecam(MinecraftClient client) { | ||
enabled = !enabled; | ||
if (enabled) { | ||
CameraEntity.createCamera(MinecraftClient.getInstance()); | ||
} else { | ||
CameraEntity.removeCamera(); | ||
} | ||
|
||
} | ||
|
||
public static ControllersConfig getConfig() { | ||
return ConfigUtil.getConfig(); | ||
} | ||
|
||
public static boolean isEnabled() { | ||
return enabled; | ||
} | ||
|
||
public static boolean isSpectator() { | ||
return spectator; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,230 @@ | ||
package net.fabricmc.smphack; | ||
|
||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; | ||
import net.fabricmc.smphack.Hacks.CrystalAura.EndCrystalBreaker; | ||
import net.fabricmc.smphack.Hacks.Fly.Fly; | ||
import net.fabricmc.smphack.Hacks.Fly.Flymodes; | ||
import net.fabricmc.smphack.Hacks.Jesus.Jesusm; | ||
import net.fabricmc.smphack.Hacks.Jesus.jesus; | ||
import net.fabricmc.smphack.Hacks.Killaura.KillAura; | ||
import net.fabricmc.smphack.Hacks.NoWeather.NoWeather; | ||
import net.fabricmc.smphack.Hacks.Nofall.Nofall; | ||
import net.fabricmc.smphack.Hacks.Reach.Reach; | ||
import net.fabricmc.smphack.Hacks.Speed.Speed; | ||
import net.fabricmc.smphack.Hacks.SpeedMine.SpeedMine; | ||
import net.fabricmc.smphack.Hacks.fullbright.Fullbright; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.font.TextRenderer; | ||
import net.minecraft.client.gui.screen.Screen; | ||
import net.minecraft.client.network.ClientPlayerEntity; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import net.minecraft.entity.effect.StatusEffects; | ||
import net.minecraft.text.Text; | ||
import net.minecraft.util.Formatting; | ||
|
||
|
||
|
||
import static net.fabricmc.smphack.Keybinds.FlyKey; | ||
import static net.fabricmc.smphack.Keybinds.ReachKey; | ||
import static net.fabricmc.smphack.Keybinds.AutoCrystalBreakerKey; | ||
import static net.fabricmc.smphack.Keybinds.KillauraKey; | ||
import static net.fabricmc.smphack.Keybinds.Nofallkey; | ||
import static net.fabricmc.smphack.Keybinds.SpeedKey; | ||
import static net.fabricmc.smphack.Keybinds.Jesuskey; | ||
|
||
|
||
|
||
// I know no one is gonna check the source code but for the few people who do and might need help, I am glad for you; | ||
// This shit took me much time. I didnt know How the fuck do you even use keybinds and what onHudRender was. Heck I didnt even know what is the main class of fabric is. Bruh. | ||
// This is not supposed to be a full on hack client | ||
// Use this for fun with your friends and on shitty servers with shitty AntiCheat. | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class HUDoverlay implements HudRenderCallback { | ||
|
||
//new object from ___ class | ||
Fly fly = new Fly(); | ||
Nofall noFall = new Nofall(); | ||
Jesusm jesus = new Jesusm(); | ||
Speed speed = new Speed(); | ||
jesus jes = new jesus(); | ||
Fullbright fullbright = new Fullbright(); | ||
SpeedMine speedmine= new SpeedMine(); | ||
NoWeather noWeather=new NoWeather(); | ||
EndCrystalBreaker endCrystalBreaker = new EndCrystalBreaker(); | ||
KillAura killAura = new KillAura(); | ||
Reach reach= new Reach(); | ||
float prevRainGradient; | ||
int tw = 10; | ||
int th = 10; | ||
boolean Fullbright; | ||
boolean NoWeather; | ||
|
||
|
||
MinecraftClient mc = MinecraftClient.getInstance(); | ||
@Override | ||
public void onHudRender(MatrixStack matrices, float tickDelta) { | ||
//To avoid stupid crashes | ||
if (mc != null ) | ||
{ | ||
assert mc.player != null; | ||
assert MinecraftClient.getInstance().world != null; | ||
prevRainGradient = MinecraftClient.getInstance().world.getRainGradient(prevRainGradient); | ||
|
||
|
||
//To stop rendering if debug screen or F3 menu is enabled | ||
if (mc.options.debugEnabled) {return;} | ||
//To avoid null crashes | ||
if (Formatting.RED.getColorValue() == null || Formatting.BLUE.getColorValue() == null || Formatting.WHITE.getColorValue() == null || Formatting.GREEN.getColorValue() == null) | ||
{ | ||
return; | ||
} | ||
TextRenderer font = mc.textRenderer; | ||
ClientPlayerEntity player= MinecraftClient.getInstance().player; | ||
if(font==null || player==null){return;} | ||
|
||
int alpha = 127; | ||
int blue = 0; | ||
|
||
int color = (alpha << 24) | (0) | blue; | ||
|
||
Screen.fill(matrices,5,76,20,76, color); | ||
|
||
|
||
//To Check if Flykey is pressed | ||
//Useless brackets in order to seperate the different mods | ||
if (FlyKey.wasPressed()) { | ||
fly.toggled(); | ||
} | ||
|
||
//To get fly mode | ||
Flymodes flymode = Flymodes.values()[fly.flybindcounter % Flymodes.values().length]; | ||
String flymodeText = flymode.name().toUpperCase(); | ||
Text text = Text.of("Fly [" + flymodeText + "]"); | ||
|
||
//To check if enabled or disabled | ||
if (fly.enabled) { | ||
fly.update(); | ||
flymode.fly(); | ||
//render [on] | ||
font.draw(matrices, text, tw+2, th + 12, Formatting.GREEN.getColorValue()); | ||
} else { | ||
//render [off] | ||
font.draw(matrices, text, tw+2, th + 12, Formatting.RED.getColorValue()); | ||
//player.sendMessage(Text.of("Fly Off")); | ||
} | ||
|
||
// | ||
{ | ||
if (Nofallkey.wasPressed()) { | ||
noFall.toggled(); | ||
} | ||
if (noFall.enabled) { | ||
noFall.update(); | ||
//render [on] | ||
font.draw(matrices, "Nofall", tw, th + 48, Formatting.GREEN.getColorValue()); | ||
} else { | ||
//render [off] | ||
font.draw(matrices, "Nofall", tw, th + 48, Formatting.RED.getColorValue()); | ||
//player.sendMessage(Text.of("Nofall Off")); | ||
} | ||
} | ||
// | ||
{ | ||
if(Jesuskey.wasPressed()) { | ||
jesus.toggled(); | ||
} | ||
if (jesus.enabled) { | ||
jes.update(); | ||
font.draw(matrices, "Jesus", tw, th + 36, Formatting.GREEN.getColorValue()); | ||
} else { | ||
font.draw(matrices, "Jesus", tw, th + 36, Formatting.RED.getColorValue()); | ||
} | ||
} | ||
|
||
if(SpeedKey.wasPressed()) | ||
{ | ||
speed.toggled(); | ||
} | ||
if(speed.enabled) | ||
{ | ||
speed.update(); | ||
font.draw(matrices, "Speed", tw+1, th + 24, Formatting.GREEN.getColorValue()); | ||
} | ||
else | ||
{ | ||
font.draw(matrices, "Speed", tw+1, th + 24, Formatting.RED.getColorValue()); | ||
assert mc.player != null; | ||
mc.player.getAbilities().setWalkSpeed(speed.walkspeed); | ||
} | ||
Fullbright= GeneralConfig.getConfig().Fullbright; | ||
if(Fullbright) | ||
{fullbright.update();} | ||
else | ||
{mc.player.removeStatusEffect(StatusEffects.NIGHT_VISION);} | ||
|
||
if (GeneralConfig.enabled) | ||
{ | ||
font.draw(matrices, "Freecam", tw , th + 60, Formatting.GREEN.getColorValue()); | ||
} | ||
if (!GeneralConfig.enabled) | ||
{ | ||
font.draw(matrices, "Freecam", tw , th + 60, Formatting.RED.getColorValue()); | ||
} | ||
|
||
speedmine.toggled(); | ||
|
||
NoWeather= GeneralConfig.getConfig().NoWeather; | ||
if (NoWeather) | ||
{ | ||
noWeather.update(); | ||
} | ||
else | ||
{ | ||
if(MinecraftClient.getInstance().world.isRaining()) { | ||
MinecraftClient.getInstance().world.setRainGradient(0); | ||
} | ||
} | ||
|
||
if (AutoCrystalBreakerKey.wasPressed()) | ||
{ | ||
endCrystalBreaker.toggled(); | ||
} | ||
if (endCrystalBreaker.enabled) { | ||
font.draw(matrices, "AutoCrystal", tw , th + 72, Formatting.GREEN.getColorValue()); | ||
} | ||
else { | ||
font.draw(matrices, "AutoCrystal", tw , th + 72, Formatting.RED.getColorValue()); | ||
} | ||
|
||
if (KillauraKey.wasPressed()) | ||
{ | ||
killAura.toggled(); | ||
} | ||
if (killAura.enabled) { | ||
font.draw(matrices, "KillAura", tw , th + 84, Formatting.GREEN.getColorValue()); | ||
} | ||
else { | ||
font.draw(matrices, "KillAura", tw , th + 84, Formatting.RED.getColorValue()); | ||
} | ||
|
||
if (ReachKey.wasPressed()) | ||
{ | ||
reach.toggled(); | ||
} | ||
if (reach.enabled) | ||
{ | ||
font.draw(matrices, "Reach", tw , th + 96, Formatting.GREEN.getColorValue()); | ||
} | ||
else | ||
{ | ||
font.draw(matrices, "Reach", tw , th + 96, Formatting.RED.getColorValue()); | ||
} | ||
|
||
|
||
} | ||
} | ||
} | ||
|
55 changes: 55 additions & 0 deletions
55
src/main/java/net/fabricmc/smphack/Hacks/Criticals/Criticals.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package net.fabricmc.smphack.Hacks.Criticals; | ||
|
||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket; | ||
import net.minecraft.util.hit.EntityHitResult; | ||
import net.minecraft.util.hit.HitResult; | ||
|
||
public class Criticals { | ||
|
||
MinecraftClient MC = MinecraftClient.getInstance(); | ||
public void onLeftClick() | ||
{ | ||
if(MC.crosshairTarget == null | ||
|| MC.crosshairTarget.getType() != HitResult.Type.ENTITY | ||
|| !(((EntityHitResult)MC.crosshairTarget) | ||
.getEntity() instanceof LivingEntity)) | ||
return; | ||
|
||
doCritical(); | ||
} | ||
|
||
public void doCritical() | ||
{ | ||
|
||
assert MC.player != null; | ||
// if(!MC.player.isOnGround()) | ||
// return; | ||
|
||
if(MC.player.isTouchingWater() || MC.player.isInLava()){ | ||
return;} | ||
|
||
doPacketJump(); | ||
} | ||
|
||
private void doPacketJump() | ||
{ | ||
assert MC.player != null; | ||
double posX = MC.player.getX(); | ||
double posY = MC.player.getY(); | ||
double posZ = MC.player.getZ(); | ||
|
||
sendPos(posX, posY + 0.0625D, posZ, true); | ||
sendPos(posX, posY, posZ, false); | ||
sendPos(posX, posY + 1.1E-5D, posZ, false); | ||
sendPos(posX, posY, posZ, false); | ||
} | ||
|
||
private void sendPos(double x, double y, double z, boolean onGround) | ||
{ | ||
assert MC.player != null; | ||
MC.player.networkHandler.sendPacket( | ||
new PlayerMoveC2SPacket.PositionAndOnGround(x, y, z, onGround)); | ||
} | ||
} |
Oops, something went wrong.