Skip to content

Commit

Permalink
IDFK WHAT DID I EVEN MAKE
Browse files Browse the repository at this point in the history
  • Loading branch information
Spigey committed Apr 13, 2024
1 parent e0bfbf7 commit 2ceef8a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main/java/spigey/asteroide/AsteroideAddon.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public void onInitialize() {
addCommand(new ServerCrash());
addCommand(new GetNbtItem());
addCommand(new PermLevel());
addCommand(new thingycomnad());

// HUD
addHud(Username.INFO);
Expand Down
38 changes: 38 additions & 0 deletions src/main/java/spigey/asteroide/commands/thingycomnad.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package spigey.asteroide.commands;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.commands.Command;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.utils.world.BlockUtils;
import net.minecraft.command.CommandSource;
import net.minecraft.item.Items;
import net.minecraft.util.math.BlockPos;

import static java.lang.Thread.sleep;
import static meteordevelopment.meteorclient.MeteorClient.mc;
import static meteordevelopment.meteorclient.utils.world.BlockUtils.place;
import static spigey.asteroide.util.CommandBlock;
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

public class thingycomnad extends Command {
public thingycomnad() {
super("fuckserver", "fucks the server usig command blocks");
}

@Override
public void build(LiteralArgumentBuilder<CommandSource> builder) {
builder.executes(context -> {
CommandBlock(Items.REPEATING_COMMAND_BLOCK, "/say hi", 1);
// help I gotta make it wait for a few ticks somehow but how
place(mc.player.getBlockPos().up(2));
return SINGLE_SUCCESS;
});
}

private void place(BlockPos blockPos) {
assert mc.world != null;
if(mc.world.getBlockState(blockPos).getBlock().asItem() != Items.REPEATING_COMMAND_BLOCK){
BlockUtils.place(blockPos, InvUtils.findInHotbar(Items.REPEATING_COMMAND_BLOCK), 50, false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.MinecraftClient;
import net.minecraft.network.packet.s2c.play.GameMessageS2CPacket;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableTextContent;
import spigey.asteroide.AsteroideAddon;
import net.minecraft.block.entity.CommandBlockBlockEntity;

public class CreativeCrashModule extends Module {
private int checking;

public CreativeCrashModule() {
super(AsteroideAddon.CATEGORY, "Server Fuck", "Crashes the server without using OP. Creative mode required");
}
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/spigey/asteroide/util.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ public static void addCommand(Command CommandToAdd){
public static void addHud(HudElementInfo HudToAdd){
Hud.get().register(HudToAdd);
}
public static void CommandBlock(Item CommandBlockToGive, String Command, int AlwaysActive) throws CommandSyntaxException {
if(!CommandBlockToGive.toString().toUpperCase().contains("COMMAND_BLOCK")){return;} // Only allow Command Blocks
String nbt = "{BlockEntityTag:{Command:\"" + Command + "\",auto:" + AlwaysActive + "b},HideFlags:127}"; // idfk nbt
give(itemstack(CommandBlockToGive), nbt);
}
}

0 comments on commit 2ceef8a

Please sign in to comment.