From 2a05c8d0cec81835471f7483db043cd42f408cef Mon Sep 17 00:00:00 2001 From: Cloudburst Date: Tue, 27 Apr 2021 11:43:16 +0200 Subject: [PATCH] .save-skin, better .give, interactionMenu, cate... --- .../rejects/MeteorRejectsAddon.java | 20 +- .../rejects/commands/GiveCommand.java | 379 +++------- .../rejects/commands/SaveSkinCommand.java | 90 +++ .../rejects/commands/TpsCommand.java | 36 + .../mixin/HorseBaseEntityAccessor.java | 12 + .../cloudburst/rejects/modules/AntiBot.java | 100 +++ .../rejects/modules/AntiSpawnpoint.java | 60 ++ .../rejects/modules/AntiVanish.java | 140 ++++ .../rejects/modules/AutoExtinguish.java | 193 ++++++ .../rejects/modules/AutoHighway.java | 655 ++++++++++++++++++ .../cloudburst/rejects/modules/AutoPot.java | 3 +- .../cloudburst/rejects/modules/Confuse.java | 3 +- .../cloudburst/rejects/modules/Glide.java | 3 +- .../rejects/modules/InteractionMenu.java | 126 ++++ .../cloudburst/rejects/modules/Lavacast.java | 3 +- .../rejects/modules/ObsidianFarm.java | 122 ++++ .../rejects/modules/RenderInvisible.java | 3 +- .../rejects/modules/SoundLocator.java | 3 +- .../cloudburst/rejects/modules/TPSSync.java | 28 + .../rejects/screens/InteractionScreen.java | 336 +++++++++ .../rejects/screens/StatsScreen.java | 62 ++ .../cloudburst/rejects/utils/GiveUtils.java | 288 ++++++++ src/main/resources/meteor-rejects.mixins.json | 3 +- 23 files changed, 2369 insertions(+), 299 deletions(-) create mode 100644 src/main/java/cloudburst/rejects/commands/SaveSkinCommand.java create mode 100644 src/main/java/cloudburst/rejects/commands/TpsCommand.java create mode 100644 src/main/java/cloudburst/rejects/mixin/HorseBaseEntityAccessor.java create mode 100644 src/main/java/cloudburst/rejects/modules/AntiBot.java create mode 100644 src/main/java/cloudburst/rejects/modules/AntiSpawnpoint.java create mode 100644 src/main/java/cloudburst/rejects/modules/AntiVanish.java create mode 100644 src/main/java/cloudburst/rejects/modules/AutoExtinguish.java create mode 100644 src/main/java/cloudburst/rejects/modules/AutoHighway.java create mode 100644 src/main/java/cloudburst/rejects/modules/InteractionMenu.java create mode 100644 src/main/java/cloudburst/rejects/modules/ObsidianFarm.java create mode 100644 src/main/java/cloudburst/rejects/modules/TPSSync.java create mode 100644 src/main/java/cloudburst/rejects/screens/InteractionScreen.java create mode 100644 src/main/java/cloudburst/rejects/screens/StatsScreen.java create mode 100644 src/main/java/cloudburst/rejects/utils/GiveUtils.java diff --git a/src/main/java/cloudburst/rejects/MeteorRejectsAddon.java b/src/main/java/cloudburst/rejects/MeteorRejectsAddon.java index 327b2cc..d0e0dbd 100644 --- a/src/main/java/cloudburst/rejects/MeteorRejectsAddon.java +++ b/src/main/java/cloudburst/rejects/MeteorRejectsAddon.java @@ -2,8 +2,10 @@ package cloudburst.rejects; import minegame159.meteorclient.MeteorAddon; import minegame159.meteorclient.systems.commands.Commands; +import minegame159.meteorclient.systems.modules.Category; import minegame159.meteorclient.systems.modules.Modules; +import net.minecraft.item.Items; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -12,22 +14,38 @@ import cloudburst.rejects.modules.*; public class MeteorRejectsAddon extends MeteorAddon { public static final Logger LOG = LogManager.getLogger(); + public static final Category CATEGORY = new Category("Rejects", Items.PODZOL.getDefaultStack()); @Override public void onInitialize() { LOG.info("Initializing Meteor Rejects Addon"); Modules modules = Modules.get(); + modules.add(new AntiBot()); + modules.add(new AntiSpawnpoint()); + modules.add(new AntiVanish()); + modules.add(new AutoExtinguish()); + //modules.add(new AutoHighway()); modules.add(new AutoPot()); - modules.add(new Confuse()); + //modules.add(new Confuse()); + modules.add(new InteractionMenu()); modules.add(new Glide()); modules.add(new Lavacast()); + //modules.add(new ObsidianFarm()); modules.add(new RenderInvisible()); modules.add(new SoundLocator()); + modules.add(new TPSSync()); Commands commands = Commands.get(); commands.add(new AntiAntiXrayCommand()); commands.add(new BookDupeCommand()); commands.add(new GiveCommand()); + commands.add(new SaveSkinCommand()); + commands.add(new TpsCommand()); + } + + @Override + public void onRegisterCategories() { + Modules.registerCategory(CATEGORY); } } diff --git a/src/main/java/cloudburst/rejects/commands/GiveCommand.java b/src/main/java/cloudburst/rejects/commands/GiveCommand.java index 3ed5a2b..f2ae749 100644 --- a/src/main/java/cloudburst/rejects/commands/GiveCommand.java +++ b/src/main/java/cloudburst/rejects/commands/GiveCommand.java @@ -1,30 +1,31 @@ package cloudburst.rejects.commands; +import com.mojang.brigadier.arguments.StringArgumentType; import com.mojang.brigadier.builder.LiteralArgumentBuilder; -import com.mojang.brigadier.exceptions.CommandSyntaxException; import net.minecraft.command.CommandSource; import net.minecraft.command.argument.ItemStackArgument; import net.minecraft.command.argument.ItemStackArgumentType; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; -import net.minecraft.nbt.StringNbtReader; +import net.minecraft.nbt.*; import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket; import cloudburst.rejects.arguments.EnumStringArgumentType; import minegame159.meteorclient.systems.commands.Command; import minegame159.meteorclient.utils.player.ChatUtils; +import net.minecraft.text.LiteralText; +import net.minecraft.text.Text; +import static cloudburst.rejects.utils.GiveUtils.createPreset; import static com.mojang.brigadier.Command.SINGLE_SUCCESS; -import java.util.Arrays; -import java.util.Collection; -import java.util.Random; +import java.util.*; public class GiveCommand extends Command { public GiveCommand() { - super("give", "Gives items in creative"); + super("give", "Gives items in creative", "item"); } private final Collection PRESETS = Arrays.asList("forceop", "negs", "stacked", "spawners", "bookban", @@ -34,6 +35,77 @@ public class GiveCommand extends Command { @Override public void build(LiteralArgumentBuilder builder) { + builder.then(literal("holo").then(argument("message", StringArgumentType.greedyString()).executes(ctx -> { + if (!mc.player.abilities.creativeMode) { + ChatUtils.error("Not In Creative Mode!"); + return SINGLE_SUCCESS; + } + String message = ctx.getArgument("message", String.class); + message = message.replace("&", "\247"); + ItemStack stack = new ItemStack(Items.ARMOR_STAND); + CompoundTag tag = new CompoundTag(); + ListTag listTag = new ListTag(); + listTag.add(DoubleTag.of(mc.player.getX())); + listTag.add(DoubleTag.of(mc.player.getY())); + listTag.add(DoubleTag.of(mc.player.getZ())); + tag.putBoolean("Invisible", true); + tag.putBoolean("Invulnerable", true); + tag.putBoolean("Interpret", true); + tag.putBoolean("NoGravity", true); + tag.putBoolean("CustomNameVisible", true); + tag.putString("CustomName", Text.Serializer.toJson(new LiteralText(message))); + tag.put("Pos", listTag); + stack.putSubTag("EntityTag", tag); + placeStackInHotbar(stack); + return SINGLE_SUCCESS; + }))); + + builder.then(literal("firework").executes(ctx -> { + if (!mc.player.abilities.creativeMode) { + ChatUtils.error("Not In Creative Mode!"); + return SINGLE_SUCCESS; + } + ItemStack firework = new ItemStack(Items.FIREWORK_ROCKET); + CompoundTag baseCompound = new CompoundTag(); + CompoundTag tagCompound = new CompoundTag(); + ListTag explosionList = new ListTag(); + + for(int i = 0; i < 5000; i++) + { + CompoundTag explosionCompound = new CompoundTag(); + + Random rand = new Random(); + explosionCompound.putByte("Type", (byte)rand.nextInt(5)); + + int colors[] = {1973019,11743532,3887386,5320730,2437522,8073150,2651799,11250603,4408131,14188952,4312372,14602026,6719955,12801229,15435844,15790320}; + + explosionCompound.putIntArray("Colors", colors); + explosionList.add(explosionCompound); + } + + + tagCompound.putInt("Flight", 0); + tagCompound.put("Explosions", explosionList); + baseCompound.put("Fireworks", tagCompound); + firework.setTag(baseCompound); + placeStackInHotbar(firework); + return SINGLE_SUCCESS; + })); + + builder.then(literal("head").then(argument("owner",StringArgumentType.greedyString()).executes(ctx -> { + if (!mc.player.abilities.creativeMode) { + ChatUtils.error("Not In Creative Mode!"); + return SINGLE_SUCCESS; + } + String playerName = ctx.getArgument("owner",String.class); + ItemStack itemStack = new ItemStack(Items.PLAYER_HEAD); + CompoundTag tag = new CompoundTag(); + tag.putString("SkullOwner", playerName); + itemStack.setTag(tag); + placeStackInHotbar(itemStack); + return SINGLE_SUCCESS; + }))); + builder.then(literal("preset").then(argument("name", new EnumStringArgumentType(PRESETS)) .then(argument("container", new EnumStringArgumentType(CONTAINERS)).executes(context -> { if (!mc.player.abilities.creativeMode) { @@ -42,305 +114,30 @@ public class GiveCommand extends Command { } String name = context.getArgument("name", String.class); String container = context.getArgument("container", String.class); - givePreset(name, container); + placeStackInHotbar(createPreset(name, container)); return SINGLE_SUCCESS; })))); + builder.then(literal("item").then(argument("item", ItemStackArgumentType.itemStack()).executes(context -> { ItemStackArgument item = ItemStackArgumentType.getItemStackArgument(context, "item"); if (!mc.player.abilities.creativeMode) { ChatUtils.error("Not In Creative Mode!"); return SINGLE_SUCCESS; } - placeStackInHotbar(item.getItem().getDefaultStack()); + placeStackInHotbar(item.createStack(1, false)); return SINGLE_SUCCESS; }))); } - private void givePreset(String name, String container) { - ItemStack item = null; - switch (container) { - case "chest": - item = new ItemStack(Items.CHEST); - break; - case "trapped_chest": - item = new ItemStack(Items.TRAPPED_CHEST); - break; - case "barrel": - item = new ItemStack(Items.BARREL); - break; - case "dispenser": - item = new ItemStack(Items.DISPENSER); - break; - default: - item = new ItemStack(Items.PINK_SHULKER_BOX); - break; - } - String nick = mc.player.getName().asString(); - try { - switch (name.toLowerCase()) { - case "negs": + private void placeStackInHotbar(ItemStack stack) { + for (int i = 0; i < 9; i++) { + if (!mc.player.inventory.getStack(i).isEmpty()) continue; - item.setTag(StringNbtReader.parse("{display:{Name:\"{\\\"text\\\":\\\"" + nick - + "'s Negative Items\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:1b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:2b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:3b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:4b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:5b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:6b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:7b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:8b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:9b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:10b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:11b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:12b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:13b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:14b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:15b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:16b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:17b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:18b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:19b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:20b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:21b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:22b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:23b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:24b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:25b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:26b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}}]}}")); - - break; - case "stacked": - item.setTag(StringNbtReader.parse("{display:{Name:\"{\\\"text\\\":\\\"" + nick - + "'s Stacked Items\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:diamond_helmet\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Helmet\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:1b,id:\"minecraft:diamond_chestplate\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Chestplate\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:2b,id:\"minecraft:diamond_leggings\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Leggings\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:3b,id:\"minecraft:diamond_boots\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Boots\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:4b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:5b,id:\"minecraft:diamond_shovel\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Shovel\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:6b,id:\"minecraft:diamond_pickaxe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Pickaxe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:7b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:8b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:9b,id:\"minecraft:water_bucket\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Water Bucket\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:10b,id:\"minecraft:lava_bucket\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Lava Buckets\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:11b,id:\"minecraft:milk_bucket\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Milk Buckets\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:12b,id:\"minecraft:bow\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Bows\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:13b,id:\"minecraft:fishing_rod\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Fishing Rods\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:14b,id:\"minecraft:writable_book\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Book And Quills\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},pages:[\"\"]}},{Slot:15b,id:\"minecraft:enchanted_book\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Enchanted Books\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:16b,id:\"minecraft:saddle\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Saddles\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:17b,id:\"minecraft:potion\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Bottles\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:18b,id:\"minecraft:music_disc_11\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:19b,id:\"minecraft:music_disc_13\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:20b,id:\"minecraft:music_disc_blocks\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:21b,id:\"minecraft:music_disc_cat\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:22b,id:\"minecraft:music_disc_chirp\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:23b,id:\"minecraft:music_disc_far\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:24b,id:\"minecraft:music_disc_mall\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:25b,id:\"minecraft:music_disc_mellohi\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:26b,id:\"minecraft:music_disc_stal\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}}]}}")); - break; - case "spawners": - item.setTag(StringNbtReader.parse("{display:{Name:\"{\\\"text\\\":\\\"" + nick - + "'s Spawners\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Pig Spawners\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:1b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Lag Spawners\\\",\\\"color\\\":\\\"dark_red\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{SpawnCount:32767,SpawnRange:32767,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:0,MaxNearbyEntities:32767,RequiredPlayerRange:32767}}},{Slot:2b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Lag Spawners #2\\\",\\\"color\\\":\\\"dark_red\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{SpawnCount:32767,SpawnRange:32767,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:0,MaxNearbyEntities:32767,RequiredPlayerRange:32767}}},{Slot:3b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" - + nick - + "'s Tnt Spawners\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{SpawnCount:50,SpawnRange:10,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:0,MaxNearbyEntities:32767,RequiredPlayerRange:32767,SpawnData:{id:\"minecraft:tnt\",Fuse:1}}}},{Slot:4b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:'{\"text\":\"" - + nick - + "\\'s Boat Spawner\",\"color\":\"aqua\",\"bold\":true,\"italic\":true,\"underlined\":true}'},BlockEntityTag:{SpawnCount:50,SpawnRange:10,SpawnData:{id:\"minecraft:boat\",Glowing:1b,Invulnerable:1b,CustomNameVisible:1b,Type:\"jungle\",CustomName:'{\"text\":\"" - + nick - + "_Knight Ontop\",\"color\":\"aqua\",\"bold\":true,\"italic\":true,\"underlined\":true}'}}}}]}}")); - break; - case "bookban": - String n = mc.player.getName().asString().toUpperCase(); - item.setTag(StringNbtReader.parse("{display:{Name:'{\"text\":\"" + nick - + "\\'s Bookban Shulker\",\"color\":\"aqua\",\"bold\":true,\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:1b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:2b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:3b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:4b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:5b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:6b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:7b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:8b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:9b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:10b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:11b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:12b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:13b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:14b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:15b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:16b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:17b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:18b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:19b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:20b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:21b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:22b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:23b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:24b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:25b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}},{Slot:26b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" - + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() - + "]}}]}}")); - break; - case "test": - String s = ""; - String s1 = ""; - Random r = new Random(); - for (int i = 0; i < 500; i++) - s1 += ",{Type:0}"; - for (int i = 0; i < 100; i++) - s += "," + r.nextInt(16777215); - item.setTag(StringNbtReader.parse( - "{BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:firework_rocket\",Count:1b,tag:{Fireworks:{Explosions:[{Type:0}" - + s1 - + "]}}},{Slot:1b,id:\"minecraft:firework_rocket\",Count:64b,tag:{Fireworks:{Flight:127b,Explosions:[{Type:0,Flicker:1b,Trail:1b,Colors:[I;16711680],FadeColors:[I;16711680" - + s + "]},{Type:1,Flicker:1b,Trail:1b,Colors:[I;16711680],FadeColors:[I;16711680" - + s + "]},{Type:2,Flicker:1b,Trail:1b,Colors:[I;16711680" + s - + "],FadeColors:[I;16711680" + s - + "]},{Type:3,Flicker:1b,Trail:1b,Colors:[I;16711680" + s - + "],FadeColors:[I;16711680" + s - + "]},{Type:4,Flicker:1b,Trail:1b,Colors:[I;16711680" + s - + "],FadeColors:[I;16711680" + s - + "]}]}}},{Slot:2b,id:\"minecraft:lingering_potion\",Count:64b,tag:{display:{Name:'{\"text\":\"" - + nick - + "\\'s B R U H M O M E N T Potion\",\"color\":\"aqua\",\"bold\":true,\"italic\":true}'},AttributeModifiers:[{AttributeName:\"generic.maxHealth\",Name:\"generic.maxHealth\",Amount:1,Operation:0,UUIDLeast:338793,UUIDMost:213301}],CustomPotionEffects:[{Id:1b,Amplifier:127b,Duration:32767},{Id:2b,Amplifier:127b,Duration:32767},{Id:3b,Amplifier:127b,Duration:32767},{Id:4b,Amplifier:127b,Duration:32767},{Id:5b,Amplifier:127b,Duration:32767},{Id:6b,Amplifier:127b,Duration:32767},{Id:7b,Amplifier:127b,Duration:32767},{Id:8b,Amplifier:127b,Duration:32767},{Id:9b,Amplifier:127b,Duration:32767},{Id:10b,Amplifier:127b,Duration:32767},{Id:11b,Amplifier:127b,Duration:32767},{Id:12b,Amplifier:127b,Duration:32767},{Id:13b,Amplifier:127b,Duration:32767},{Id:14b,Amplifier:127b,Duration:32767},{Id:15b,Amplifier:127b,Duration:32767},{Id:16b,Amplifier:127b,Duration:32767},{Id:17b,Amplifier:127b,Duration:32767},{Id:18b,Amplifier:127b,Duration:32767},{Id:19b,Amplifier:127b,Duration:32767},{Id:20b,Amplifier:127b,Duration:32767},{Id:21b,Amplifier:127b,Duration:32767},{Id:22b,Amplifier:127b,Duration:32767},{Id:23b,Amplifier:127b,Duration:32767},{Id:24b,Amplifier:127b,Duration:32767},{Id:25b,Amplifier:127b,Duration:32767},{Id:26b,Amplifier:127b,Duration:32767},{Id:27b,Amplifier:127b,Duration:32767},{Id:28b,Amplifier:127b,Duration:32767},{Id:29b,Amplifier:127b,Duration:32767},{Id:30b,Amplifier:127b,Duration:32767},{Id:31b,Amplifier:127b,Duration:32767}],Potion:\"minecraft:leaping\"}},{Slot:3b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}},{Slot:4b,id:\"minecraft:chicken_spawn_egg\",Count:1b,tag:{EntityTag:{id:\"minecraft:spawner_minecart\",CustomDisplayTile:1b,Delay:1,MinSpawnDelay:0,MaxSpawnDelay:0,MaxNearbyEntities:1000,RequiredPlayerRange:100,DisplayState:{Name:\"minecraft:acacia_door\",Properties:{half:\"upper\",hinge:\"left\",open:\"true\"}},SpawnData:{id:\"minecraft:minecart\"}}}}]}}")); - break; - case "eggs": - item.setTag(StringNbtReader.parse("{display:{Name:'{\"text\":\"" + nick - + "\\'s Spawn Eggs\",\"color\":\"aqua\",\"bold\":true,\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:zombie_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Spawn Giant\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:giant\",Invulnerable:1b,Glowing:1b}}},{Slot:1b,id:\"minecraft:enderman_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Enderman With Cmd block\",\"color\":\"aqua\"}'},EntityTag:{carriedBlockState:{Name:\"minecraft:command_block\",Properties:{conditional:\"true\"}}}}},{Slot:2b,id:\"minecraft:bat_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Cmd minecart (kill @a)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:command_block_minecart\",Command:\"kill @a\"}}},{Slot:3b,id:\"minecraft:bat_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Spawner minecart (turn particles off)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:spawner_minecart\",SpawnData:{id:\"minecraft:armor_stand\"}}}},{Slot:4b,id:\"minecraft:cave_spider_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"E G G\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:egg\",NoGravity:1b,Fire:2100000000,Glowing:1b}}},{Slot:5b,id:\"minecraft:stray_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"area_effect_cloud (50 range)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:area_effect_cloud\",Particle:\"angry_villager\",ReapplicationDelay:1,Radius:50f,RadiusPerTick:0f,RadiusOnUse:0f,Duration:500000,DurationOnUse:0f,Color:16711680,Potion:\"minecraft:strong_swiftness\"}}},{Slot:6b,id:\"minecraft:evoker_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"area_effect_cloud (E X P A N D)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:area_effect_cloud\",Particle:\"angry_villager\",Radius:1f,RadiusPerTick:10f,RadiusOnUse:1f,Duration:10000}}},{Slot:7b,id:\"minecraft:elder_guardian_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Arrow (End Portal Sound)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:arrow\",pickup:1b,SoundEvent:\"block.end_portal.spawn\"}}},{Slot:8b,id:\"minecraft:elder_guardian_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Arrow (EG Curse Sound)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:arrow\",pickup:1b,SoundEvent:\"entity.elder_guardian.curse\"}}},{Slot:9b,id:\"minecraft:drowned_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Big chungus slime\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:slime\",Size:50}}},{Slot:10b,id:\"minecraft:fox_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Invis Armor Stand\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:armor_stand\",Invulnerable:1b,Invisible:1b,PersistenceRequired:1b,ArmorItems:[{},{},{},{id:\"minecraft:spawner\",Count:1b}]}}},{Slot:11b,id:\"minecraft:ghast_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Enderdragon\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:ender_dragon\",DragonPhase:8}}},{Slot:12b,id:\"minecraft:cow_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Lightning\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:lightning_bolt\"}}},{Slot:13b,id:\"minecraft:guardian_spawn_egg\",Count:1b,tag:{EntityTag:{id:\"minecraft:iron_golem\"}}},{Slot:14b,id:\"minecraft:evoker_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"area_effect_cloud (expand slow)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:area_effect_cloud\",Particle:\"angry_villager\",Radius:1f,RadiusPerTick:10f,RadiusOnUse:1f,Duration:1000000}}},{Slot:15b,id:\"minecraft:bee_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Tnt Minecart\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:tnt_minecart\",TNTFuse:1000000}}},{Slot:16b,id:\"minecraft:bat_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Invalid translate name test\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:boat\",CustomNameVisible:1b,Type:\"acacia\",CustomName:'{\"translate\":\"translation.test.invalid\"}'}}}]}}")); - break; - case "forceop": - item.setTag(StringNbtReader.parse( - "{BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:command_block\",Count:64b,tag:{BlockEntityTag:{conditionMet:0b,auto:0b,CustomName:'{\"text\":\"@\"}',powered:0b,Command:\"execute as @e run op " - + nick - + "\",id:\"minecraft:command_block\",SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b},display:{Lore:['\"(+NBT)\"']}}},{Slot:1b,id:\"minecraft:bat_spawn_egg\",Count:64b,tag:{EntityTag:{Time:1,BlockState:{Name:\"minecraft:spawner\"},id:\"minecraft:falling_block\",TileEntityData:{SpawnCount:20,SpawnData:{id:\"minecraft:villager\",Passengers:[{Time:1,BlockState:{Name:\"minecraft:redstone_block\"},id:\"minecraft:falling_block\",Passengers:[{id:\"minecraft:fox\",Passengers:[{Time:1,BlockState:{Name:\"minecraft:activator_rail\"},id:\"minecraft:falling_block\",Passengers:[{Command:\"execute as @e run op " - + nick - + "\",id:\"minecraft:command_block_minecart\"}]}],NoAI:1b,Health:1.0f,ActiveEffects:[{Duration:1000,Id:20b,Amplifier:4b}]}]}],NoAI:1b,Health:1.0f,ActiveEffects:[{Duration:1000,Id:20b,Amplifier:4b}]},MaxSpawnDelay:100,SpawnRange:10,Delay:1,MinSpawnDelay:100}}}}]},display:{Name:'{\"bold\":true,\"italic\":true,\"underlined\":true,\"color\":\"aqua\",\"text\":\"" - + nick + "\\'s ForceOP\"}'}}")); - break; - default: - break; - } - } catch (CommandSyntaxException e) { - ChatUtils.error("An NBT parsing error occured"); - } - - placeStackInHotbar(item); - return; - } - - private String getBookbanTag() { - String book = ""; - String page = ""; - for (int i = 0; i < 100; i++) - page += "\uffff"; - for (int i = 0; i < 99; i++) - book += "\"" + page + "\","; - book += "\"" + page + "\""; - - return book; - } - - private void placeStackInHotbar(ItemStack stack) - { - for(int i = 0; i < 9; i++) - { - if(!mc.player.inventory.getStack(i).isEmpty())continue; - - mc.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + i, stack)); + mc.player.networkHandler.sendPacket(new CreativeInventoryActionC2SPacket(36 + i, stack)); return; - } + } - ChatUtils.error("No space in hotbar."); - } + ChatUtils.error("No space in hotbar."); + } } diff --git a/src/main/java/cloudburst/rejects/commands/SaveSkinCommand.java b/src/main/java/cloudburst/rejects/commands/SaveSkinCommand.java new file mode 100644 index 0000000..221c2b4 --- /dev/null +++ b/src/main/java/cloudburst/rejects/commands/SaveSkinCommand.java @@ -0,0 +1,90 @@ +package cloudburst.rejects.commands; + +import com.google.gson.*; +import com.mojang.brigadier.builder.LiteralArgumentBuilder; +import minegame159.meteorclient.systems.commands.Command; +import minegame159.meteorclient.systems.commands.arguments.PlayerArgumentType; +import minegame159.meteorclient.utils.network.HttpUtils; +import minegame159.meteorclient.utils.player.ChatUtils; +import net.minecraft.command.CommandSource; +import net.minecraft.command.argument.GameProfileArgumentType; +import net.minecraft.entity.player.PlayerEntity; +import org.apache.commons.codec.binary.Base64; +import org.lwjgl.BufferUtils; +import org.lwjgl.PointerBuffer; +import org.lwjgl.system.MemoryUtil; +import org.lwjgl.util.tinyfd.TinyFileDialogs; + +import java.io.*; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; + +import static com.mojang.brigadier.Command.SINGLE_SUCCESS; + +public class SaveSkinCommand extends Command { + + private final PointerBuffer filters; + private final Gson GSON = new Gson(); + + public SaveSkinCommand() { + super("save-skin","Download a player's skin by name.", "skin","skinsteal"); + + filters = BufferUtils.createPointerBuffer(1); + + ByteBuffer pngFilter = MemoryUtil.memASCII("*.png"); + + filters.put(pngFilter); + filters.rewind(); + } + + @Override + public void build(LiteralArgumentBuilder builder) { + builder.then(argument("player", PlayerArgumentType.player()).executes(ctx -> { + PlayerEntity playerEntity = ctx.getArgument("player", PlayerEntity.class); + String path = TinyFileDialogs.tinyfd_saveFileDialog("Save image", null, filters, null); + if (!path.endsWith(".png")) path += ".png"; + saveSkin(playerEntity.getUuidAsString(),path); + return SINGLE_SUCCESS; + })); + } + + private void saveSkin(String uuid, String path) { + try { + //going to explain what happens so I don't forget + //request their minecraft profile, all so we can get a base64 encoded string that contains ANOTHER json that then has the skin URL + String PROFILE_REQUEST_URL = "https://sessionserver.mojang.com/session/minecraft/profile/%s"; + + JsonObject object = HttpUtils.get(String.format(PROFILE_REQUEST_URL, uuid),JsonObject.class); + //Get the properties array which has what we need + JsonArray array = object.getAsJsonArray("properties"); + JsonObject property = array.get(0).getAsJsonObject(); + //value is what we grab but it's encoded so we have to decode it + String base64String = property.get("value").getAsString(); + byte[] bs = Base64.decodeBase64(base64String); + //Convert the response to json and pull the skin url from there + String secondResponse = new String(bs, StandardCharsets.UTF_8); + JsonObject finalResponseObject = GSON.fromJson(secondResponse, JsonObject.class); + JsonObject texturesObject = finalResponseObject.getAsJsonObject("textures"); + JsonObject skinObj = texturesObject.getAsJsonObject("SKIN"); + String skinURL = skinObj.get("url").getAsString(); + + InputStream in = new BufferedInputStream(new URL(skinURL).openStream()); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + byte[] buf = new byte[1024]; + int n = 0; + while (-1 != (n = in.read(buf))) { + out.write(buf, 0, n); + } + out.close(); + in.close(); + byte[] response = out.toByteArray(); + File file = new File(path); + FileOutputStream fos = new FileOutputStream(file.getPath()); + fos.write(response); + fos.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/cloudburst/rejects/commands/TpsCommand.java b/src/main/java/cloudburst/rejects/commands/TpsCommand.java new file mode 100644 index 0000000..c24891d --- /dev/null +++ b/src/main/java/cloudburst/rejects/commands/TpsCommand.java @@ -0,0 +1,36 @@ +package cloudburst.rejects.commands; + +import com.mojang.brigadier.builder.LiteralArgumentBuilder; +import minegame159.meteorclient.systems.commands.Command; +import minegame159.meteorclient.utils.player.ChatUtils; +import net.minecraft.command.CommandSource; +import minegame159.meteorclient.utils.world.TickRate; +import net.minecraft.util.Formatting; + +import static com.mojang.brigadier.Command.SINGLE_SUCCESS; + +public class TpsCommand extends Command { + public TpsCommand() { + super("tps", "Display current TPS"); + } + + @Override + public void build(LiteralArgumentBuilder builder) { + builder.executes(ctx -> { + float tps = TickRate.INSTANCE.getTickRate(); + Formatting color = Formatting.WHITE; + if (tps>17.0f) { + color = Formatting.GREEN; + } + else if (tps>12.0f) { + color = Formatting.YELLOW; + } + else { + color = Formatting.RED; + } + ChatUtils.prefixInfo("TPS", "Current TPS: %s%.2f", color, tps); + return SINGLE_SUCCESS; + }); + } +} + diff --git a/src/main/java/cloudburst/rejects/mixin/HorseBaseEntityAccessor.java b/src/main/java/cloudburst/rejects/mixin/HorseBaseEntityAccessor.java new file mode 100644 index 0000000..67a8f5c --- /dev/null +++ b/src/main/java/cloudburst/rejects/mixin/HorseBaseEntityAccessor.java @@ -0,0 +1,12 @@ +package cloudburst.rejects.mixin; + +import net.minecraft.entity.passive.HorseBaseEntity; +import net.minecraft.inventory.SimpleInventory; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.gen.Accessor; + +@Mixin(HorseBaseEntity.class) +public interface HorseBaseEntityAccessor { + @Accessor("items") + SimpleInventory getItems(); +} diff --git a/src/main/java/cloudburst/rejects/modules/AntiBot.java b/src/main/java/cloudburst/rejects/modules/AntiBot.java new file mode 100644 index 0000000..94e1720 --- /dev/null +++ b/src/main/java/cloudburst/rejects/modules/AntiBot.java @@ -0,0 +1,100 @@ +package cloudburst.rejects.modules; + +import cloudburst.rejects.MeteorRejectsAddon; +import meteordevelopment.orbit.EventHandler; +import minegame159.meteorclient.events.world.TickEvent; +import minegame159.meteorclient.settings.BoolSetting; +import minegame159.meteorclient.settings.Setting; +import minegame159.meteorclient.settings.SettingGroup; +import minegame159.meteorclient.systems.modules.Categories; +import minegame159.meteorclient.systems.modules.Module; +import minegame159.meteorclient.utils.entity.EntityUtils; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; + + +public class AntiBot extends Module { + + private final SettingGroup sgGeneral = settings.getDefaultGroup(); + private final SettingGroup sgFilters = settings.createGroup("Filters"); + + private final Setting removeInvisible = sgGeneral.add(new BoolSetting.Builder() + .name("remove-invisible") + .description("Removes bot only if they are invisible.") + .defaultValue(true) + .build() + ); + + private final Setting gameMode = sgFilters.add(new BoolSetting.Builder() + .name("null-gamemode") + .description("Removes players without a gamemode") + .defaultValue(true) + .build() + ); + + private final Setting api = sgFilters.add(new BoolSetting.Builder() + .name("null-entry") + .description("Removes players without a player entry") + .defaultValue(true) + .build() + ); + + private final Setting profile = sgFilters.add(new BoolSetting.Builder() + .name("null-profile") + .description("Removes players without a game profile") + .defaultValue(true) + .build() + ); + + private final Setting latency = sgFilters.add(new BoolSetting.Builder() + .name("ping-check") + .description("Removes players using ping check") + .defaultValue(false) + .build() + ); + + private final Setting nullException = sgFilters.add(new BoolSetting.Builder() + .name("null-exception") + .description("Removes players if a NullPointerException occurred") + .defaultValue(false) + .build() + ); + + public AntiBot() + { + super(MeteorRejectsAddon.CATEGORY, "anti-bot", "Detects and removes bots."); + } + + @EventHandler + public void onTick(TickEvent.Post tickEvent) + { + for (Entity entity : mc.world.getEntities()) + { + if (removeInvisible.get() && !entity.isInvisible()) continue; + + if (isBot(entity)) entity.remove(); + } + } + + private boolean isBot(Entity entity) + { + if (entity == null) return false; + if (!(entity instanceof PlayerEntity)) return false; + + PlayerEntity player = (PlayerEntity)entity; + try { + if (gameMode.get() && EntityUtils.getGameMode(player) == null) return true; + if (api.get() && + mc.getNetworkHandler().getPlayerListEntry(player.getUuid()) == null) return true; + if (profile.get() && + mc.getNetworkHandler().getPlayerListEntry(player.getUuid()).getProfile() == null) return true; + if (latency.get() && + mc.getNetworkHandler().getPlayerListEntry(player.getUuid()).getLatency() > 1) return true; + } catch (NullPointerException e) { + if (nullException.get()) return true; + } + + + return false; + } +} diff --git a/src/main/java/cloudburst/rejects/modules/AntiSpawnpoint.java b/src/main/java/cloudburst/rejects/modules/AntiSpawnpoint.java new file mode 100644 index 0000000..de50d4c --- /dev/null +++ b/src/main/java/cloudburst/rejects/modules/AntiSpawnpoint.java @@ -0,0 +1,60 @@ +package cloudburst.rejects.modules; + +import cloudburst.rejects.MeteorRejectsAddon; +import meteordevelopment.orbit.EventHandler; +import minegame159.meteorclient.events.packets.PacketEvent; +import minegame159.meteorclient.settings.BoolSetting; +import minegame159.meteorclient.settings.Setting; +import minegame159.meteorclient.settings.SettingGroup; +import minegame159.meteorclient.systems.modules.Categories; +import minegame159.meteorclient.systems.modules.Module; +import net.minecraft.block.BedBlock; +import net.minecraft.block.Blocks; +import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; + +public class AntiSpawnpoint extends Module { + + private SettingGroup sgDefault = settings.getDefaultGroup(); + + private Setting fakeUse = sgDefault.add(new BoolSetting.Builder() + .name("fake-use") + .description("Fake using the bed or anchor.") + .defaultValue(true) + .build() + ); + + public AntiSpawnpoint() { + super(MeteorRejectsAddon.CATEGORY, "anti-spawnpoint", "Protects the player from losing the respawn point."); + } + + @EventHandler + private void onSendPacket(PacketEvent.Send event) { + if (mc.world == null) return; + if(!(event.packet instanceof PlayerInteractBlockC2SPacket)) return; + + + BlockPos blockPos = ((PlayerInteractBlockC2SPacket) event.packet).getBlockHitResult().getBlockPos(); + boolean IsOverWorld = mc.world.getDimension().isBedWorking(); + boolean IsNetherWorld = mc.world.getDimension().isRespawnAnchorWorking(); + boolean BlockIsBed = mc.world.getBlockState(blockPos).getBlock() instanceof BedBlock; + boolean BlockIsAnchor = mc.world.getBlockState(blockPos).getBlock().equals(Blocks.RESPAWN_ANCHOR); + + if (fakeUse.get()) { + if (BlockIsBed && IsOverWorld) { + mc.player.swingHand(Hand.MAIN_HAND); + mc.player.updatePosition(blockPos.getX(),blockPos.up().getY(),blockPos.getZ()); + } + else if (BlockIsAnchor && IsNetherWorld) { + mc.player.swingHand(Hand.MAIN_HAND); + } + } + + // + + if((BlockIsBed && IsOverWorld)||(BlockIsAnchor && IsNetherWorld)) { + event.cancel(); + } + } +} diff --git a/src/main/java/cloudburst/rejects/modules/AntiVanish.java b/src/main/java/cloudburst/rejects/modules/AntiVanish.java new file mode 100644 index 0000000..0e9ea4f --- /dev/null +++ b/src/main/java/cloudburst/rejects/modules/AntiVanish.java @@ -0,0 +1,140 @@ +package cloudburst.rejects.modules; + +import cloudburst.rejects.MeteorRejectsAddon; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import meteordevelopment.orbit.EventHandler; +import minegame159.meteorclient.events.game.GameLeftEvent; +import minegame159.meteorclient.events.packets.PacketEvent; +import minegame159.meteorclient.events.world.TickEvent; +import minegame159.meteorclient.systems.modules.Categories; +import minegame159.meteorclient.systems.modules.Module; +import minegame159.meteorclient.utils.entity.EntityUtils; +import minegame159.meteorclient.utils.player.ChatUtils; +import net.minecraft.client.MinecraftClient; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.network.packet.s2c.play.PlayerListS2CPacket; +import org.apache.commons.io.IOUtils; + +import java.net.URL; +import java.nio.charset.StandardCharsets; +import java.util.Objects; +import java.util.Queue; +import java.util.UUID; +import java.util.concurrent.ConcurrentLinkedQueue; + +public class AntiVanish extends Module { + private final Queue toLookup = new ConcurrentLinkedQueue(); + private long lastTick = 0; + + @Override + public void onDeactivate() { + toLookup.clear(); + } + @EventHandler + public void onLeave(GameLeftEvent event) { + toLookup.clear(); + } + + @EventHandler + public void onPacket(PacketEvent.Receive event) { + if (event.packet instanceof PlayerListS2CPacket) { + PlayerListS2CPacket packet = (PlayerListS2CPacket) event.packet; + if (packet.getAction() == PlayerListS2CPacket.Action.UPDATE_LATENCY) { + try { + for (PlayerListS2CPacket.Entry entry : packet.getEntries()) { + if (mc.getNetworkHandler().getPlayerListEntry(entry.getProfile().getId()) != null) + continue; + toLookup.add(entry.getProfile().getId()); + } + } catch (Exception ignore) {} + } + } + } + + @EventHandler + public void onTick(TickEvent.Post event) { + long time = mc.world.getTime(); + UUID lookup; + + if (Math.abs(lastTick - time) > 100 && (lookup = toLookup.poll()) != null) { + try { + String name = getPlayerNameFromUUID(lookup); + if (name != null) { + ChatUtils.moduleWarning(this, name + " has gone into vanish."); + } + } catch (Exception ignore) {} + lastTick = time; + } + } + + public String getPlayerNameFromUUID(UUID id) { + try { + final NameLookup process = new NameLookup(id, mc); + final Thread thread = new Thread(process); + thread.start(); + thread.join(); + return process.getName(); + } catch (Exception ignored) { + return null; + } + } + + public AntiVanish() { + super(MeteorRejectsAddon.CATEGORY, "anti-vanish", "Notifies user when a admin uses /vanish"); + } + + public static class NameLookup implements Runnable { + private final String uuidstr; + private final UUID uuid; + private final MinecraftClient mc; + private volatile String name; + + public NameLookup(final String input, MinecraftClient mc) { + this.uuidstr = input; + this.uuid = UUID.fromString(input); + this.mc = mc; + } + + public NameLookup(final UUID input, MinecraftClient mc) { + this.uuid = input; + this.uuidstr = input.toString(); + this.mc = mc; + } + + @Override + public void run() { + this.name = this.lookUpName(); + } + + public String lookUpName() { + PlayerEntity player = null; + if (mc.world != null) { + player = mc.world.getPlayerByUuid(uuid); + } + if (player == null) { + final String url = "https://api.mojang.com/user/profiles/" + this.uuidstr.replace("-", "") + "/names"; + try { + final JsonParser parser = new JsonParser(); + final String nameJson = IOUtils.toString(new URL(url), StandardCharsets.UTF_8); + final JsonElement nameElement = parser.parse(nameJson); + final JsonArray nameArray = nameElement.getAsJsonArray(); + final String playerSlot = nameArray.get(nameArray.size() - 1).toString(); + final JsonObject nameObject = parser.parse(playerSlot).getAsJsonObject(); + return nameObject.get("name").toString(); + } catch (Exception e) { + return null; + } + } + return player.getName().asString(); + } + + public String getName() { + return this.name; + } + } +} + + diff --git a/src/main/java/cloudburst/rejects/modules/AutoExtinguish.java b/src/main/java/cloudburst/rejects/modules/AutoExtinguish.java new file mode 100644 index 0000000..fcf0d87 --- /dev/null +++ b/src/main/java/cloudburst/rejects/modules/AutoExtinguish.java @@ -0,0 +1,193 @@ +package cloudburst.rejects.modules; + +import cloudburst.rejects.MeteorRejectsAddon; +import meteordevelopment.orbit.EventHandler; +import minegame159.meteorclient.events.world.TickEvent; +import minegame159.meteorclient.settings.BoolSetting; +import minegame159.meteorclient.settings.IntSetting; +import minegame159.meteorclient.settings.Setting; +import minegame159.meteorclient.settings.SettingGroup; +import minegame159.meteorclient.systems.modules.Categories; +import minegame159.meteorclient.systems.modules.Module; +import minegame159.meteorclient.utils.player.ChatUtils; +import minegame159.meteorclient.utils.player.InvUtils; +import minegame159.meteorclient.utils.player.PlayerUtils; +import minegame159.meteorclient.utils.player.RotationUtils; +import minegame159.meteorclient.utils.world.BlockIterator; +import net.minecraft.block.Blocks; +import net.minecraft.entity.effect.StatusEffect; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket; +import net.minecraft.util.Hand; +import net.minecraft.util.Identifier; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.registry.Registry; + +import java.util.concurrent.atomic.AtomicInteger; + +public class AutoExtinguish extends Module { + private static final StatusEffect FIRE_RESISTANCE = Registry.STATUS_EFFECT.get(new Identifier("fire_resistance")); + + public AutoExtinguish() { + super(MeteorRejectsAddon.CATEGORY, "auto-extinguish", "Automatically extinguishes fire around you"); + } + + private final SettingGroup sgGeneral = settings.createGroup("Extinguish Fire around you"); + private final SettingGroup sgBucket = settings.createGroup("Extinguish yourself"); + + private final Setting extinguish = sgGeneral.add(new BoolSetting.Builder() + .name("extinguish") + .description("Automatically extinguishes fire around you.") + .defaultValue(false) + .build() + ); + private final Setting horizontalRadius = sgGeneral.add(new IntSetting.Builder() + .name("horizontal-radius") + .description("Horizontal radius in which to search for fire.") + .defaultValue(4) + .min(0) + .sliderMax(6) + .build() + ); + + private final Setting verticalRadius = sgGeneral.add(new IntSetting.Builder() + .name("vertical-radius") + .description("Vertical radius in which to search for fire.") + .defaultValue(4) + .min(0) + .sliderMax(6) + .build() + ); + private final Setting maxBlockPerTick = sgGeneral.add(new IntSetting.Builder() + .name("block-per-tick") + .description("Maximum amount of Blocks to extinguish per tick.") + .defaultValue(5) + .min(1) + .sliderMax(50) + .build() + ); + private final Setting waterBucket = sgBucket.add(new BoolSetting.Builder() + .name("water") + .description("Automatically places water when you are on fire (and don't have fire resistance).") + .defaultValue(false) + .build() + ); + private final Setting center = sgBucket.add(new BoolSetting.Builder() + .name("center") + .description("Automatically centers you when placing water.") + .defaultValue(false) + .build() + ); + private final Setting onGround = sgBucket.add(new BoolSetting.Builder() + .name("on-ground") + .description("Only place when you are on ground.") + .defaultValue(false) + .build() + ); + + + private boolean hasPlacedWater = false; + private BlockPos blockPos = null; + private boolean doesWaterBucketWork = true; + + + @EventHandler + private void onTick(TickEvent.Pre event) { + if (mc.world.getDimension().isRespawnAnchorWorking()) { + if (doesWaterBucketWork) { + ChatUtils.warning("Water Buckets don't work in this dimension!"); + doesWaterBucketWork = false; + + } + } else { + if (!doesWaterBucketWork) { + ChatUtils.warning("Enabled Water Buckets!"); + doesWaterBucketWork = true; + } + } + if (onGround.get() && !mc.player.isOnGround()) { + return; + } + + if (waterBucket.get() && doesWaterBucketWork) { + if (hasPlacedWater) { + final int slot = findSlot(Items.BUCKET); + blockPos = mc.player.getBlockPos(); + place(slot); + hasPlacedWater = false; + + } else if (!mc.player.hasStatusEffect(FIRE_RESISTANCE) && mc.player.isOnFire()) { + blockPos = mc.player.getBlockPos(); + final int slot = findSlot(Items.WATER_BUCKET); + if (mc.world.getBlockState(blockPos).getBlock() == Blocks.FIRE || mc.world.getBlockState(blockPos).getBlock() == Blocks.SOUL_FIRE) { + float yaw = mc.gameRenderer.getCamera().getYaw() % 360; + float pitch = mc.gameRenderer.getCamera().getPitch() % 360; + if (center.get()) { + PlayerUtils.centerPlayer(); + } + RotationUtils.packetRotate(yaw, 90); + mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, blockPos, Direction.UP)); + mc.player.swingHand(Hand.MAIN_HAND); + mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, blockPos, Direction.UP)); + + RotationUtils.packetRotate(yaw, pitch); + } + place(slot); + hasPlacedWater = true; + } + } + + if (extinguish.get()) { + AtomicInteger blocksPerTick = new AtomicInteger(); + BlockIterator.register(horizontalRadius.get(), verticalRadius.get(), (blockPos, blockState) -> { + if (blocksPerTick.get() <= maxBlockPerTick.get()) { + if (blockState.getBlock() == Blocks.FIRE || mc.world.getBlockState(blockPos).getBlock() == Blocks.SOUL_FIRE) { + extinguishFire(blockPos); + blocksPerTick.getAndIncrement(); + } + } + }); + } + } + + private void place(int slot) { + if (slot != -1) { + final int preSlot = mc.player.inventory.selectedSlot; + if (center.get()) { + PlayerUtils.centerPlayer(); + } + mc.player.inventory.selectedSlot = slot; + float yaw = mc.gameRenderer.getCamera().getYaw() % 360; + float pitch = mc.gameRenderer.getCamera().getPitch() % 360; + + RotationUtils.packetRotate(yaw, 90); + mc.interactionManager.interactItem(mc.player, mc.player.world, Hand.MAIN_HAND); + mc.player.inventory.selectedSlot = preSlot; + RotationUtils.packetRotate(yaw, pitch); + + } + } + + private void extinguishFire(BlockPos blockPos) { + mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.START_DESTROY_BLOCK, blockPos, net.minecraft.util.math.Direction.UP)); + mc.player.swingHand(Hand.MAIN_HAND); + mc.getNetworkHandler().sendPacket(new PlayerActionC2SPacket(PlayerActionC2SPacket.Action.STOP_DESTROY_BLOCK, blockPos, net.minecraft.util.math.Direction.UP)); + } + + private int findSlot(Item item) { + int slot = -1; + for (int i = 0; i < 9; i++) { + ItemStack block = mc.player.inventory.getStack(i); + if (block.getItem() == item) { + slot = i; + break; + } + } + + return slot; + } + +} \ No newline at end of file diff --git a/src/main/java/cloudburst/rejects/modules/AutoHighway.java b/src/main/java/cloudburst/rejects/modules/AutoHighway.java new file mode 100644 index 0000000..c18a42c --- /dev/null +++ b/src/main/java/cloudburst/rejects/modules/AutoHighway.java @@ -0,0 +1,655 @@ +package cloudburst.rejects.modules; + +import cloudburst.rejects.MeteorRejectsAddon; +import meteordevelopment.orbit.EventHandler; +import minegame159.meteorclient.events.world.TickEvent; +import minegame159.meteorclient.systems.modules.Categories; +import minegame159.meteorclient.systems.modules.Module; +import minegame159.meteorclient.settings.BoolSetting; +import minegame159.meteorclient.settings.IntSetting; +import minegame159.meteorclient.settings.Setting; +import minegame159.meteorclient.settings.SettingGroup; +import minegame159.meteorclient.utils.player.InvUtils; +import minegame159.meteorclient.utils.world.BlockUtils; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.item.Items; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; + +public class AutoHighway extends Module { + private final SettingGroup sgGeneral = settings.getDefaultGroup(); + + private final Setting disableOnJump = sgGeneral.add(new BoolSetting.Builder() + .name("disable-on-jump") + .description("Automatically disables when you jump.") + .defaultValue(true) + .build() + ); + + private final Setting size = sgGeneral.add(new IntSetting.Builder() + .name("highway-size") + .description("The size of highway.") + .defaultValue(3) + .min(3) + .sliderMin(3) + .max(7) + .sliderMax(7) + .build() + ); + + private final Setting rotate = sgGeneral.add(new BoolSetting.Builder() + .name("rotate") + .description("Automatically faces towards the obsidian being placed.") + .defaultValue(true) + .build() + ); + + private enum Direction { + SOUTH, + SOUTH_WEST, + WEST, + WEST_NORTH, + NORTH, + NORTH_EAST, + EAST, + EAST_SOUTH + } + private Direction direction; + private final BlockPos.Mutable blockPos = new BlockPos.Mutable(); + private boolean return_; + private int highwaySize; + + + + + + public AutoHighway() { + super(MeteorRejectsAddon.CATEGORY, "auto-highway", "Automatically build highway."); + } + + @Override + public void onActivate() { + direction = getDirection(mc.player); + blockPos.set(mc.player.getBlockPos()); + changeBlockPos(0,-1,0); + } + + @EventHandler + private void onTick(TickEvent.Pre event) { + if (disableOnJump.get() && mc.options.keyJump.isPressed()) { + toggle(); + return; + } + // Check Obsidian + if(InvUtils.findItemInHotbar(Items.OBSIDIAN) == -1) return; + // Get Size + highwaySize = getSize(); + // Place + return_ = false; + // Distance Check + if(getDistance(mc.player) > 12) return; + // Placing + if(direction == Direction.SOUTH){ + if(highwaySize == 3) { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, 0); + if (return_) return; + boolean p3 = place(-1, 0, 0); + if (return_) return; + boolean p4 = place(-2, 1, 0); + if (return_) return; + boolean p5 = place(2, 1, 0); + if(p1&&p2&&p3&&p4&&p5) nextLayer(); + }else if(highwaySize == 5){ + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, 0); + if (return_) return; + boolean p3 = place(-1, 0, 0); + if (return_) return; + boolean p4 = place(-2, 0, 0); + if (return_) return; + boolean p5 = place(2, 0, 0); + if (return_) return; + boolean p6 = place(-3, 1, 0); + if (return_) return; + boolean p7 = place(3, 1, 0); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7) nextLayer(); + }else { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, 0); + if (return_) return; + boolean p3 = place(-1, 0, 0); + if (return_) return; + boolean p4 = place(-2, 0, 0); + if (return_) return; + boolean p5 = place(2, 0, 0); + if (return_) return; + boolean p6 = place(-3, 0, 0); + if (return_) return; + boolean p7 = place(3, 0, 0); + if (return_) return; + boolean p8 = place(-4, 1, 0); + if (return_) return; + boolean p9 = place(4, 1, 0); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9) nextLayer(); + } + }else if(direction == Direction.WEST){ + if(highwaySize == 3) { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(0, 0, 1); + if (return_) return; + boolean p3 = place(0, 0, -1); + if (return_) return; + boolean p4 = place(0, 1, -2); + if (return_) return; + boolean p5 = place(0, 1, 2); + if(p1&&p2&&p3&&p4&&p5) nextLayer(); + }else if(highwaySize == 5){ + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(0, 0, 1); + if (return_) return; + boolean p3 = place(0, 0, -1); + if (return_) return; + boolean p4 = place(0, 0, -2); + if (return_) return; + boolean p5 = place(0, 0, 2); + if (return_) return; + boolean p6 = place(0, 1, -3); + if (return_) return; + boolean p7 = place(0, 1, 3); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7) nextLayer(); + }else { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(0, 0, 1); + if (return_) return; + boolean p3 = place(0, 0, -1); + if (return_) return; + boolean p4 = place(0, 0, -2); + if (return_) return; + boolean p5 = place(0, 0, 2); + if (return_) return; + boolean p6 = place(0, 0, -3); + if (return_) return; + boolean p7 = place(0, 0, 3); + if (return_) return; + boolean p8 = place(0, 1, -4); + if (return_) return; + boolean p9 = place(0, 1, 4); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9) nextLayer(); + } + }else if(direction == Direction.NORTH){ + if(highwaySize == 3) { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, 0); + if (return_) return; + boolean p3 = place(-1, 0, 0); + if (return_) return; + boolean p4 = place(-2, 1, 0); + if (return_) return; + boolean p5 = place(2, 1, 0); + if(p1&&p2&&p3&&p4&&p5) nextLayer(); + }else if(highwaySize == 5){ + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, 0); + if (return_) return; + boolean p3 = place(-1, 0, 0); + if (return_) return; + boolean p4 = place(-2, 0, 0); + if (return_) return; + boolean p5 = place(2, 0, 0); + if (return_) return; + boolean p6 = place(-3, 1, 0); + if (return_) return; + boolean p7 = place(3, 1, 0); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7) nextLayer(); + }else { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, 0); + if (return_) return; + boolean p3 = place(-1, 0, 0); + if (return_) return; + boolean p4 = place(-2, 0, 0); + if (return_) return; + boolean p5 = place(2, 0, 0); + if (return_) return; + boolean p6 = place(-3, 0, 0); + if (return_) return; + boolean p7 = place(3, 0, 0); + if (return_) return; + boolean p8 = place(-4, 1, 0); + if (return_) return; + boolean p9 = place(4, 1, 0); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9) nextLayer(); + } + }else if(direction == Direction.EAST){ + if(highwaySize == 3) { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(0, 0, 1); + if (return_) return; + boolean p3 = place(0, 0, -1); + if (return_) return; + boolean p4 = place(0, 1, -2); + if (return_) return; + boolean p5 = place(0, 1, 2); + if(p1&&p2&&p3&&p4&&p5) nextLayer(); + }else if(highwaySize == 5){ + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(0, 0, 1); + if (return_) return; + boolean p3 = place(0, 0, -1); + if (return_) return; + boolean p4 = place(0, 0, -2); + if (return_) return; + boolean p5 = place(0, 0, 2); + if (return_) return; + boolean p6 = place(0, 1, -3); + if (return_) return; + boolean p7 = place(0, 1, 3); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7) nextLayer(); + }else { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(0, 0, 1); + if (return_) return; + boolean p3 = place(0, 0, -1); + if (return_) return; + boolean p4 = place(0, 0, -2); + if (return_) return; + boolean p5 = place(0, 0, 2); + if (return_) return; + boolean p6 = place(0, 0, -3); + if (return_) return; + boolean p7 = place(0, 0, 3); + if (return_) return; + boolean p8 = place(0, 1, -4); + if (return_) return; + boolean p9 = place(0, 1, 4); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9) nextLayer(); + } + }else if(direction == Direction.EAST_SOUTH){ + if(highwaySize == 3) { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, -1); + if (return_) return; + boolean p3 = place(-1, 0, 1); + if (return_) return; + boolean p4 = place(1, 1, -2); + if (return_) return; + boolean p5 = place(-2, 1, 1); + if (return_) return; + boolean p6 = place(1, 0, 0); + if (return_) return; + boolean p7 = place(0, 0, 1); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7) nextLayer(); + }else if(highwaySize == 5){ + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, -1); + if (return_) return; + boolean p3 = place(-1, 0, 1); + if (return_) return; + boolean p4 = place(2, 0, -2); + if (return_) return; + boolean p5 = place(-2, 0, 2); + if (return_) return; + boolean p6 = place(2, 1, -3); + if (return_) return; + boolean p7 = place(-3, 1, 2); + if (return_) return; + boolean p8 = place(1, 0, 0); + if (return_) return; + boolean p9 = place(0, 0, 1); + if (return_) return; + boolean p10 = place(2, 0, -1); + if (return_) return; + boolean p11 = place(-1, 0, 2); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9&&p10&&p11) nextLayer(); + }else { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, -1); + if (return_) return; + boolean p3 = place(-1, 0, 1); + if (return_) return; + boolean p4 = place(2, 0, -2); + if (return_) return; + boolean p5 = place(-2, 0, 2); + if (return_) return; + boolean p6 = place(3, 0, -3); + if (return_) return; + boolean p7 = place(-3, 0, 3); + if (return_) return; + boolean p8 = place(3, 1, -4); + if (return_) return; + boolean p9 = place(-4, 1, 3); + if (return_) return; + boolean p10 = place(1, 0, 0); + if (return_) return; + boolean p11 = place(0, 0, 1); + if (return_) return; + boolean p12 = place(2, 0, -1); + if (return_) return; + boolean p13 = place(-1, 0, 2); + if (return_) return; + boolean p14 = place(3, 0, -2); + if (return_) return; + boolean p15 = place(-2, 0, 3); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9&&p10&&p11&&p12&&p13&&p14&&p15) nextLayer(); + } + }else if(direction == Direction.SOUTH_WEST){ + if(highwaySize == 3) { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(-1, 0, -1); + if (return_) return; + boolean p3 = place(1, 0, 1); + if (return_) return; + boolean p4 = place(-1, 1, -2); + if (return_) return; + boolean p5 = place(2, 1, 1); + if (return_) return; + boolean p6 = place(-1, 0, 0); + if (return_) return; + boolean p7 = place(0, 0, 1); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7) nextLayer(); + }else if(highwaySize == 5){ + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(-1, 0, -1); + if (return_) return; + boolean p3 = place(1, 0, 1); + if (return_) return; + boolean p4 = place(-2, 0, -2); + if (return_) return; + boolean p5 = place(2, 0, 2); + if (return_) return; + boolean p6 = place(-2, 1, -3); + if (return_) return; + boolean p7 = place(3, 1, 2); + if (return_) return; + boolean p8 = place(-1, 0, 0); + if (return_) return; + boolean p9 = place(0, 0, 1); + if (return_) return; + boolean p10 = place(-2, 0, -1); + if (return_) return; + boolean p11 = place(1, 0, 2); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9&&p10&&p11) nextLayer(); + }else { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(-1, 0, -1); + if (return_) return; + boolean p3 = place(1, 0, 1); + if (return_) return; + boolean p4 = place(-2, 0, -2); + if (return_) return; + boolean p5 = place(2, 0, 2); + if (return_) return; + boolean p6 = place(-3, 0, -3); + if (return_) return; + boolean p7 = place(3, 0, 3); + if (return_) return; + boolean p8 = place(-3, 1, -4); + if (return_) return; + boolean p9 = place(4, 1, 3); + if (return_) return; + boolean p10 = place(-1, 0, 0); + if (return_) return; + boolean p11 = place(0, 0, 1); + if (return_) return; + boolean p12 = place(-2, 0, -1); + if (return_) return; + boolean p13 = place(1, 0, 2); + if (return_) return; + boolean p14 = place(-3, 0, -2); + if (return_) return; + boolean p15 = place(2, 0, 3); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9&&p10&&p11&&p12&&p13&&p14&&p15) nextLayer(); + } + }else if(direction == Direction.WEST_NORTH){ + if(highwaySize == 3) { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(-1, 0, 1); + if (return_) return; + boolean p3 = place(1, 0, -1); + if (return_) return; + boolean p4 = place(-1, 1, 2); + if (return_) return; + boolean p5 = place(2, 1, -1); + if (return_) return; + boolean p6 = place(-1, 0, 0); + if (return_) return; + boolean p7 = place(0, 0, -1); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7) nextLayer(); + }else if(highwaySize == 5){ + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(-1, 0, 1); + if (return_) return; + boolean p3 = place(1, 0, -1); + if (return_) return; + boolean p4 = place(-2, 0, 2); + if (return_) return; + boolean p5 = place(2, 0, -2); + if (return_) return; + boolean p6 = place(-2, 1, 3); + if (return_) return; + boolean p7 = place(3, 1, -2); + if (return_) return; + boolean p8 = place(-1, 0, 0); + if (return_) return; + boolean p9 = place(0, 0, -1); + if (return_) return; + boolean p10 = place(-2, 0, 1); + if (return_) return; + boolean p11 = place(1, 0, -2); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9&&p10&&p11) nextLayer(); + }else { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(-1, 0, 1); + if (return_) return; + boolean p3 = place(1, 0, -1); + if (return_) return; + boolean p4 = place(-2, 0, 2); + if (return_) return; + boolean p5 = place(2, 0, -2); + if (return_) return; + boolean p6 = place(-3, 0, 3); + if (return_) return; + boolean p7 = place(3, 0, -3); + if (return_) return; + boolean p8 = place(-3, 1, 4); + if (return_) return; + boolean p9 = place(4, 1, -3); + if (return_) return; + boolean p10 = place(-1, 0, 0); + if (return_) return; + boolean p11 = place(0, 0, -1); + if (return_) return; + boolean p12 = place(-2, 0, 1); + if (return_) return; + boolean p13 = place(1, 0, -2); + if (return_) return; + boolean p14 = place(-3, 0, 2); + if (return_) return; + boolean p15 = place(2, 0, -3); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9&&p10&&p11&&p12&&p13&&p14&&p15) nextLayer(); + } + }else if(direction == Direction.NORTH_EAST){ + if(highwaySize == 3) { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, 1); + if (return_) return; + boolean p3 = place(-1, 0, -1); + if (return_) return; + boolean p4 = place(1, 1, 2); + if (return_) return; + boolean p5 = place(-2, 1, -1); + if (return_) return; + boolean p6 = place(1, 0, 0); + if (return_) return; + boolean p7 = place(0, 0, -1); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7) nextLayer(); + }else if(highwaySize == 5){ + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, 1); + if (return_) return; + boolean p3 = place(-1, 0, -1); + if (return_) return; + boolean p4 = place(2, 0, 2); + if (return_) return; + boolean p5 = place(-2, 0, -2); + if (return_) return; + boolean p6 = place(2, 1, 3); + if (return_) return; + boolean p7 = place(-3, 1, -2); + if (return_) return; + boolean p8 = place(1, 0, 0); + if (return_) return; + boolean p9 = place(0, 0, -1); + if (return_) return; + boolean p10 = place(2, 0, 1); + if (return_) return; + boolean p11 = place(-1, 0, -2); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9&&p10&&p11) nextLayer(); + }else { + boolean p1 = place(0, 0, 0); + if (return_) return; + boolean p2 = place(1, 0, 1); + if (return_) return; + boolean p3 = place(-1, 0, -1); + if (return_) return; + boolean p4 = place(2, 0, 2); + if (return_) return; + boolean p5 = place(-2, 0, -2); + if (return_) return; + boolean p6 = place(3, 0, 3); + if (return_) return; + boolean p7 = place(-3, 0, -3); + if (return_) return; + boolean p8 = place(3, 1, 4); + if (return_) return; + boolean p9 = place(-4, 1, -3); + if (return_) return; + boolean p10 = place(1, 0, 0); + if (return_) return; + boolean p11 = place(0, 0, -1); + if (return_) return; + boolean p12 = place(2, 0, 1); + if (return_) return; + boolean p13 = place(-1, 0, -2); + if (return_) return; + boolean p14 = place(3, 0, 2); + if (return_) return; + boolean p15 = place(-2, 0, -3); + if(p1&&p2&&p3&&p4&&p5&&p6&&p7&&p8&&p9&&p10&&p11&&p12&&p13&&p14&&p15) nextLayer(); + } + } + } + + private int getDistance(PlayerEntity player){ + return (int) Math.round(player.squaredDistanceTo(blockPos.getX(), blockPos.getY()-player.getStandingEyeHeight(), blockPos.getZ())); + } + + private boolean place(int x, int y, int z) { + BlockPos placePos = setBlockPos(x, y, z); + BlockState blockState = mc.world.getBlockState(placePos); + + if (!blockState.getMaterial().isReplaceable()) return true; + + int slot = findSlot(); + if (BlockUtils.place(placePos, Hand.MAIN_HAND, slot, rotate.get(), 10, true)) { + return_ = true; + } + + return false; + } + + private int getSize(){ + if (size.get() % 2 == 0) return size.get()-1; + else return size.get(); + } + + private void nextLayer(){ + if(direction == Direction.SOUTH) changeBlockPos(0,0,1); + else if(direction == Direction.WEST) changeBlockPos(-1,0,0); + else if(direction == Direction.NORTH) changeBlockPos(0,0,-1); + else if(direction == Direction.EAST) changeBlockPos(1,0,0); + else if(direction == Direction.EAST_SOUTH) changeBlockPos(1,0,1); + else if(direction == Direction.SOUTH_WEST) changeBlockPos(-1,0,1); + else if(direction == Direction.WEST_NORTH) changeBlockPos(-1,0,-1); + else if(direction == Direction.NORTH_EAST) changeBlockPos(1,0,-1); + } + + private void changeBlockPos(int x, int y, int z) { + blockPos.set(blockPos.getX() + x, blockPos.getY() + y, blockPos.getZ() + z); + } + private BlockPos setBlockPos(int x, int y, int z) { + return new BlockPos(blockPos.getX() + x, blockPos.getY() + y, blockPos.getZ() + z); + } + + private Direction getDirection(PlayerEntity player){ + double yaw = player.yaw; + if(yaw==0) return Direction.SOUTH; + if(yaw<0){ + yaw = yaw - MathHelper.ceil(yaw / 360) * 360; + if(yaw<-180) { + yaw = 360 + yaw; + } + }else{ + yaw = yaw - MathHelper.floor(yaw / 360)*360; + if(yaw>180) { + yaw = -360 + yaw; + } + } + + if(yaw >= 157.5 || yaw < -157.5) return Direction.NORTH; + if(yaw >= -157.5 && yaw < -112.5) return Direction.NORTH_EAST; + if(yaw >= -112.5 && yaw < -67.5) return Direction.EAST; + if(yaw >= -67.5 && yaw < -22.5) return Direction.EAST_SOUTH; + if((yaw >= -22.5 && yaw <=0) || (yaw > 0 && yaw < 22.5)) return Direction.SOUTH; + if(yaw >= 22.5 && yaw < 67.5) return Direction.SOUTH_WEST; + if(yaw >= 67.5 && yaw < 112.5) return Direction.WEST; + if(yaw >= 112.5 && yaw < 157.5) return Direction.WEST_NORTH; + return Direction.SOUTH; + } + + + private int findSlot() { + for (int i = 0; i < 9; i++) { + Item item = mc.player.inventory.getStack(i).getItem(); + + if (!(item instanceof BlockItem)) continue; + + if (item == Items.OBSIDIAN) { + return i; + } + } + + return -1; + } + + + +} \ No newline at end of file diff --git a/src/main/java/cloudburst/rejects/modules/AutoPot.java b/src/main/java/cloudburst/rejects/modules/AutoPot.java index 01a8f1a..6763fb5 100644 --- a/src/main/java/cloudburst/rejects/modules/AutoPot.java +++ b/src/main/java/cloudburst/rejects/modules/AutoPot.java @@ -1,6 +1,7 @@ package cloudburst.rejects.modules; import baritone.api.BaritoneAPI; +import cloudburst.rejects.MeteorRejectsAddon; import meteordevelopment.orbit.EventHandler; import minegame159.meteorclient.events.entity.player.ItemUseCrosshairTargetEvent; import minegame159.meteorclient.events.world.TickEvent; @@ -84,7 +85,7 @@ public class AutoPot extends Module { private final List> wasAura = new ArrayList<>(); private boolean wasBaritone; public AutoPot() { - super(Categories.Player, "auto-pot", "Automatically Drinks Potions"); + super(MeteorRejectsAddon.CATEGORY, "auto-pot", "Automatically Drinks Potions"); } //Gilded's first module, lets see how much i'll die making this //TODO:Rework everything to accept all pots diff --git a/src/main/java/cloudburst/rejects/modules/Confuse.java b/src/main/java/cloudburst/rejects/modules/Confuse.java index fdbf40e..6c0d0e5 100644 --- a/src/main/java/cloudburst/rejects/modules/Confuse.java +++ b/src/main/java/cloudburst/rejects/modules/Confuse.java @@ -2,6 +2,7 @@ package cloudburst.rejects.modules; import java.util.Random; +import cloudburst.rejects.MeteorRejectsAddon; import net.minecraft.block.Blocks; import net.minecraft.entity.Entity; import net.minecraft.util.hit.BlockHitResult; @@ -37,7 +38,7 @@ public class Confuse extends Module { } public Confuse() { - super(Categories.Misc, "confuse", "Makes your enemies shit themselves"); + super(MeteorRejectsAddon.CATEGORY, "confuse", "Makes your enemies shit themselves"); } private final SettingGroup sgGeneral = settings.getDefaultGroup(); diff --git a/src/main/java/cloudburst/rejects/modules/Glide.java b/src/main/java/cloudburst/rejects/modules/Glide.java index 8736293..a5b1163 100644 --- a/src/main/java/cloudburst/rejects/modules/Glide.java +++ b/src/main/java/cloudburst/rejects/modules/Glide.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.stream.Stream; import java.util.stream.StreamSupport; +import cloudburst.rejects.MeteorRejectsAddon; import net.minecraft.block.BlockState; import net.minecraft.block.Material; import net.minecraft.util.math.BlockPos; @@ -23,7 +24,7 @@ public class Glide extends Module { private final SettingGroup sgGeneral = settings.getDefaultGroup(); public Glide() { - super(Categories.Movement, "glide", "Makes you glide down slowly when falling."); + super(MeteorRejectsAddon.CATEGORY, "glide", "Makes you glide down slowly when falling."); } private final Setting fallSpeed = sgGeneral.add(new DoubleSetting.Builder() diff --git a/src/main/java/cloudburst/rejects/modules/InteractionMenu.java b/src/main/java/cloudburst/rejects/modules/InteractionMenu.java new file mode 100644 index 0000000..f16f7c6 --- /dev/null +++ b/src/main/java/cloudburst/rejects/modules/InteractionMenu.java @@ -0,0 +1,126 @@ +package cloudburst.rejects.modules; + +import cloudburst.rejects.MeteorRejectsAddon; +import cloudburst.rejects.screens.InteractionScreen; +import it.unimi.dsi.fastutil.objects.Object2BooleanMap; +import minegame159.meteorclient.MeteorClient; +import minegame159.meteorclient.gui.GuiTheme; +import minegame159.meteorclient.gui.widgets.WWidget; +import minegame159.meteorclient.gui.widgets.containers.WTable; +import minegame159.meteorclient.gui.widgets.input.WTextBox; +import minegame159.meteorclient.gui.widgets.pressable.WMinus; +import minegame159.meteorclient.gui.widgets.pressable.WPlus; +import minegame159.meteorclient.gui.widgets.WWidget; +import minegame159.meteorclient.settings.*; +import minegame159.meteorclient.systems.modules.Module; +import minegame159.meteorclient.utils.Utils; +import minegame159.meteorclient.utils.misc.Keybind; +import net.minecraft.client.render.debug.DebugRenderer; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityType; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.StringTag; + +import java.util.HashMap; +import java.util.Optional; + +public class InteractionMenu extends Module { + private final SettingGroup sgGeneral = settings.getDefaultGroup(); + public final HashMap messages = new HashMap<>(); + private String currMsgK = "", currMsgV = ""; + + private final Setting>> entities = sgGeneral.add(new EntityTypeListSetting.Builder() + .name("entities") + .description("Entities") + .defaultValue(Utils.asObject2BooleanOpenHashMap( + EntityType.PLAYER)) + .build() + ); + public final Setting keybind = sgGeneral.add(new KeybindSetting.Builder() + .name("keybind") + .description("The keybind to open.") + .action(this::onKey) + .build() + ); + + + public InteractionMenu() { + super(MeteorRejectsAddon.CATEGORY,"interaction-menu","An interaction screen when looking at an entity."); + } + + public void onKey() { + if (mc.currentScreen != null) return; + Optional lookingAt = DebugRenderer.getTargetedEntity(mc.player, 20); + if (lookingAt.isPresent()) { + Entity e = lookingAt.get(); + if (entities.get().getBoolean(e.getType())) { + //isOpen = true; + mc.openScreen(new InteractionScreen(e)); + } + } + } + + @Override + public WWidget getWidget(GuiTheme theme) { + WTable table = theme.table(); + fillTable(theme, table); + return table; + } + + private void fillTable(GuiTheme theme, WTable table) { + table.clear(); + messages.keySet().forEach((key) -> { + table.add(theme.label(key)).expandCellX(); + table.add(theme.label(messages.get(key))).expandCellX(); + WMinus delete = table.add(theme.minus()).widget(); + delete.action = () -> { + messages.remove(key); + fillTable(theme,table); + }; + table.row(); + }); + WTextBox textBoxK = table.add(theme.textBox(currMsgK)).minWidth(100).expandX().widget(); + textBoxK.action = () -> { + currMsgK = textBoxK.get(); + }; + WTextBox textBoxV = table.add(theme.textBox(currMsgV)).minWidth(100).expandX().widget(); + textBoxV.action = () -> { + currMsgV = textBoxV.get(); + }; + WPlus add = table.add(theme.plus()).widget(); + add.action = () -> { + if (currMsgK != "" && currMsgV != "") { + messages.put(currMsgK, currMsgV); + currMsgK = ""; currMsgV = ""; + fillTable(theme,table); + } + }; + table.row(); + } + + @Override + public CompoundTag toTag() { + CompoundTag tag = super.toTag(); + + CompoundTag messTag = new CompoundTag(); + messages.keySet().forEach((key) -> { + messTag.put(key, StringTag.of(messages.get(key))); + }); + + tag.put("messages", messTag); + return tag; + } + + @Override + public Module fromTag(CompoundTag tag) { + + if (tag.contains("messages")) { + CompoundTag msgs = tag.getCompound("messages"); + msgs.getKeys().forEach((key) -> { + messages.put(key, msgs.getString(key)); + }); + } + + return super.fromTag(tag); + } +} diff --git a/src/main/java/cloudburst/rejects/modules/Lavacast.java b/src/main/java/cloudburst/rejects/modules/Lavacast.java index 126fe84..54509f9 100644 --- a/src/main/java/cloudburst/rejects/modules/Lavacast.java +++ b/src/main/java/cloudburst/rejects/modules/Lavacast.java @@ -1,5 +1,6 @@ package cloudburst.rejects.modules; +import cloudburst.rejects.MeteorRejectsAddon; import meteordevelopment.orbit.EventHandler; import minegame159.meteorclient.events.render.RenderEvent; import minegame159.meteorclient.events.world.TickEvent; @@ -95,7 +96,7 @@ public class Lavacast extends Module { ); public Lavacast() { - super(Categories.World, "lavacast", "Automatically Lavacasts"); + super(MeteorRejectsAddon.CATEGORY, "lavacast", "Automatically Lavacasts"); } @Override diff --git a/src/main/java/cloudburst/rejects/modules/ObsidianFarm.java b/src/main/java/cloudburst/rejects/modules/ObsidianFarm.java new file mode 100644 index 0000000..539a7c3 --- /dev/null +++ b/src/main/java/cloudburst/rejects/modules/ObsidianFarm.java @@ -0,0 +1,122 @@ +package cloudburst.rejects.modules; + +import cloudburst.rejects.MeteorRejectsAddon; +import com.google.common.collect.Streams; +import meteordevelopment.orbit.EventHandler; +import minegame159.meteorclient.events.world.TickEvent; +import minegame159.meteorclient.systems.modules.Categories; +import minegame159.meteorclient.systems.modules.Module; +import minegame159.meteorclient.systems.modules.Modules; +import minegame159.meteorclient.systems.modules.player.AutoEat; +import net.minecraft.block.Blocks; +import net.minecraft.item.Items; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.Optional; + +public class ObsidianFarm extends Module { + + public ObsidianFarm() { + super(MeteorRejectsAddon.CATEGORY, "obsidian-farm", "Auto obsidian farm(portals)."); + } + + + private boolean allowBreakAgain; + + @Override + public void onActivate() { + allowBreakAgain = true; + } + + @EventHandler + private void onTick(TickEvent.Post event) { + if (mc.player == null) return; + if (mc.world == null) return; + if (mc.interactionManager == null) return; + if (mc.world.getDimension().isRespawnAnchorWorking()) { + allowBreakAgain = true; + return; + } + if (!allowBreakAgain) return; + if ((mc.player.isUsingItem() || Modules.get().get(AutoEat.class).isActive()) && (mc.player.getOffHandStack().getItem().isFood() || mc.player.getMainHandStack().getItem().isFood())) + return; + + if(mc.player.getMainHandStack().getItem() != Items.NETHERITE_PICKAXE && mc.player.getMainHandStack().getItem() != Items.DIAMOND_PICKAXE) { + int pickAxe = findPickAxe(); + if (pickAxe == -1) { + if (this.isActive()) { + this.toggle(); + return; + } + } + mc.player.inventory.selectedSlot = pickAxe; + } + + BlockPos obsidian = findObsidian(); + if (obsidian == null) return; + + mc.interactionManager.updateBlockBreakingProgress(obsidian, Direction.UP); + mc.player.swingHand(Hand.MAIN_HAND); + + if (mc.player.getBlockPos().down().equals(obsidian) && mc.world.getBlockState(obsidian).getBlock() != Blocks.OBSIDIAN) { + allowBreakAgain = false; + } + } + + + private BlockPos findObsidian() { + List blocksList = new ArrayList<>(); + + for (int x = -2; x < 3; x++) { + for (int z = -2; z < 3; z++) { + int y = 2; + BlockPos block = new BlockPos(mc.player.getBlockPos().getX() + x, mc.player.getBlockPos().getY() + y, mc.player.getBlockPos().getZ() + z); + blocksList.add(block); + } + } + + Optional result = Streams.stream(blocksList) + .parallel() + .filter(blockPos -> mc.world.getBlockState(blockPos).getBlock() == Blocks.OBSIDIAN) + .min(Comparator.comparingDouble(blockPos -> mc.player.squaredDistanceTo(blockPos.getX(), blockPos.getY(), blockPos.getZ()))); + if (result.isPresent()) return result.get(); + + blocksList.clear(); + for (int x = -2; x < 3; x++) { + for (int z = -2; z < 3; z++) { + for (int y = 3; y > -2; y--) { + BlockPos block = new BlockPos(mc.player.getBlockPos().getX() + x, mc.player.getBlockPos().getY() + y, mc.player.getBlockPos().getZ() + z); + blocksList.add(block); + } + } + } + + Optional result2 = Streams.stream(blocksList) + .parallel() + .filter(blockPos -> !mc.player.getBlockPos().down().equals(blockPos)) + .filter(blockPos -> mc.world.getBlockState(blockPos).getBlock() == Blocks.OBSIDIAN) + .min(Comparator.comparingDouble(blockPos -> mc.player.squaredDistanceTo(blockPos.getX(), blockPos.getY(), blockPos.getZ()))); + if (result2.isPresent()) return result2.get(); + + if (mc.world.getBlockState(mc.player.getBlockPos().down()).getBlock() == Blocks.OBSIDIAN) + return mc.player.getBlockPos().down(); + + return null; + } + + + private int findPickAxe() { + int result = -1; + for (int i = 0; i < 9; i++) { + if (mc.player.inventory.getStack(i).getItem() == Items.NETHERITE_PICKAXE) return i; + if (mc.player.inventory.getStack(i).getItem() == Items.DIAMOND_PICKAXE) result = i; + } + return result; + } + + +} diff --git a/src/main/java/cloudburst/rejects/modules/RenderInvisible.java b/src/main/java/cloudburst/rejects/modules/RenderInvisible.java index 402715a..3da50ce 100644 --- a/src/main/java/cloudburst/rejects/modules/RenderInvisible.java +++ b/src/main/java/cloudburst/rejects/modules/RenderInvisible.java @@ -1,5 +1,6 @@ package cloudburst.rejects.modules; +import cloudburst.rejects.MeteorRejectsAddon; import minegame159.meteorclient.settings.BoolSetting; import minegame159.meteorclient.settings.Setting; import minegame159.meteorclient.settings.SettingGroup; @@ -52,7 +53,7 @@ public class RenderInvisible extends Module { } public RenderInvisible() { - super(Categories.Render, "render-invisible", "Renders invisible entities and blocks."); + super(MeteorRejectsAddon.CATEGORY, "render-invisible", "Renders invisible entities and blocks."); } public boolean renderEntities() { diff --git a/src/main/java/cloudburst/rejects/modules/SoundLocator.java b/src/main/java/cloudburst/rejects/modules/SoundLocator.java index 86fbe3b..88c327a 100644 --- a/src/main/java/cloudburst/rejects/modules/SoundLocator.java +++ b/src/main/java/cloudburst/rejects/modules/SoundLocator.java @@ -1,5 +1,6 @@ package cloudburst.rejects.modules; +import cloudburst.rejects.MeteorRejectsAddon; import meteordevelopment.orbit.EventHandler; import minegame159.meteorclient.events.world.PlaySoundEvent; import minegame159.meteorclient.settings.Setting; @@ -30,7 +31,7 @@ public class SoundLocator extends Module { ); public SoundLocator() { - super(Categories.Misc, "sound-locator", "Prints locations of sound events."); + super(MeteorRejectsAddon.CATEGORY, "sound-locator", "Prints locations of sound events."); } @EventHandler diff --git a/src/main/java/cloudburst/rejects/modules/TPSSync.java b/src/main/java/cloudburst/rejects/modules/TPSSync.java new file mode 100644 index 0000000..cd1c9c1 --- /dev/null +++ b/src/main/java/cloudburst/rejects/modules/TPSSync.java @@ -0,0 +1,28 @@ +package cloudburst.rejects.modules; + +import cloudburst.rejects.MeteorRejectsAddon; +import meteordevelopment.orbit.EventHandler; +import minegame159.meteorclient.events.world.TickEvent; +import minegame159.meteorclient.systems.modules.Categories; +import minegame159.meteorclient.systems.modules.Module; +import minegame159.meteorclient.systems.modules.Modules; +import minegame159.meteorclient.systems.modules.world.Timer; +import minegame159.meteorclient.utils.world.TickRate; + +public class TPSSync extends Module { + public TPSSync() { + super(MeteorRejectsAddon.CATEGORY, "tps-sync", "Attemps to sync client tickrate with server's"); + } + + @Override + public void onDeactivate() { + Timer timer = Modules.get().get(Timer.class); + timer.setOverride(1); + } + + @EventHandler + private void onTick(TickEvent.Post event) { + Timer timer = Modules.get().get(Timer.class); + timer.setOverride(Math.max(TickRate.INSTANCE.getTickRate(), 1) / 20); // prevent client just dying alongside with server + } +} \ No newline at end of file diff --git a/src/main/java/cloudburst/rejects/screens/InteractionScreen.java b/src/main/java/cloudburst/rejects/screens/InteractionScreen.java new file mode 100644 index 0000000..4a70449 --- /dev/null +++ b/src/main/java/cloudburst/rejects/screens/InteractionScreen.java @@ -0,0 +1,336 @@ +package cloudburst.rejects.screens; + +import java.awt.Point; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.function.Consumer; +import java.util.function.Function; + +import cloudburst.rejects.modules.InteractionMenu; +import minegame159.meteorclient.MeteorClient; +import minegame159.meteorclient.systems.commands.commands.PeekCommand; +import minegame159.meteorclient.systems.modules.Modules; +import minegame159.meteorclient.utils.player.ChatUtils; +import minegame159.meteorclient.utils.player.InvUtils; +import net.minecraft.client.gui.screen.ChatScreen; +import net.minecraft.client.gui.screen.ingame.InventoryScreen; +import net.minecraft.client.options.KeyBinding; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.Saddleable; +import net.minecraft.entity.passive.HorseBaseEntity; +import net.minecraft.entity.passive.HorseEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.vehicle.ChestMinecartEntity; +import net.minecraft.entity.vehicle.StorageMinecartEntity; +import net.minecraft.inventory.Inventory; +import net.minecraft.inventory.SimpleInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.network.packet.c2s.play.PlayerInputC2SPacket; +import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket; +import net.minecraft.screen.ShulkerBoxScreenHandler; +import org.lwjgl.glfw.GLFW; + +import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.systems.RenderSystem; + +import net.minecraft.client.MinecraftClient; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.render.GameRenderer; +import net.minecraft.client.util.InputUtil; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.entity.Entity; +import net.minecraft.text.LiteralText; +import net.minecraft.util.Hand; +import net.minecraft.util.math.MathHelper; + +public class InteractionScreen extends Screen { + + private final Entity entity; + private String focusedString = null; + private int crosshairX, crosshairY, focusedDot = -1; + private float yaw, pitch; + private final HashMap> functions; + private final HashMap msgs; + + public InteractionScreen(Entity entity) { + super(new LiteralText("Menu Screen")); + this.entity = entity; + functions = new HashMap<>(); + functions.put("Stats", (Entity e) -> { + closeScreen(); + //Modules.get().get(InteractionMenu.class).isOpen = true; + client.openScreen(new StatsScreen(e)); + }); + if (entity instanceof PlayerEntity) { + functions.put("Open Inventory", (Entity e) -> { + closeScreen(); + client.openScreen(new InventoryScreen((PlayerEntity) e)); + }); + functions.put("Message", (Entity e) -> { + this.cursorMode(GLFW.GLFW_CURSOR); + closeScreen(); + client.openScreen(new ChatScreen(String.format("/msg %s ", ((PlayerEntity)e).getGameProfile().getName()))); + }); + } + else if (entity instanceof HorseBaseEntity) { + functions.put("Open Inventory", (Entity e) -> { + closeScreen(); + if (client.player.isRiding()) { + client.player.networkHandler.sendPacket(new PlayerInputC2SPacket(0, 0, false, true)); + } + client.player.networkHandler.sendPacket(new PlayerInteractEntityC2SPacket(entity, Hand.MAIN_HAND, false)); + client.player.openRidingInventory(); + client.player.networkHandler.sendPacket(new PlayerInputC2SPacket(0, 0, false, true)); + }); + functions.put("Ride", (Entity e) -> { + closeScreen(); + client.player.networkHandler.sendPacket(new PlayerInteractEntityC2SPacket(entity, Hand.MAIN_HAND, false)); + }); + } + else if (entity instanceof StorageMinecartEntity) { + functions.put("Open Inventory", (Entity e) -> { + closeScreen(); + client.player.networkHandler.sendPacket(new PlayerInteractEntityC2SPacket(entity, Hand.MAIN_HAND, false)); + }); + } + else { + functions.put("Open Inventory", (Entity e) -> { + ItemStack[] stack = new ItemStack[27]; + final int[] index = {0}; + e.getItemsHand().forEach(itemStack -> { + if (itemStack!=null) { + stack[index[0]] = itemStack; + index[0]++; + } + }); + e.getArmorItems().forEach(itemStack -> { + if (itemStack!=null) { + stack[index[0]] = itemStack; + index[0]++; + } + }); + for (int i = index[0]; i < 27; i++) stack[i] = Items.AIR.getDefaultStack(); + closeScreen(); + client.openScreen(new PeekCommand.PeekShulkerBoxScreen(new ShulkerBoxScreenHandler(0, client.player.inventory, new SimpleInventory(stack)), client.player.inventory, entity.getName())); + }); + } + if (entity.isGlowing()) { + functions.put("Remove highlight", (Entity e) -> { + entity.setGlowing(false); + closeScreen(); + }); + } else { + functions.put("Highlight", (Entity e) -> { + entity.setGlowing(true); + closeScreen(); + }); + } + msgs = Modules.get().get(InteractionMenu.class).messages; + msgs.keySet().forEach((key) -> { + functions.put(key, (Entity e) -> { + closeScreen(); + client.openScreen(new ChatScreen(replacePlaceholders(msgs.get(key), e))); + }); + }); + functions.put("Cancel", (Entity e) -> {closeScreen();}); + } + + public void init() { + super.init(); + this.cursorMode(GLFW.GLFW_CURSOR_HIDDEN); + yaw = client.player.yaw; + pitch = client.player.pitch; + } + + private void cursorMode(int mode) { + KeyBinding.unpressAll(); + double x = (double)(this.client.getWindow().getWidth() / 2); + double y = (double)(this.client.getWindow().getHeight() / 2); + InputUtil.setCursorParameters(this.client.getWindow().getHandle(), mode, x, y); + } + + public void tick() { + if (Modules.get().get(InteractionMenu.class).keybind.get().isPressed()) + onClose(); + } + + private void closeScreen() { + client.openScreen((Screen) null); + //Modules.get().get(InteractionMenu.class).isOpen = false; + } + + public void onClose() { + cursorMode(GLFW.GLFW_CURSOR_NORMAL); + // This makes the magic + if (focusedString != null) { + functions.get(focusedString).accept(this.entity); + } else + client.openScreen((Screen) null); + } + + public boolean isPauseScreen() { + return false; + } + + public void render(MatrixStack matrix, int mouseX, int mouseY, float delta) { + // Fake crosshair stuff + /* + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShader(GameRenderer::getPositionTexShader); + RenderSystem.setShaderTexture(0, GUI_ICONS_TEXTURE); + */ + client.getTextureManager().bindTexture(GUI_ICONS_TEXTURE); + RenderSystem.enableBlend(); + RenderSystem.blendFuncSeparate(GlStateManager.SrcFactor.ONE_MINUS_DST_COLOR, + GlStateManager.DstFactor.ONE_MINUS_SRC_COLOR, GlStateManager.SrcFactor.ONE, + GlStateManager.DstFactor.ZERO); + drawTexture(matrix, crosshairX - 8, crosshairY - 8, 0, 0, 15, 15); + + drawDots(matrix, (int) (Math.min(height, width) / 2 * 0.75), mouseX, mouseY); + matrix.scale (2f, 2f, 1f); + drawCenteredText(matrix, textRenderer, entity.getName(), width / 4, 6, 0xFFFFFFFF); + + int scale = client.options.guiScale; + Vector2 mouse = new Vector2(mouseX, mouseY); + Vector2 center = new Vector2(width / 2, height / 2); + mouse.subtract(center); + mouse.normalize(); + Vector2 cross = mouse; + + if (scale == 0) + scale = 4; + + // Move crossHair based on distance between mouse and center. But with limit + if (Math.hypot(width / 2 - mouseX, height / 2 - mouseY) < 1f / scale * 200f) + mouse.multiply((float) Math.hypot(width / 2 - mouseX, height / 2 - mouseY)); + else + mouse.multiply(1f / scale * 200f); + + this.crosshairX = (int) mouse.x + width / 2; + this.crosshairY = (int) mouse.y + height / 2; + + client.player.yaw = yaw + cross.x / 3; + client.player.pitch = MathHelper.clamp(pitch + cross.y / 3, -90f, 90f); + super.render(matrix, mouseX, mouseY, delta); + } + + + + private void drawDots(MatrixStack matrix, int radius, int mouseX, int mouseY) { + ArrayList pointList = new ArrayList(); + String cache[] = new String[functions.size()]; + double lowestDistance = Double.MAX_VALUE; + int i = 0; + + for (String string: functions.keySet()) { + // Just some fancy calculations to get the positions of the dots + double s = (double) i / functions.size() * 2 * Math.PI; + int x = (int) Math.round(radius * Math.cos(s) + width / 2); + int y = (int) Math.round(radius * Math.sin(s) + height / 2); + drawTextField(matrix, x, y, string); + + // Calculate lowest distance between mouse and dot + if (Math.hypot(x - mouseX, y - mouseY) < lowestDistance) { + lowestDistance = Math.hypot(x - mouseX, y - mouseY); + focusedDot = i; + } + + cache[i] = string; + pointList.add(new Point(x, y)); + i++; + } + + // Go through all point and if it is focused -> drawing different color, changing closest string value + for (int j = 0; j < functions.size(); j++) { + Point point = pointList.get(j); + if (pointList.get(focusedDot) == point) { + drawDot(matrix, point.x - 4, point.y - 4, 0xFF4CFF00); + this.focusedString = cache[focusedDot]; + } + else + drawDot(matrix, point.x - 4, point.y - 4, 0xFF0094FF); + } + } + + private void drawRect(MatrixStack matrix, int startX, int startY, int width, int height, int colorInner,int colorOuter) { + drawHorizontalLine(matrix, startX, startX + width, startY, colorOuter); + drawHorizontalLine(matrix, startX, startX + width, startY + height, colorOuter); + drawVerticalLine(matrix, startX, startY, startY + height, colorOuter); + drawVerticalLine(matrix, startX + width, startY, startY + height, colorOuter); + fill(matrix, startX + 1, startY + 1, startX + width, startY + height, colorInner); + } + + private void drawTextField(MatrixStack matrix, int x, int y, String key) { + if (x >= width / 2) { + drawRect(matrix, x + 10, y - 8, textRenderer.getWidth(key) + 3, 15, 0x80808080, 0xFF000000); + drawStringWithShadow(matrix, textRenderer, key, x + 12, y - 4, 0xFFFFFFFF); + } else { + drawRect(matrix, x - 14 - textRenderer.getWidth(key), y - 8, textRenderer.getWidth(key) + 3, 15, 0x80808080, 0xFF000000); + drawStringWithShadow(matrix, textRenderer, key, x - 12 - textRenderer.getWidth(key), y - 4, 0xFFFFFFFF); + } + } + + // Literally drawing it in code + private void drawDot(MatrixStack matrix, int startX, int startY, int colorInner) { + // Draw dot itself + drawHorizontalLine(matrix, startX + 2, startX + 5, startY, 0xFF000000); + drawHorizontalLine(matrix, startX + 1, startX + 6, startY + 1, 0xFF000000); + drawHorizontalLine(matrix, startX + 2, startX + 5, startY + 1, colorInner); + fill(matrix, startX, startY + 2, startX + 8, startY + 6, 0xFF000000); + fill(matrix, startX + 1, startY + 2, startX + 7, startY + 6, colorInner); + drawHorizontalLine(matrix, startX + 1, startX + 6, startY + 6, 0xFF000000); + drawHorizontalLine(matrix, startX + 2, startX + 5, startY + 6, colorInner); + drawHorizontalLine(matrix, startX + 2, startX + 5, startY + 7, 0xFF000000); + + // Draw light overlay + drawHorizontalLine(matrix, startX + 2, startX + 3, startY + 1, 0x80FFFFFF); + drawHorizontalLine(matrix, startX + 1, startX + 1, startY + 2, 0x80FFFFFF); + } + + private String replacePlaceholders(String in, Entity e) { + in = in.replace("{uuid}", e.getUuidAsString()); + in = in.replace("{name}", e.getName().getString()); + in = in.replace("{pos}", String.format("%.2f %.2f %.2f", e.getX(), e.getY(), e.getZ())); + if (e instanceof PlayerEntity) { + in = in.replace("{username}", ((PlayerEntity)e).getGameProfile().getName()); + } + return in; + } +} + + +// Creating my own Vector class beacause I couldn“t find a good one in minecrafts code +class Vector2 { + float x, y; + + Vector2 (float x, float y) { + this.x = x; + this.y = y; + } + + void normalize() { + float mag = getMag(); + if (mag != 0 && mag != 1) + divide(mag); + } + + void subtract (Vector2 vec) { + this.x -= vec.x; + this.y -= vec.y; + } + + void divide(float n) { + x /= n; + y /= n; + } + + void multiply(float n) { + x *= n; + y *= n; + } + + private float getMag() { + return (float) Math.sqrt(x * x + y * y); + } +} \ No newline at end of file diff --git a/src/main/java/cloudburst/rejects/screens/StatsScreen.java b/src/main/java/cloudburst/rejects/screens/StatsScreen.java new file mode 100644 index 0000000..51c6045 --- /dev/null +++ b/src/main/java/cloudburst/rejects/screens/StatsScreen.java @@ -0,0 +1,62 @@ +package cloudburst.rejects.screens; + +import cloudburst.rejects.modules.InteractionMenu; +import minegame159.meteorclient.systems.modules.Modules; +import net.minecraft.client.resource.language.TranslationStorage; +import net.minecraft.entity.Entity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.entity.effect.StatusEffectUtil; +import net.minecraft.util.Language; +import net.minecraft.util.math.Box; + +import minegame159.meteorclient.gui.GuiTheme; +import minegame159.meteorclient.gui.GuiThemes; +import minegame159.meteorclient.gui.WindowScreen; +import minegame159.meteorclient.gui.widgets.containers.WSection; + +import java.util.Collection; + +public class StatsScreen extends WindowScreen { + public final Entity entity; + public StatsScreen(Entity e) { + super(GuiThemes.get(),e.getName().getString()); + this.entity = e; + GuiTheme theme = GuiThemes.get(); + add(theme.label(String.format("Age: %d", entity.age))); + if (entity instanceof LivingEntity) { + LivingEntity liv = (LivingEntity) entity; + add(theme.label(String.format("Health: %.2f/%.2f", liv.getHealth(), liv.getMaxHealth()))); + + Collection statusEff = liv.getStatusEffects(); + if (!statusEff.isEmpty()) { + WSection effectList = add(theme.section("Status Effects", true)).expandCellX().widget(); + Language lang = TranslationStorage.getInstance(); + statusEff.forEach((effect) -> { + String status = lang.get(effect.getTranslationKey()); + if (effect.getAmplifier() != 0) { + status += (String.format(" %d (%s)", effect.getAmplifier()+1, StatusEffectUtil.durationToString(effect, 1))); + } else { + status += (String.format(" (%s)", StatusEffectUtil.durationToString(effect, 1))); + } + effectList.add(theme.label(status)).expandCellX(); + }); + } + + } + WSection dimension = add(theme.section("Dimensions", false)).expandCellX().widget(); + dimension.add(theme.label(String.format("Position: %.2f, %.2f, %.2f", entity.getX(), entity.getY(), entity.getZ()))).expandCellX(); + dimension.add(theme.label(String.format("Yaw: %.2f, Pitch: %.2f", entity.yaw, entity.pitch))).expandCellX(); + Box box = entity.getBoundingBox(); + dimension.add(theme.label(String.format("Bounding Box: [%.2f, %.2f, %.2f] -> [%.2f, %.2f, %.2f]", + box.minX, box.minY, box.minZ, + box.maxX, box.maxY, box.maxZ + ))).expandCellX(); + } + + @Override + protected void onClosed() { + super.onClosed(); + //Modules.get().get(InteractionMenu.class).isOpen = false; + } +} diff --git a/src/main/java/cloudburst/rejects/utils/GiveUtils.java b/src/main/java/cloudburst/rejects/utils/GiveUtils.java new file mode 100644 index 0000000..8cd4113 --- /dev/null +++ b/src/main/java/cloudburst/rejects/utils/GiveUtils.java @@ -0,0 +1,288 @@ +package cloudburst.rejects.utils; + +import com.mojang.brigadier.exceptions.CommandSyntaxException; +import minegame159.meteorclient.utils.player.ChatUtils; +import net.minecraft.client.MinecraftClient; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.nbt.StringNbtReader; + +import java.util.Random; + +public class GiveUtils { + + private static final MinecraftClient mc = MinecraftClient.getInstance(); + + public static ItemStack createPreset(String name, String container) { + ItemStack item = null; + switch (container) { + case "chest": + item = new ItemStack(Items.CHEST); + break; + case "trapped_chest": + item = new ItemStack(Items.TRAPPED_CHEST); + break; + case "barrel": + item = new ItemStack(Items.BARREL); + break; + case "dispenser": + item = new ItemStack(Items.DISPENSER); + break; + default: + item = new ItemStack(Items.PINK_SHULKER_BOX); + break; + } + String nick = mc.player.getName().asString(); + try { + switch (name.toLowerCase()) { + case "negs": + + item.setTag(StringNbtReader.parse("{display:{Name:\"{\\\"text\\\":\\\"" + nick + + "'s Negative Items\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:1b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:2b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:3b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:4b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:5b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:6b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:7b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:8b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:9b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:10b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:11b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:12b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:13b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:14b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:15b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:16b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:17b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:18b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:19b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:20b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:21b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:22b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:23b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:24b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:25b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:26b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Negative Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Damage:1981,Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}}]}}")); + + break; + case "stacked": + item.setTag(StringNbtReader.parse("{display:{Name:\"{\\\"text\\\":\\\"" + nick + + "'s Stacked Items\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:diamond_helmet\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Helmet\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:1b,id:\"minecraft:diamond_chestplate\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Chestplate\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:2b,id:\"minecraft:diamond_leggings\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Leggings\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:3b,id:\"minecraft:diamond_boots\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Boots\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:4b,id:\"minecraft:diamond_sword\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Sword\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:5b,id:\"minecraft:diamond_shovel\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Shovel\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:6b,id:\"minecraft:diamond_pickaxe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Pickaxe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:7b,id:\"minecraft:diamond_axe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Axe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:8b,id:\"minecraft:diamond_hoe\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Hoe\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:9b,id:\"minecraft:water_bucket\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Water Bucket\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:10b,id:\"minecraft:lava_bucket\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Lava Buckets\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:11b,id:\"minecraft:milk_bucket\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Milk Buckets\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:12b,id:\"minecraft:bow\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Bows\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:13b,id:\"minecraft:fishing_rod\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Fishing Rods\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},Enchantments:[{id:\"minecraft:vanishing_curse\",lvl:1s}]}},{Slot:14b,id:\"minecraft:writable_book\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Book And Quills\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},pages:[\"\"]}},{Slot:15b,id:\"minecraft:enchanted_book\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Enchanted Books\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:16b,id:\"minecraft:saddle\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Saddles\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:17b,id:\"minecraft:potion\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Bottles\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:18b,id:\"minecraft:music_disc_11\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:19b,id:\"minecraft:music_disc_13\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:20b,id:\"minecraft:music_disc_blocks\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:21b,id:\"minecraft:music_disc_cat\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:22b,id:\"minecraft:music_disc_chirp\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:23b,id:\"minecraft:music_disc_far\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:24b,id:\"minecraft:music_disc_mall\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:25b,id:\"minecraft:music_disc_mellohi\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:26b,id:\"minecraft:music_disc_stal\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Stacked Discs\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}}]}}")); + break; + case "spawners": + item.setTag(StringNbtReader.parse("{display:{Name:\"{\\\"text\\\":\\\"" + nick + + "'s Spawners\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Pig Spawners\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"}}},{Slot:1b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Lag Spawners\\\",\\\"color\\\":\\\"dark_red\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{SpawnCount:32767,SpawnRange:32767,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:0,MaxNearbyEntities:32767,RequiredPlayerRange:32767}}},{Slot:2b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Lag Spawners #2\\\",\\\"color\\\":\\\"dark_red\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{SpawnCount:32767,SpawnRange:32767,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:0,MaxNearbyEntities:32767,RequiredPlayerRange:32767}}},{Slot:3b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:\"{\\\"text\\\":\\\"" + + nick + + "'s Tnt Spawners\\\",\\\"color\\\":\\\"aqua\\\",\\\"bold\\\":true,\\\"italic\\\":true,\\\"underlined\\\":true}\"},BlockEntityTag:{SpawnCount:50,SpawnRange:10,Delay:0,MinSpawnDelay:0,MaxSpawnDelay:0,MaxNearbyEntities:32767,RequiredPlayerRange:32767,SpawnData:{id:\"minecraft:tnt\",Fuse:1}}}},{Slot:4b,id:\"minecraft:spawner\",Count:64b,tag:{display:{Name:'{\"text\":\"" + + nick + + "\\'s Boat Spawner\",\"color\":\"aqua\",\"bold\":true,\"italic\":true,\"underlined\":true}'},BlockEntityTag:{SpawnCount:50,SpawnRange:10,SpawnData:{id:\"minecraft:boat\",Glowing:1b,Invulnerable:1b,CustomNameVisible:1b,Type:\"jungle\",CustomName:'{\"text\":\"" + + nick + + "_Knight Ontop\",\"color\":\"aqua\",\"bold\":true,\"italic\":true,\"underlined\":true}'}}}}]}}")); + break; + case "bookban": + String n = mc.player.getName().asString().toUpperCase(); + item.setTag(StringNbtReader.parse("{display:{Name:'{\"text\":\"" + nick + + "\\'s Bookban Shulker\",\"color\":\"aqua\",\"bold\":true,\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:1b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:2b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:3b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:4b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:5b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:6b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:7b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:8b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:9b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:10b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:11b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:12b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:13b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:14b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:15b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:16b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:17b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:18b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:19b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:20b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:21b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:22b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:23b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:24b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:25b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}},{Slot:26b,id:\"minecraft:writable_book\",Count:16b,tag:{display:{Name:'{\"text\":\"" + + n + " OWNS ALL\",\"color\":\"dark_red\",\"bold\":true}'},pages:[" + getBookbanTag() + + "]}}]}}")); + break; + case "test": + String s = ""; + String s1 = ""; + Random r = new Random(); + for (int i = 0; i < 500; i++) + s1 += ",{Type:0}"; + for (int i = 0; i < 100; i++) + s += "," + r.nextInt(16777215); + item.setTag(StringNbtReader.parse( + "{BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:firework_rocket\",Count:1b,tag:{Fireworks:{Explosions:[{Type:0}" + + s1 + + "]}}},{Slot:1b,id:\"minecraft:firework_rocket\",Count:64b,tag:{Fireworks:{Flight:127b,Explosions:[{Type:0,Flicker:1b,Trail:1b,Colors:[I;16711680],FadeColors:[I;16711680" + + s + "]},{Type:1,Flicker:1b,Trail:1b,Colors:[I;16711680],FadeColors:[I;16711680" + + s + "]},{Type:2,Flicker:1b,Trail:1b,Colors:[I;16711680" + s + + "],FadeColors:[I;16711680" + s + + "]},{Type:3,Flicker:1b,Trail:1b,Colors:[I;16711680" + s + + "],FadeColors:[I;16711680" + s + + "]},{Type:4,Flicker:1b,Trail:1b,Colors:[I;16711680" + s + + "],FadeColors:[I;16711680" + s + + "]}]}}},{Slot:2b,id:\"minecraft:lingering_potion\",Count:64b,tag:{display:{Name:'{\"text\":\"" + + nick + + "\\'s B R U H M O M E N T Potion\",\"color\":\"aqua\",\"bold\":true,\"italic\":true}'},AttributeModifiers:[{AttributeName:\"generic.maxHealth\",Name:\"generic.maxHealth\",Amount:1,Operation:0,UUIDLeast:338793,UUIDMost:213301}],CustomPotionEffects:[{Id:1b,Amplifier:127b,Duration:32767},{Id:2b,Amplifier:127b,Duration:32767},{Id:3b,Amplifier:127b,Duration:32767},{Id:4b,Amplifier:127b,Duration:32767},{Id:5b,Amplifier:127b,Duration:32767},{Id:6b,Amplifier:127b,Duration:32767},{Id:7b,Amplifier:127b,Duration:32767},{Id:8b,Amplifier:127b,Duration:32767},{Id:9b,Amplifier:127b,Duration:32767},{Id:10b,Amplifier:127b,Duration:32767},{Id:11b,Amplifier:127b,Duration:32767},{Id:12b,Amplifier:127b,Duration:32767},{Id:13b,Amplifier:127b,Duration:32767},{Id:14b,Amplifier:127b,Duration:32767},{Id:15b,Amplifier:127b,Duration:32767},{Id:16b,Amplifier:127b,Duration:32767},{Id:17b,Amplifier:127b,Duration:32767},{Id:18b,Amplifier:127b,Duration:32767},{Id:19b,Amplifier:127b,Duration:32767},{Id:20b,Amplifier:127b,Duration:32767},{Id:21b,Amplifier:127b,Duration:32767},{Id:22b,Amplifier:127b,Duration:32767},{Id:23b,Amplifier:127b,Duration:32767},{Id:24b,Amplifier:127b,Duration:32767},{Id:25b,Amplifier:127b,Duration:32767},{Id:26b,Amplifier:127b,Duration:32767},{Id:27b,Amplifier:127b,Duration:32767},{Id:28b,Amplifier:127b,Duration:32767},{Id:29b,Amplifier:127b,Duration:32767},{Id:30b,Amplifier:127b,Duration:32767},{Id:31b,Amplifier:127b,Duration:32767}],Potion:\"minecraft:leaping\"}},{Slot:3b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:13b,id:\"minecraft:pink_shulker_box\",Count:64b,tag:{display:{Name:'{\"text\":\"nested shulker boxes\",\"color\":\"red\",\"italic\":true,\"underlined\":true}'}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}}]}}},{Slot:4b,id:\"minecraft:chicken_spawn_egg\",Count:1b,tag:{EntityTag:{id:\"minecraft:spawner_minecart\",CustomDisplayTile:1b,Delay:1,MinSpawnDelay:0,MaxSpawnDelay:0,MaxNearbyEntities:1000,RequiredPlayerRange:100,DisplayState:{Name:\"minecraft:acacia_door\",Properties:{half:\"upper\",hinge:\"left\",open:\"true\"}},SpawnData:{id:\"minecraft:minecart\"}}}}]}}")); + break; + case "eggs": + item.setTag(StringNbtReader.parse("{display:{Name:'{\"text\":\"" + nick + + "\\'s Spawn Eggs\",\"color\":\"aqua\",\"bold\":true,\"italic\":true,\"underlined\":true}'},BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:zombie_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Spawn Giant\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:giant\",Invulnerable:1b,Glowing:1b}}},{Slot:1b,id:\"minecraft:enderman_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Enderman With Cmd block\",\"color\":\"aqua\"}'},EntityTag:{carriedBlockState:{Name:\"minecraft:command_block\",Properties:{conditional:\"true\"}}}}},{Slot:2b,id:\"minecraft:bat_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Cmd minecart (kill @a)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:command_block_minecart\",Command:\"kill @a\"}}},{Slot:3b,id:\"minecraft:bat_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Spawner minecart (turn particles off)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:spawner_minecart\",SpawnData:{id:\"minecraft:armor_stand\"}}}},{Slot:4b,id:\"minecraft:cave_spider_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"E G G\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:egg\",NoGravity:1b,Fire:2100000000,Glowing:1b}}},{Slot:5b,id:\"minecraft:stray_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"area_effect_cloud (50 range)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:area_effect_cloud\",Particle:\"angry_villager\",ReapplicationDelay:1,Radius:50f,RadiusPerTick:0f,RadiusOnUse:0f,Duration:500000,DurationOnUse:0f,Color:16711680,Potion:\"minecraft:strong_swiftness\"}}},{Slot:6b,id:\"minecraft:evoker_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"area_effect_cloud (E X P A N D)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:area_effect_cloud\",Particle:\"angry_villager\",Radius:1f,RadiusPerTick:10f,RadiusOnUse:1f,Duration:10000}}},{Slot:7b,id:\"minecraft:elder_guardian_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Arrow (End Portal Sound)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:arrow\",pickup:1b,SoundEvent:\"block.end_portal.spawn\"}}},{Slot:8b,id:\"minecraft:elder_guardian_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Arrow (EG Curse Sound)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:arrow\",pickup:1b,SoundEvent:\"entity.elder_guardian.curse\"}}},{Slot:9b,id:\"minecraft:drowned_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Big chungus slime\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:slime\",Size:50}}},{Slot:10b,id:\"minecraft:fox_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Invis Armor Stand\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:armor_stand\",Invulnerable:1b,Invisible:1b,PersistenceRequired:1b,ArmorItems:[{},{},{},{id:\"minecraft:spawner\",Count:1b}]}}},{Slot:11b,id:\"minecraft:ghast_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Enderdragon\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:ender_dragon\",DragonPhase:8}}},{Slot:12b,id:\"minecraft:cow_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Lightning\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:lightning_bolt\"}}},{Slot:13b,id:\"minecraft:guardian_spawn_egg\",Count:1b,tag:{EntityTag:{id:\"minecraft:iron_golem\"}}},{Slot:14b,id:\"minecraft:evoker_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"area_effect_cloud (expand slow)\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:area_effect_cloud\",Particle:\"angry_villager\",Radius:1f,RadiusPerTick:10f,RadiusOnUse:1f,Duration:1000000}}},{Slot:15b,id:\"minecraft:bee_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Tnt Minecart\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:tnt_minecart\",TNTFuse:1000000}}},{Slot:16b,id:\"minecraft:bat_spawn_egg\",Count:1b,tag:{display:{Name:'{\"text\":\"Invalid translate name test\",\"color\":\"aqua\"}'},EntityTag:{id:\"minecraft:boat\",CustomNameVisible:1b,Type:\"acacia\",CustomName:'{\"translate\":\"translation.test.invalid\"}'}}}]}}")); + break; + case "forceop": + item.setTag(StringNbtReader.parse( + "{BlockEntityTag:{Items:[{Slot:0b,id:\"minecraft:command_block\",Count:64b,tag:{BlockEntityTag:{conditionMet:0b,auto:0b,CustomName:'{\"text\":\"@\"}',powered:0b,Command:\"execute as @e run op " + + nick + + "\",id:\"minecraft:command_block\",SuccessCount:0,TrackOutput:1b,UpdateLastExecution:1b},display:{Lore:['\"(+NBT)\"']}}},{Slot:1b,id:\"minecraft:bat_spawn_egg\",Count:64b,tag:{EntityTag:{Time:1,BlockState:{Name:\"minecraft:spawner\"},id:\"minecraft:falling_block\",TileEntityData:{SpawnCount:20,SpawnData:{id:\"minecraft:villager\",Passengers:[{Time:1,BlockState:{Name:\"minecraft:redstone_block\"},id:\"minecraft:falling_block\",Passengers:[{id:\"minecraft:fox\",Passengers:[{Time:1,BlockState:{Name:\"minecraft:activator_rail\"},id:\"minecraft:falling_block\",Passengers:[{Command:\"execute as @e run op " + + nick + + "\",id:\"minecraft:command_block_minecart\"}]}],NoAI:1b,Health:1.0f,ActiveEffects:[{Duration:1000,Id:20b,Amplifier:4b}]}]}],NoAI:1b,Health:1.0f,ActiveEffects:[{Duration:1000,Id:20b,Amplifier:4b}]},MaxSpawnDelay:100,SpawnRange:10,Delay:1,MinSpawnDelay:100}}}}]},display:{Name:'{\"bold\":true,\"italic\":true,\"underlined\":true,\"color\":\"aqua\",\"text\":\"" + + nick + "\\'s ForceOP\"}'}}")); + break; + default: + break; + } + } catch (CommandSyntaxException e) { + ChatUtils.error("An NBT parsing error occured"); + } + + return item; + } + + private static String getBookbanTag() { + String book = ""; + String page = ""; + for (int i = 0; i < 100; i++) + page += "\uffff"; + for (int i = 0; i < 99; i++) + book += "\"" + page + "\","; + book += "\"" + page + "\""; + + return book; + } +} diff --git a/src/main/resources/meteor-rejects.mixins.json b/src/main/resources/meteor-rejects.mixins.json index 99f9840..16bbb4c 100644 --- a/src/main/resources/meteor-rejects.mixins.json +++ b/src/main/resources/meteor-rejects.mixins.json @@ -7,7 +7,8 @@ "client": [ "EntityMixin", "ClientWorldMixin", - "StructureVoidBlockMixin" + "StructureVoidBlockMixin", + "HorseBaseEntityAccessor" ], "injectors": { "defaultRequire": 1