Skip to content

Commit

Permalink
readable code 😍
Browse files Browse the repository at this point in the history
  • Loading branch information
Spigey committed May 3, 2024
1 parent 7518d78 commit cf22684
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/main/java/spigey/asteroide/util.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
import spigey.asteroide.modules.BanStuffs;

import java.lang.reflect.Array;
import java.util.List;
import java.util.Objects;
import java.util.Random;

import static meteordevelopment.meteorclient.MeteorClient.mc;
import static meteordevelopment.meteorclient.utils.player.ChatUtils.error;

public class util {
public static String perm(int lvl){
Expand Down Expand Up @@ -198,4 +200,19 @@ public static boolean BoolContains(boolean[] ARRAY, boolean VALUE){
}
return istfgiamsofuckingunmotivatedrnomgplsjustfuckingkillmelikeactuallyiwannakmsrn;
}
public static void MultiCommandBlock(List<String> commands){
commands.add("setblock ~ ~1 ~ barrier");
commands.add("summon minecraft:falling_block ~ ~2 ~ {BlockState:{Name:command_block},TileEntityData:{Command:'fill ~ ~ ~ ~ ~-4 ~ air',auto:1b}}");
commands.add("kill @e[type=command_block_minecart,tag=oawiudoawiudoawidu]");
StringBuilder out = new StringBuilder("/summon falling_block ~ ~2 ~ {Time:1,BlockState:{Name:redstone_block}, Passengers:[{id:falling_block, Time:0, BlockState:{Name:activator_rail}");
for (int i = 0; i < commands.size(); i++) {
out.append(",Passengers:[{id:command_block_minecart, Tags:[\"oawiudoawiudoawidu\"], Command:\"").append(commands.get(i)).append("\"}]");
}
out.append("}]}");
try {
CommandBlock(Items.COMMAND_BLOCK, String.valueOf(out), 1, "Multi-Command Command Block", true);
} catch (CommandSyntaxException e) {
error(String.valueOf(e));
}
}
}

0 comments on commit cf22684

Please sign in to comment.