58 free modules for Meteor Client. Combat, movement, visuals, exploits and more — all in one download.
Every module included in one free download. Filter by category below.
Every module is open source. Browse the actual code below — what you see is what you get.
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.utils.RejectsUtils;
import meteordevelopment.meteorclient.events.render.Render3DEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.friends.Friends;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.entity.EntityUtils;
import meteordevelopment.meteorclient.utils.entity.SortPriority;
import meteordevelopment.meteorclient.utils.entity.Target;
import meteordevelopment.meteorclient.utils.entity.TargetUtils;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.player.Player;
import org.joml.Vector3d;
import java.util.Set;
class="c-keyword">public class AimAssist extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgSpeed = settings.createGroup(class="c-str">"Aim Speed");
class="c-comment">// General
class="c-keyword">private final Setting<Set<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
.name(class="c-str">"entities")
.description(class="c-str">"Entities to aim at.")
.defaultValue(EntityType.PLAYER)
.build()
);
class="c-keyword">private final Setting<Double> range = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"range")
.description(class="c-str">"The range at which an entity can be targeted.")
.defaultValue(5)
.min(0)
.build()
);
class="c-keyword">private final Setting<Double> fov = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"fov")
.description(class="c-str">"Will only aim entities in the fov.")
.defaultValue(360)
.min(0)
.max(360)
.build()
);
class="c-keyword">private final Setting<Boolean> ignoreWalls = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"ignore-walls")
.description(class="c-str">"Whether or not to ignore aiming through walls.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<SortPriority> priority = sgGeneral.add(new EnumSetting.Builder<SortPriority>()
.name(class="c-str">"priority")
.description(class="c-str">"How to filter targets within range.")
.defaultValue(SortPriority.LowestHealth)
.build()
);
class="c-keyword">private final Setting<Target> bodyTarget = sgGeneral.add(new EnumSetting.Builder<Target>()
.name(class="c-str">"aim-target")
.description(class="c-str">"Which part of the entities body to aim at.")
.defaultValue(Target.Body)
.build()
);
class="c-comment">// Aim Speed
class="c-keyword">private final Setting<Boolean> instant = sgSpeed.add(new BoolSetting.Builder()
.name(class="c-str">"instant-look")
.description(class="c-str">"Instantly looks at the entity.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Double> speed = sgSpeed.add(new DoubleSetting.Builder()
.name(class="c-str">"speed")
.description(class="c-str">"How fast to aim at the entity.")
.defaultValue(5)
.min(0)
.visible(() -> !instant.get())
.build()
);
class="c-keyword">private final Vector3d vec3d1 = new Vector3d();
class="c-keyword">private Entity target;
class="c-keyword">public AimAssist() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"aim-assist", class="c-str">"Automatically aims at entities.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
target = TargetUtils.get(entity -> {
if (!entity.isAlive()) return false;
if (!PlayerUtils.isWithin(entity, range.get())) return false;
if (!ignoreWalls.get() && !PlayerUtils.canSeeEntity(entity)) return false;
if (entity == mc.player || !entities.get().contains(entity.getType())) return false;
if (entity instanceof Player && !Friends.get().shouldAttack((Player) entity)) return false;
return RejectsUtils.inFov(entity, fov.get());
}, priority.get());
}
class="c-annotation">@EventHandler
class="c-keyword">private void onRender(Render3DEvent event) {
if (target != null) aim(target, event.tickDelta, instant.get());
}
class="c-keyword">private void aim(Entity target, double delta, boolean instant) {
Utils.set(vec3d1, target, delta);
switch (bodyTarget.get()) {
case Head -> vec3d1.add(0, target.getEyeHeight(target.getPose()), 0);
case Body -> vec3d1.add(0, target.getEyeHeight(target.getPose()) / 2, 0);
}
double deltaX = vec3d1.x - mc.player.getX();
double deltaZ = vec3d1.z - mc.player.getZ();
double deltaY = vec3d1.y - (mc.player.getY() + mc.player.getEyeHeight(mc.player.getPose()));
class="c-comment">// Yaw
double angle = Math.toDegrees(Math.atan2(deltaZ, deltaX)) - 90;
double deltaAngle;
double toRotate;
if (instant) {
mc.player.setYRot((float) angle);
} else {
deltaAngle = Mth.wrapDegrees(angle - mc.player.getYRot());
toRotate = speed.get() * (deltaAngle >= 0 ? 1 : -1) * delta;
if ((toRotate >= 0 && toRotate > deltaAngle) || (toRotate < 0 && toRotate < deltaAngle))
toRotate = deltaAngle;
mc.player.setYRot(mc.player.getYRot() + (float) toRotate);
}
class="c-comment">// Pitch
double idk = Math.sqrt(deltaX * deltaX + deltaZ * deltaZ);
angle = -Math.toDegrees(Math.atan2(deltaY, idk));
if (instant) {
mc.player.setXRot((float) angle);
} else {
deltaAngle = Mth.wrapDegrees(angle - mc.player.getXRot());
toRotate = speed.get() * (deltaAngle >= 0 ? 1 : -1) * delta;
if ((toRotate >= 0 && toRotate > deltaAngle) || (toRotate < 0 && toRotate < deltaAngle))
toRotate = deltaAngle;
mc.player.setXRot(mc.player.getXRot() + (float) toRotate);
}
}
class="c-annotation">@Override
class="c-keyword">public String getInfoString() {
return EntityUtils.getName(target);
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.entity.EntityUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
class="c-keyword">public class AntiBot extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgFilters = settings.createGroup(class="c-str">"Filters");
class="c-keyword">private final Setting<Boolean> removeInvisible = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"remove-invisible")
.description(class="c-str">"Removes bot only if they are invisible.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> gameMode = sgFilters.add(new BoolSetting.Builder()
.name(class="c-str">"null-gamemode")
.description(class="c-str">"Removes players without a gamemode")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> api = sgFilters.add(new BoolSetting.Builder()
.name(class="c-str">"null-entry")
.description(class="c-str">"Removes players without a player entry")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> profile = sgFilters.add(new BoolSetting.Builder()
.name(class="c-str">"null-profile")
.description(class="c-str">"Removes players without a game profile")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> latency = sgFilters.add(new BoolSetting.Builder()
.name(class="c-str">"ping-check")
.description(class="c-str">"Removes players using ping check")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> nullException = sgFilters.add(new BoolSetting.Builder()
.name(class="c-str">"null-exception")
.description(class="c-str">"Removes players if a NullPointerException occurred")
.defaultValue(false)
.build()
);
class="c-keyword">public AntiBot() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"anti-bot", class="c-str">"Detects and removes bots.");
}
class="c-annotation">@EventHandler
class="c-keyword">public void onTick(TickEvent.Post tickEvent) {
for (Entity entity : mc.level.entitiesForRendering()) {
if (!(entity instanceof Player playerEntity)) continue;
if (removeInvisible.get() && !entity.isInvisible()) continue;
if (isBot(playerEntity)) entity.remove(Entity.RemovalReason.DISCARDED);
}
}
class="c-keyword">private boolean isBot(Player entity) {
try {
if (gameMode.get() && EntityUtils.getGameMode(entity) == null) return true;
if (api.get() &&
mc.getConnection().getPlayerInfo(entity.getUUID()) == null) return true;
if (profile.get() &&
mc.getConnection().getPlayerInfo(entity.getUUID()).getProfile() == null) return true;
if (latency.get() &&
mc.getConnection().getPlayerInfo(entity.getUUID()).getLatency() > 1) return true;
} catch (NullPointerException e) {
if (nullException.get()) return true;
}
return false;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ClientboundExplodePacket;
import net.minecraft.network.protocol.game.ClientboundLevelParticlesPacket;
import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket;
import net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket;
import net.minecraft.world.phys.Vec3;
class="c-keyword">public class AntiCrash extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> log = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"log")
.description(class="c-str">"Logs when crash packet detected.")
.defaultValue(false)
.build()
);
class="c-keyword">public AntiCrash() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"anti-crash", class="c-str">"Attempts to cancel packets that may crash the client.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacketReceive(PacketEvent.Receive event) {
if (event.packet instanceof ClientboundExplodePacket packet) {
Vec3 explodePos = packet.center();
Vec3 playerKnockback = new Vec3(0, 0, 0);
if(packet.playerKnockback().isPresent()) {
playerKnockback = packet.playerKnockback().get();
}
if (class="c-comment">/* outside of world */ explodePos.x() > 30_000_000 || explodePos.y() > 30_000_000 || explodePos.z() > 30_000_000 || explodePos.x() < -30_000_000 || explodePos.y() < -30_000_000 || explodePos.z() < -30_000_000 ||
class="c-comment">// too much knockback
playerKnockback.x > 30_000_000 || playerKnockback.y > 30_000_000 || playerKnockback.z > 30_000_000
class="c-comment">// knockback can be negative?
|| playerKnockback.x < -30_000_000 || playerKnockback.y < -30_000_000 || playerKnockback.z < -30_000_000
) cancel(event);
} else if (event.packet instanceof ClientboundLevelParticlesPacket packet) {
class="c-comment">// too many particles
if (packet.getCount() > 100_000) cancel(event);
} else if (event.packet instanceof ClientboundPlayerPositionPacket packet) {
Vec3 playerPos = packet.change().position();
class="c-comment">// out of world movement
if (playerPos.x > 30_000_000 || playerPos.y > 30_000_000 || playerPos.z > 30_000_000 || playerPos.x < -30_000_000 || playerPos.y < -30_000_000 || playerPos.z < -30_000_000)
cancel(event);
} else if (event.packet instanceof ClientboundSetEntityMotionPacket packet) {
class="c-comment">// velocity
if (packet.getMovement().x > 1000 || packet.getMovement().y > 1000 || packet.getMovement().z > 1000
|| packet.getMovement().x < -1000 || packet.getMovement().y < -1000 || packet.getMovement().z < -1000
) cancel(event);
}
}
class="c-keyword">private void cancel(PacketEvent.Receive event) {
if (log.get()) warning(class="c-str">"Server attempts to crash you");
event.cancel();
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.network.protocol.game.ServerboundUseItemOnPacket;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BedBlock;
import net.minecraft.world.level.block.Blocks;
class="c-keyword">public class AntiSpawnpoint extends Module {
class="c-keyword">private SettingGroup sgDefault = settings.getDefaultGroup();
class="c-keyword">private Setting<Boolean> fakeUse = sgDefault.add(new BoolSetting.Builder()
.name(class="c-str">"fake-use")
.description(class="c-str">"Fake using the bed or anchor.")
.defaultValue(true)
.build()
);
class="c-keyword">public AntiSpawnpoint() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"anti-spawnpoint", class="c-str">"Protects the player from losing the respawn point.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onSendPacket(PacketEvent.Send event) {
if (mc.level == null) return;
if(!(event.packet instanceof ServerboundUseItemOnPacket)) return;
BlockPos blockPos = ((ServerboundUseItemOnPacket) event.packet).getHitResult().getBlockPos();
boolean IsOverWorld = mc.level.dimension() == Level.OVERWORLD;
boolean IsNetherWorld = mc.level.dimension() == Level.NETHER;
boolean BlockIsBed = mc.level.getBlockState(blockPos).getBlock() instanceof BedBlock;
boolean BlockIsAnchor = mc.level.getBlockState(blockPos).getBlock().equals(Blocks.RESPAWN_ANCHOR);
assert mc.player != null;
if (fakeUse.get()) {
if (BlockIsBed && IsOverWorld) {
mc.player.swing(InteractionHand.MAIN_HAND);
mc.player.absSnapTo(blockPos.getX(),blockPos.above().getY(),blockPos.getZ());
}
else if (BlockIsAnchor && IsNetherWorld) {
mc.player.swing(InteractionHand.MAIN_HAND);
}
}
if((BlockIsBed && IsOverWorld)||(BlockIsAnchor && IsNetherWorld)) {
event.cancel();
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import com.mojang.brigadier.suggestion.Suggestion;
import meteordevelopment.meteorclient.events.game.ReceiveMessageEvent;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.gui.GuiTheme;
import meteordevelopment.meteorclient.gui.widgets.WWidget;
import meteordevelopment.meteorclient.gui.widgets.containers.WVerticalList;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ClientboundCommandSuggestionsPacket;
import net.minecraft.network.protocol.game.ServerboundCommandSuggestionPacket;
import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;
class="c-keyword">public class AntiVanish extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Integer> interval = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"interval")
.description(class="c-str">"Vanish check interval.")
.defaultValue(100)
.min(0)
.sliderMax(300)
.build()
);
class="c-keyword">private final Setting<Mode> mode = sgGeneral.add(new EnumSetting.Builder<Mode>()
.name(class="c-str">"mode")
.defaultValue(Mode.LeaveMessage)
.build()
);
class="c-keyword">private final Setting<String> command = sgGeneral.add(new StringSetting.Builder()
.name(class="c-str">"command")
.description(class="c-str">"The completion command to detect player names.")
.defaultValue(class="c-str">"minecraft:msg")
.visible(() -> mode.get() == Mode.RealJoinMessage)
.build()
);
class="c-keyword">private Map<UUID, String> playerCache = new HashMap<>();
class="c-keyword">private final List<String> messageCache = new ArrayList<>();
class="c-keyword">private final Random random = new Random();
class="c-keyword">private final List<Integer> completionIDs = new ArrayList<>();
class="c-keyword">private List<String> completionPlayerCache = new ArrayList<>();
class="c-keyword">private int timer = 0;
class="c-keyword">public AntiVanish() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"anti-vanish", class="c-str">"Notifies user when a admin uses /vanish");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
timer = 0;
completionIDs.clear();
messageCache.clear();
}
class="c-annotation">@Override
class="c-keyword">public WWidget getWidget(GuiTheme theme) {
WVerticalList l = theme.verticalList();
l.add(theme.label(class="c-str">"LeaveMessage: If client didn't receive a quit game message (like essentials)."));
l.add(theme.label(class="c-str">"RealJoinMessage: Tell whether the player is really left by using player name completion."));
return l;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacket(PacketEvent.Receive event) {
if (mode.get() == Mode.RealJoinMessage && event.packet instanceof ClientboundCommandSuggestionsPacket packet) {
if (completionIDs.contains(packet.id())) {
var lastUsernames = completionPlayerCache.stream().toList();
completionPlayerCache = packet.toSuggestions().getList().stream()
.map(Suggestion::getText)
.toList();
if (lastUsernames.isEmpty()) return;
Predicate<String> joinedOrQuit = playerName -> lastUsernames.contains(playerName) != completionPlayerCache.contains(playerName);
for (String playerName : completionPlayerCache) {
if (Objects.equals(playerName, mc.player.getName().getString())) continue;
if (playerName.contains(class="c-str">" ")) continue;
if (playerName.length() < 3 || playerName.length() > 16) continue;
if (joinedOrQuit.test(playerName)) {
info(class="c-str">"Player joined: " + playerName);
}
}
for (String playerName : lastUsernames) {
if (Objects.equals(playerName, mc.player.getName().getString())) continue;
if (playerName.contains(class="c-str">" ")) continue;
if (playerName.length() < 3 || playerName.length() > 16) continue;
if (joinedOrQuit.test(playerName)) {
info(class="c-str">"Player left: " + playerName);
}
}
completionIDs.remove(Integer.valueOf(packet.id()));
event.cancel();
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onReceiveMessage(ReceiveMessageEvent event) {
messageCache.add(event.getMessage().getString());
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
timer++;
if (timer < interval.get()) return;
switch (mode.get()) {
case LeaveMessage -> {
Map<UUID, String> oldPlayers = Map.copyOf(playerCache);
playerCache = mc.getConnection().getOnlinePlayers().stream().collect(Collectors.toMap(e -> e.getProfile().id(), e -> e.getProfile().name()));
for (UUID uuid : oldPlayers.keySet()) {
if (playerCache.containsKey(uuid)) continue;
String name = oldPlayers.get(uuid);
if (name.contains(class="c-str">" ")) continue;
if (name.length() < 3 || name.length() > 16) continue;
if (messageCache.stream().noneMatch(s -> s.contains(name))) {
warning(name + class="c-str">" has gone into vanish.");
}
}
}
case RealJoinMessage -> {
int id = random.nextInt(200);
completionIDs.add(id);
mc.getConnection().send(new ServerboundCommandSuggestionPacket(id, command.get() + class="c-str">" "));
}
}
timer = 0;
messageCache.clear();
}
class="c-keyword">public enum Mode {
LeaveMessage,
RealJoinMessageclass="c-comment">//https://github.com/xtrm-en/meteor-antistaff/blob/main/src/main/java/me/xtrm/meteorclient/antistaff/modules/AntiStaff.java
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.events.StopUsingItemEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket.Pos;
import net.minecraft.network.protocol.game.ServerboundPlayerCommandPacket;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.phys.Vec3;
class="c-keyword">public class ArrowDmg extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">public final Setting<Double> strength = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"strength")
.description(class="c-str">"More strength = higher damage.")
.defaultValue(5)
.min(0.1)
.sliderMax(25)
.build()
);
class="c-keyword">public final Setting<Boolean> tridents = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"tridents")
.description(class="c-str">"When enabled, tridents fly much further. Doesn't seem to affect damage or Riptide. WARNING: You can easily lose your trident by enabling this option!")
.defaultValue(false)
.build()
);
class="c-keyword">public ArrowDmg() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"arrow-damage", class="c-str">"Massively increases arrow damage, but reduces accuracy and consume more hunger. Does not work with crossbows and is patched on Paper servers.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onStopUsingItem(StopUsingItemEvent event) {
if (!isValidItem(event.itemStack.getItem()))
return;
LocalPlayer p = mc.player;
p.connection.send(
new ServerboundPlayerCommandPacket(p, ServerboundPlayerCommandPacket.Action.START_SPRINTING));
double x = p.getX();
double y = p.getY();
double z = p.getZ();
double adjustedStrength = strength.get() / 10.0 * Math.sqrt(500);
Vec3 lookVec = p.getViewVector(1).scale(adjustedStrength);
for (int i = 0; i < 4; i++) {
sendPos(x, y, z, true);
}
sendPos(x - lookVec.x, y, z - lookVec.z, true);
sendPos(x, y, z, false);
}
class="c-keyword">private void sendPos(double x, double y, double z, boolean onGround) {
ClientPacketListener clientPacketListener = mc.player.connection;
clientPacketListener.send(new Pos(x, y, z, onGround, mc.player.horizontalCollision));
}
class="c-keyword">private boolean isValidItem(Item item) {
return tridents.get() && item == Items.TRIDENT || item == Items.BOW;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.misc.Pool;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.utils.world.BlockIterator;
import meteordevelopment.meteorclient.utils.world.BlockUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.level.block.BedBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
class="c-keyword">public class AutoBedTrap extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Integer> bpt = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"blocks-per-tick")
.description(class="c-str">"How many blocks to place per tick")
.defaultValue(2)
.min(1)
.sliderMax(8)
.build()
);
class="c-keyword">private final Setting<Boolean> rotate = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"rotate")
.description(class="c-str">"Rotates when placing")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Double> range = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"range")
.description(class="c-str">"The break range.")
.defaultValue(4)
.min(0)
.build()
);
class="c-keyword">private final Setting<List<Block>> blockTypes = sgGeneral.add(new BlockListSetting.Builder()
.name(class="c-str">"blocks")
.description(class="c-str">"The blocks you bedtrap with.")
.defaultValue(Arrays.asList(Blocks.OBSIDIAN))
.build()
);
class="c-keyword">private final Pool<BlockPos.MutableBlockPos> blockPosPool = new Pool<>(BlockPos.MutableBlockPos::new);
class="c-keyword">private final List<BlockPos.MutableBlockPos> blocks = new ArrayList<>();
int cap = 0;
class="c-keyword">public AutoBedTrap() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-bed-trap", class="c-str">"Automatically places obsidian around beds");
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
for (BlockPos.MutableBlockPos blockPos : blocks) blockPosPool.free(blockPos);
blocks.clear();
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
BlockIterator.register((int) Math.ceil(range.get()), (int) Math.ceil(range.get()), (blockPos, blockState) -> {
if (!BlockUtils.canBreak(blockPos, blockState)) return;
if (!(blockState.getBlock() instanceof BedBlock)) return;
blocks.add(blockPosPool.get().set(blockPos));
});
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTickPost(TickEvent.Post event) {
boolean noBlocks = false;
for (BlockPos blockPos : blocks) {
if (!placeTickAround(blockPos)) {
noBlocks = true;
break;
}
}
if (noBlocks && isActive()) toggle();
}
class="c-keyword">public boolean placeTickAround(BlockPos block) {
for (BlockPos b : new BlockPos[]{
block.above(), block.west(),
block.north(), block.south(),
block.east(), block.below()}) {
if (cap >= bpt.get()) {
cap = 0;
return true;
}
if (blockTypes.get().contains(mc.level.getBlockState(b).getBlock())) return true;
FindItemResult findBlock = InvUtils.findInHotbar((item) -> {
if (!(item.getItem() instanceof BlockItem)) return false;
BlockItem bitem = (BlockItem)item.getItem();
return blockTypes.get().contains(bitem.getBlock());
});
if (!findBlock.found()) {
error(class="c-str">"No specified blocks found. Disabling.");
return false;
}
if (BlockUtils.place(b, findBlock, rotate.get(), 10, false)) {
cap++;
if (cap >= bpt.get()) {
return true;
}
}
}
cap = 0;
return true;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.ItemListSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.gui.screens.recipebook.RecipeCollection;
import net.minecraft.world.inventory.ClickType;
import net.minecraft.world.inventory.CraftingMenu;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.display.RecipeDisplay;
import net.minecraft.world.item.crafting.display.RecipeDisplayEntry;
import net.minecraft.world.item.crafting.display.SlotDisplayContext;
import java.util.List;
class="c-keyword">public class AutoCraft extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<List<Item>> items = sgGeneral.add(new ItemListSetting.Builder()
.name(class="c-str">"items")
.description(class="c-str">"Items you want to get crafted.")
.defaultValue(List.of())
.build()
);
class="c-keyword">private final Setting<Boolean> antiDesync = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"anti-desync")
.description(class="c-str">"Try to prevent inventory desync.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> craftAll = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"craft-all")
.description(class="c-str">"Crafts maximum possible amount amount per craft (shift-clicking)")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> drop = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"drop")
.description(class="c-str">"Automatically drops crafted items (useful for when not enough inventory space)")
.defaultValue(false)
.build()
);
class="c-keyword">public AutoCraft() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-craft", class="c-str">"Automatically crafts items.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
if (!Utils.canUpdate() || mc.gameMode == null) return;
if (items.get().isEmpty()) return;
if (!(mc.player.containerMenu instanceof CraftingMenu)) return;
if (antiDesync.get())
mc.player.getInventory().tick();
class="c-comment">// Danke schön GhostTypes
class="c-comment">// https://github.com/GhostTypes/orion/blob/main/src/main/java/me/ghosttypes/orion/modules/main/AutoBedCraft.java
CraftingMenu currentScreenHandler = (CraftingMenu) mc.player.containerMenu;
List<Item> itemList = items.get();
List<RecipeCollection> recipeResultCollectionList = mc.player.getRecipeBook().getCollections();
for (RecipeCollection recipeResultCollection : recipeResultCollectionList) {
class="c-comment">// Get craftable recipes only
List<RecipeDisplayEntry> craftRecipes = recipeResultCollection.getSelectedRecipes(RecipeCollection.CraftableStatus.CRAFTABLE);
for (RecipeDisplayEntry recipe : craftRecipes) {
RecipeDisplay recipeDisplay = recipe.display();
List<ItemStack> resultStacks = recipeDisplay.result().resolveForStacks(SlotDisplayContext.fromLevel(mc.level));
for (ItemStack resultStack : resultStacks) {
class="c-comment">// Check if the result item is in the item list
if (!itemList.contains(resultStack.getItem())) continue;
mc.gameMode.handlePlaceRecipe(currentScreenHandler.containerId, recipe.id(), craftAll.get());
mc.gameMode.handleInventoryMouseClick(currentScreenHandler.containerId, 0, 1,
drop.get() ? ClickType.THROW : ClickType.QUICK_MOVE, mc.player);
}
}
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import java.util.List;
class="c-keyword">public class AutoDrop extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<List<Item>> items = sgGeneral.add(new ItemListSetting.Builder()
.name(class="c-str">"items")
.description(class="c-str">"Items to automatically drop from your inventory.")
.defaultValue(List.of())
.build()
);
class="c-keyword">private final Setting<Boolean> dropHotbar = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"drop-hotbar")
.description(class="c-str">"Also drop matching items from your hotbar.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"delay")
.description(class="c-str">"Delay in ticks between each drop check.")
.defaultValue(10)
.min(1)
.sliderMax(40)
.build()
);
class="c-keyword">private int timer = 0;
class="c-keyword">public AutoDrop() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-drop", class="c-str">"Automatically drops selected items from your inventory.");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
timer = 0;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (mc.player == null) return;
if (timer > 0) {
timer--;
return;
}
timer = delay.get();
int startSlot = dropHotbar.get() ? 0 : 9;
for (int i = startSlot; i < 36; i++) {
ItemStack stack = mc.player.getInventory().getItem(i);
if (stack == null || stack.isEmpty() || !items.get().contains(stack.getItem())) continue;
InvUtils.drop().slot(i);
return;
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.game.OpenScreenEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.utils.network.MeteorExecutor;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.EnchantmentMenu;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import java.util.List;
import java.util.Objects;
class="c-keyword">public class AutoEnchant extends meteordevelopment.meteorclient.systems.modules.Module {
class="c-keyword">public final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"delay")
.description(class="c-str">"The tick delay between enchanting items.")
.defaultValue(50)
.sliderMax(500)
.min(0)
.build()
);
class="c-keyword">private final Setting<Integer> level = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"level")
.description(class="c-str">"Choose enchantment levels 1-3")
.defaultValue(3)
.max(3)
.min(1)
.build()
);
class="c-keyword">private final Setting<Boolean> drop = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"drop")
.description(class="c-str">"Automatically drops enchanted items (useful for when not enough inventory space)")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<List<Item>> itemWhitelist = sgGeneral.add(new ItemListSetting.Builder()
.name(class="c-str">"item-whitelist")
.description(class="c-str">"Item that require enchantment.")
.defaultValue()
.filter(item -> item.equals(Items.BOOK) || new ItemStack(item).isEnchantable())
.build()
);
class="c-keyword">public AutoEnchant() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-enchant", class="c-str">"Automatically enchanting items.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onOpenScreen(OpenScreenEvent event) {
if (!(Objects.requireNonNull(mc.player).containerMenu instanceof EnchantmentMenu))
return;
MeteorExecutor.execute(this::autoEnchant);
}
class="c-keyword">private void autoEnchant() {
if (!(Objects.requireNonNull(mc.player).containerMenu instanceof EnchantmentMenu handler))
return;
if (mc.player.experienceLevel < 30) {
info(class="c-str">"You don't have enough experience levels");
return;
}
while (getEmptySlotCount(handler) > 2 || drop.get()) {
if (!(mc.player.containerMenu instanceof EnchantmentMenu)) {
info(class="c-str">"Enchanting table is closed.");
break;
}
if (handler.getGoldCount() < level.get() && !fillLapisItem()) {
info(class="c-str">"Lapis lazuli is not found.");
break;
}
if (!fillCanEnchantItem()) {
info(class="c-str">"No items found to enchant.");
break;
}
Objects.requireNonNull(mc.gameMode).handleInventoryButtonClick(handler.containerId, level.get() - 1);
if (getEmptySlotCount(handler) > 2) {
InvUtils.shiftClick().slotId(0);
} else if (drop.get() && handler.getSlot(0).hasItem()) {
class="c-comment">// I don't know why an exception LegacyRandomSource is thrown here,
class="c-comment">// so I used the main thread to drop items.
mc.execute(() -> InvUtils.drop().slotId(0));
}
class="c-comment">/*
Although the description here indicates that the tick is the unit,
the actual delay is not the tick unit,
but it does not affect the normal operation in the game.
Perhaps we can ignore it
*/
try {
Thread.sleep(delay.get());
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}
class="c-keyword">private boolean fillCanEnchantItem() {
FindItemResult res = InvUtils.find(stack -> itemWhitelist.get().contains(stack.getItem()));
if (!res.found()) return false;
InvUtils.shiftClick().slot(res.slot());
return true;
}
class="c-keyword">private boolean fillLapisItem() {
FindItemResult res = InvUtils.find(Items.LAPIS_LAZULI);
if (!res.found()) return false;
InvUtils.shiftClick().slot(res.slot());
return true;
}
class="c-keyword">private int getEmptySlotCount(AbstractContainerMenu handler) {
int emptySlotCount = 0;
for (int i = 0; i < handler.slots.size(); i++) {
if (!handler.slots.get(i).getItem().getItem().equals(Items.AIR))
continue;
emptySlotCount++;
}
return emptySlotCount;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.meteorclient.utils.player.Rotations;
import meteordevelopment.meteorclient.utils.world.BlockIterator;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.network.protocol.game.ServerboundPlayerActionPacket;
import net.minecraft.resources.Identifier;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import java.util.concurrent.atomic.AtomicInteger;
class="c-keyword">public class AutoExtinguish extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.createGroup(class="c-str">"Extinguish Fire around you");
class="c-keyword">private final SettingGroup sgBucket = settings.createGroup(class="c-str">"Extinguish yourself");
class="c-keyword">private final Setting<Boolean> extinguish = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"extinguish")
.description(class="c-str">"Automatically extinguishes fire around you.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Integer> horizontalRadius = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"horizontal-radius")
.description(class="c-str">"Horizontal radius in which to search for fire.")
.defaultValue(4)
.min(0)
.sliderMax(6)
.build()
);
class="c-keyword">private final Setting<Integer> verticalRadius = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"vertical-radius")
.description(class="c-str">"Vertical radius in which to search for fire.")
.defaultValue(4)
.min(0)
.sliderMax(6)
.build()
);
class="c-keyword">private final Setting<Integer> maxBlockPerTick = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"block-per-tick")
.description(class="c-str">"Maximum amount of Blocks to extinguish per tick.")
.defaultValue(5)
.min(1)
.sliderMax(50)
.build()
);
class="c-keyword">private final Setting<Boolean> waterBucket = sgBucket.add(new BoolSetting.Builder()
.name(class="c-str">"water")
.description(class="c-str">"Automatically places water when you are on fire (and don't have fire resistance).")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> center = sgBucket.add(new BoolSetting.Builder()
.name(class="c-str">"center")
.description(class="c-str">"Automatically centers you when placing water.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> onGround = sgBucket.add(new BoolSetting.Builder()
.name(class="c-str">"on-ground")
.description(class="c-str">"Only place when you are on ground.")
.defaultValue(false)
.build()
);
class="c-keyword">private boolean hasPlacedWater = false;
class="c-keyword">private BlockPos blockPos = null;
class="c-keyword">private boolean doesWaterBucketWork = true;
class="c-keyword">private static final MobEffect FIRE_RESISTANCE = BuiltInRegistries.MOB_EFFECT.getValue(Identifier.parse(class="c-str">"fire_resistance"));
class="c-keyword">public AutoExtinguish() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-extinguish", class="c-str">"Automatically extinguishes fire around you");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (mc.level.dimension() == Level.NETHER) {
if (doesWaterBucketWork) {
warning(class="c-str">"Water Buckets don't work in this dimension!");
doesWaterBucketWork = false;
}
} else {
if (!doesWaterBucketWork) {
warning(class="c-str">"Enabled Water Buckets!");
doesWaterBucketWork = true;
}
}
if (onGround.get() && !mc.player.onGround()) {
return;
}
if (waterBucket.get() && doesWaterBucketWork) {
if (hasPlacedWater) {
final int slot = findSlot(Items.BUCKET);
blockPos = mc.player.blockPosition();
place(slot);
hasPlacedWater = false;
} else if (!mc.player.hasEffect(BuiltInRegistries.MOB_EFFECT.wrapAsHolder(FIRE_RESISTANCE)) && mc.player.isOnFire()) {
blockPos = mc.player.blockPosition();
final int slot = findSlot(Items.WATER_BUCKET);
if (mc.level.getBlockState(blockPos).getBlock() == Blocks.FIRE || mc.level.getBlockState(blockPos).getBlock() == Blocks.SOUL_FIRE) {
float yaw = mc.gameRenderer.getMainCamera().yRot() % 360;
float pitch = mc.gameRenderer.getMainCamera().xRot() % 360;
if (center.get()) {
PlayerUtils.centerPlayer();
}
Rotations.rotate(yaw, 90);
mc.getConnection().send(new ServerboundPlayerActionPacket(ServerboundPlayerActionPacket.Action.START_DESTROY_BLOCK, blockPos, Direction.UP));
mc.player.swing(InteractionHand.MAIN_HAND);
mc.getConnection().send(new ServerboundPlayerActionPacket(ServerboundPlayerActionPacket.Action.STOP_DESTROY_BLOCK, blockPos, Direction.UP));
Rotations.rotate(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.level.getBlockState(blockPos).getBlock() == Blocks.SOUL_FIRE) {
extinguishFire(blockPos);
blocksPerTick.getAndIncrement();
}
}
});
}
}
class="c-keyword">private void place(int slot) {
if (slot != -1) {
final int preSlot = mc.player.getInventory().getSelectedSlot();
if (center.get()) {
PlayerUtils.centerPlayer();
}
mc.player.getInventory().setSelectedSlot(slot);
float yaw = mc.gameRenderer.getMainCamera().yRot() % 360;
float pitch = mc.gameRenderer.getMainCamera().xRot() % 360;
Rotations.rotate(yaw, 90);
mc.gameMode.useItem(mc.player, InteractionHand.MAIN_HAND);
mc.player.getInventory().setSelectedSlot(preSlot);
Rotations.rotate(yaw, pitch);
}
}
class="c-keyword">private void extinguishFire(BlockPos blockPos) {
mc.getConnection().send(new ServerboundPlayerActionPacket(ServerboundPlayerActionPacket.Action.START_DESTROY_BLOCK, blockPos, net.minecraft.core.Direction.UP));
mc.player.swing(InteractionHand.MAIN_HAND);
mc.getConnection().send(new ServerboundPlayerActionPacket(ServerboundPlayerActionPacket.Action.STOP_DESTROY_BLOCK, blockPos, net.minecraft.core.Direction.UP));
}
class="c-keyword">private int findSlot(Item item) {
int slot = -1;
for (int i = 0; i < 9; i++) {
ItemStack block = mc.player.getInventory().getItem(i);
if (block.getItem() == item) {
slot = i;
break;
}
}
return slot;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.utils.WorldUtils;
import meteordevelopment.meteorclient.events.entity.player.BreakBlockEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.misc.Pool;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.utils.world.BlockIterator;
import meteordevelopment.meteorclient.utils.world.BlockUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.tags.FluidTags;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.item.HoeItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.AzaleaBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.CocoaBlock;
import net.minecraft.world.level.block.CropBlock;
import net.minecraft.world.level.block.FarmBlock;
import net.minecraft.world.level.block.MushroomBlock;
import net.minecraft.world.level.block.NetherWartBlock;
import net.minecraft.world.level.block.PitcherCropBlock;
import net.minecraft.world.level.block.SaplingBlock;
import net.minecraft.world.level.block.SoulSandBlock;
import net.minecraft.world.level.block.StemBlock;
import net.minecraft.world.level.block.SweetBerryBushBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3;
import java.util.*;
class="c-keyword">public class AutoFarm extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgTill = settings.createGroup(class="c-str">"Till");
class="c-keyword">private final SettingGroup sgHarvest = settings.createGroup(class="c-str">"Harvest");
class="c-keyword">private final SettingGroup sgPlant = settings.createGroup(class="c-str">"Plant");
class="c-keyword">private final SettingGroup sgBonemeal = settings.createGroup(class="c-str">"Bonemeal");
class="c-keyword">private final Map<BlockPos, Item> replantMap = new HashMap<>();
class="c-keyword">private final Setting<Integer> range = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"range")
.description(class="c-str">"Auto farm range.")
.defaultValue(4)
.min(1)
.build()
);
class="c-keyword">private final Setting<Integer> bpt = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"blocks-per-tick")
.description(class="c-str">"Amount of operations that can be applied in one tick.")
.min(1)
.defaultValue(1)
.build()
);
class="c-keyword">private final Setting<Boolean> rotate = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"rotate")
.description(class="c-str">"Whether or not to rotate towards block.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> till = sgTill.add(new BoolSetting.Builder()
.name(class="c-str">"till")
.description(class="c-str">"Turn nearby dirt into farmland.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> moist = sgTill.add(new BoolSetting.Builder()
.name(class="c-str">"moist")
.description(class="c-str">"Only till moist blocks.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> harvest = sgHarvest.add(new BoolSetting.Builder()
.name(class="c-str">"harvest")
.description(class="c-str">"Harvest crops.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<List<Block>> harvestBlocks = sgHarvest.add(new BlockListSetting.Builder()
.name(class="c-str">"harvest-blocks")
.description(class="c-str">"Which crops to harvest.")
.defaultValue()
.filter(this::harvestFilter)
.build()
);
class="c-keyword">private final Setting<Boolean> plant = sgPlant.add(new BoolSetting.Builder()
.name(class="c-str">"plant")
.description(class="c-str">"Plant crops.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<List<Item>> plantItems = sgPlant.add(new ItemListSetting.Builder()
.name(class="c-str">"plant-items")
.description(class="c-str">"Which crops to plant.")
.defaultValue()
.filter(this::plantFilter)
.build()
);
class="c-keyword">private final Setting<Boolean> onlyReplant = sgPlant.add(new BoolSetting.Builder()
.name(class="c-str">"only-replant")
.description(class="c-str">"Only replant planted crops.")
.defaultValue(true)
.onChanged(b -> replantMap.clear())
.build()
);
class="c-keyword">private final Setting<Boolean> bonemeal = sgBonemeal.add(new BoolSetting.Builder()
.name(class="c-str">"bonemeal")
.description(class="c-str">"Bonemeal crops.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<List<Block>> bonemealBlocks = sgBonemeal.add(new BlockListSetting.Builder()
.name(class="c-str">"bonemeal-blocks")
.description(class="c-str">"Which crops to bonemeal.")
.defaultValue()
.filter(this::bonemealFilter)
.build()
);
class="c-keyword">private final Pool<BlockPos.MutableBlockPos> blockPosPool = new Pool<>(BlockPos.MutableBlockPos::new);
class="c-keyword">private final List<BlockPos.MutableBlockPos> blocks = new ArrayList<>();
int actions = 0;
class="c-keyword">public AutoFarm() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-farm", class="c-str">"All-in-one farm utility.");
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
replantMap.clear();
}
class="c-annotation">@EventHandler
class="c-keyword">private void onBreakBlock(BreakBlockEvent event) {
BlockState state = mc.level.getBlockState(event.blockPos);
Block block = state.getBlock();
if (onlyReplant.get()) {
Item item = null;
if (block == Blocks.WHEAT) item = Items.WHEAT_SEEDS;
else if (block == Blocks.CARROTS) item = Items.CARROT;
else if (block == Blocks.POTATOES) item = Items.POTATO;
else if (block == Blocks.BEETROOTS) item = Items.BEETROOT_SEEDS;
else if (block == Blocks.NETHER_WART) item = Items.NETHER_WART;
else if (block == Blocks.PITCHER_CROP) item = Items.PITCHER_POD;
else if (block == Blocks.TORCHFLOWER) item = Items.TORCHFLOWER_SEEDS;
if (item != null) replantMap.put(event.blockPos, item);
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
actions = 0;
BlockIterator.register(range.get(), range.get(), (pos, state) -> {
if (mc.player.getEyePosition().distanceTo(Vec3.atCenterOf(pos)) <= range.get())
blocks.add(blockPosPool.get().set(pos));
});
BlockIterator.after(() -> {
blocks.sort(Comparator.comparingDouble(value -> mc.player.getEyePosition().distanceTo(Vec3.atCenterOf(value))));
for (BlockPos pos : blocks) {
BlockState state = mc.level.getBlockState(pos);
Block block = state.getBlock();
if (till(pos, block) || harvest(pos, state, block) || plant(pos, block) || bonemeal(pos, state, block))
actions++;
if (actions >= bpt.get()) break;
}
for (BlockPos.MutableBlockPos blockPos : blocks) blockPosPool.free(blockPos);
blocks.clear();
});
}
class="c-keyword">private boolean till(BlockPos pos, Block block) {
if (!till.get()) return false;
boolean moist = !this.moist.get() || isWaterNearby(mc.level, pos);
boolean tillable = block == Blocks.GRASS_BLOCK ||
block == Blocks.DIRT_PATH ||
block == Blocks.DIRT ||
block == Blocks.COARSE_DIRT ||
block == Blocks.ROOTED_DIRT;
if (moist && tillable && mc.level.getBlockState(pos.above()).isAir()) {
FindItemResult hoe = InvUtils.findInHotbar(itemStack -> itemStack.getItem() instanceof HoeItem);
return WorldUtils.interact(pos, hoe, rotate.get());
}
return false;
}
class="c-keyword">private boolean harvest(BlockPos pos, BlockState state, Block block) {
if (!harvest.get()) return false;
if (!harvestBlocks.get().contains(block)) return false;
if (!isMature(state, block)) return false;
if (block instanceof SweetBerryBushBlock)
mc.gameMode.useItemOn(mc.player, InteractionHand.MAIN_HAND, new BlockHitResult(Utils.vec3d(pos), Direction.UP, pos, false));
else {
BlockUtils.breakBlock(pos, true);
}
return true;
}
class="c-keyword">private boolean plant(BlockPos pos, Block block) {
if (!plant.get()) return false;
if (!mc.level.isEmptyBlock(pos.above())) return false;
FindItemResult findItemResult = null;
if (onlyReplant.get()) {
for (BlockPos replantPos : replantMap.keySet()) {
if (replantPos.equals(pos.above())) {
findItemResult = InvUtils.find(replantMap.get(replantPos));
replantMap.remove(replantPos);
break;
}
}
} else if (block instanceof FarmBlock) {
findItemResult = InvUtils.find(itemStack -> {
Item item = itemStack.getItem();
return item != Items.NETHER_WART && plantItems.get().contains(item);
});
} else if (block instanceof SoulSandBlock) {
findItemResult = InvUtils.find(itemStack -> {
Item item = itemStack.getItem();
return item == Items.NETHER_WART && plantItems.get().contains(Items.NETHER_WART);
});
}
if (findItemResult != null && findItemResult.found()) {
BlockUtils.place(pos.above(), findItemResult, rotate.get(), -100, false);
return true;
}
return false;
}
class="c-keyword">private boolean bonemeal(BlockPos pos, BlockState state, Block block) {
if (!bonemeal.get()) return false;
if (!bonemealBlocks.get().contains(block)) return false;
if (isMature(state, block)) return false;
FindItemResult bonemeal = InvUtils.findInHotbar(Items.BONE_MEAL);
return WorldUtils.interact(pos, bonemeal, rotate.get());
}
class="c-keyword">private boolean isWaterNearby(LevelReader world, BlockPos pos) {
for (BlockPos blockPos : BlockPos.betweenClosed(pos.offset(-4, 0, -4), pos.offset(4, 1, 4))) {
if (world.getFluidState(blockPos).is(FluidTags.WATER)) return true;
}
return false;
}
class="c-keyword">private boolean isMature(BlockState state, Block block) {
if (block instanceof CropBlock cropBlock) {
return cropBlock.isMaxAge(state);
} else if (block instanceof CocoaBlock cocoaBlock) {
return state.getValue(cocoaBlock.AGE) >= 2;
} else if (block instanceof StemBlock) {
return state.getValue(StemBlock.AGE) == StemBlock.MAX_AGE;
} else if (block instanceof SweetBerryBushBlock sweetBerryBushBlock) {
return state.getValue(sweetBerryBushBlock.AGE) >= 2;
} else if (block instanceof NetherWartBlock netherWartBlock) {
return state.getValue(netherWartBlock.AGE) >= 3;
} else if (block instanceof PitcherCropBlock pitcherCropBlock) {
return state.getValue(pitcherCropBlock.AGE) >= 4;
} else if (block instanceof SaplingBlock) {
return false;
}
return true;
}
class="c-keyword">private boolean bonemealFilter(Block block) {
return block instanceof CropBlock ||
block instanceof StemBlock ||
block instanceof MushroomBlock ||
block instanceof AzaleaBlock ||
block instanceof SaplingBlock ||
block == Blocks.COCOA ||
block == Blocks.SWEET_BERRY_BUSH ||
block == Blocks.PITCHER_CROP ||
block == Blocks.TORCHFLOWER;
}
class="c-keyword">private boolean harvestFilter(Block block) {
return block instanceof CropBlock ||
block == Blocks.PUMPKIN ||
block == Blocks.MELON ||
block == Blocks.NETHER_WART ||
block == Blocks.SWEET_BERRY_BUSH ||
block == Blocks.COCOA ||
block == Blocks.PITCHER_CROP ||
block == Blocks.TORCHFLOWER;
}
class="c-keyword">private boolean plantFilter(Item item) {
return item == Items.WHEAT_SEEDS ||
item == Items.CARROT ||
item == Items.POTATO ||
item == Items.BEETROOT_SEEDS ||
item == Items.PUMPKIN_SEEDS ||
item == Items.MELON_SEEDS ||
item == Items.NETHER_WART ||
item == Items.PITCHER_POD ||
item == Items.TORCHFLOWER_SEEDS;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.game.OpenScreenEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.network.MeteorExecutor;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.Holder;
import net.minecraft.core.component.DataComponents;
import net.minecraft.resources.ResourceKey;
import net.minecraft.tags.EnchantmentTags;
import net.minecraft.world.inventory.GrindstoneMenu;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.enchantment.ItemEnchantments;
import java.util.List;
import java.util.Set;
class="c-keyword">public class AutoGrind extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"delay")
.description(class="c-str">"The tick delay between grinding items.")
.defaultValue(50)
.sliderMax(500)
.min(0)
.build()
);
class="c-keyword">private final Setting<List<Item>> itemBlacklist = sgGeneral.add(new ItemListSetting.Builder()
.name(class="c-str">"item-blacklist")
.description(class="c-str">"Items that should be ignored.")
.defaultValue()
.filter(Item -> Item.components().get(DataComponents.DAMAGE) != null)
.build()
);
class="c-keyword">private final Setting<Set<ResourceKey<Enchantment>>> enchantmentBlacklist = sgGeneral.add(new EnchantmentListSetting.Builder()
.name(class="c-str">"enchantment-blacklist")
.description(class="c-str">"Enchantments that should be ignored.")
.defaultValue()
.build()
);
class="c-keyword">public AutoGrind() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-grind", class="c-str">"Automatically disenchants items.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onOpenScreen(OpenScreenEvent event) {
if (!(mc.player.containerMenu instanceof GrindstoneMenu))
return;
MeteorExecutor.execute(() -> {
for (int i = 0; i <= mc.player.getInventory().getContainerSize(); i++) {
if (canGrind(mc.player.getInventory().getItem(i))) {
try {
Thread.sleep(delay.get());
} catch (InterruptedException e) {
e.printStackTrace();
}
if (mc.screen == null) break;
InvUtils.shiftClick().slot(i);
InvUtils.move().fromId(2).to(i);
}
}
});
}
class="c-keyword">private boolean canGrind(ItemStack stack) {
if (itemBlacklist.get().contains(stack.getItem())) return false;
ItemEnchantments enchantments = EnchantmentHelper.getEnchantmentsForCrafting(stack);
int availEnchs = 0;
for (Holder<Enchantment> enchantment : enchantments.keySet()) {
class="c-comment">// grindstones cant remove curses
if (enchantment.is(EnchantmentTags.CURSE)) continue;
availEnchs++;
if (enchantment.unwrapKey().map(enchantmentBlacklist.get()::contains).orElse(false))
return false;
}
return !enchantments.isEmpty() && availEnchs > 0;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.settings.StringMapSetting;
import dev.voidaddons.utils.RejectsUtils;
import meteordevelopment.meteorclient.events.game.GameJoinedEvent;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.gui.GuiTheme;
import meteordevelopment.meteorclient.gui.widgets.WWidget;
import meteordevelopment.meteorclient.gui.widgets.containers.WHorizontalList;
import meteordevelopment.meteorclient.gui.widgets.pressable.WButton;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.protocol.game.ServerboundChatCommandPacket;
import java.util.*;
class="c-keyword">public class AutoLogin extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"delay")
.description(class="c-str">"Delay in ms before executing the command.")
.defaultValue(1000)
.min(0)
.sliderMax(10000)
.build()
);
class="c-keyword">private final Setting<Boolean> smart = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"smart")
.description(class="c-str">"Auto add the entries.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Map<String, String>> commands = sgGeneral.add(new StringMapSetting.Builder()
.name(class="c-str">"commands")
.description(class="c-str">"Server and commands. (* for universal)")
.defaultValue(new LinkedHashMap<>() {{
put(class="c-str">"localhost", class="c-str">"/login 123456");
}})
.build()
);
class="c-keyword">private final Timer timer = new Timer();
class="c-keyword">public AutoLogin() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-login", class="c-str">"Runs command when joining specified server.");
runInMainMenu = true;
}
class="c-annotation">@Override
class="c-keyword">public WWidget getWidget(GuiTheme theme) {
WHorizontalList l = theme.horizontalList();
WButton btn = l.add(theme.button(class="c-str">"Random generate password")).widget();
btn.action = () -> {
String password = RejectsUtils.getRandomPassword(16);
MutableComponent text = Component.literal(ChatFormatting.BOLD + class="c-str">"Click here to register securely.");
text.setStyle(text.getStyle().withClickEvent(new net.minecraft.network.chat.ClickEvent.RunCommand(String.format(class="c-str">"/register %s %s", password, password))));
info(text);
};
return l;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onGameJoined(GameJoinedEvent event) {
if (!isActive()) return;
String command = commands.get().getOrDefault(class="c-str">"*", commands.get().get(Utils.getWorldName()));
if (command != null) {
timer.schedule(new TimerTask() {
class="c-annotation">@Override
class="c-keyword">public void run() {
if (mc.player != null) ChatUtils.sendPlayerMsg(command);
}
}, delay.get());
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacketSent(PacketEvent.Send event) {
if (!smart.get()) return;
if (event.packet instanceof ServerboundChatCommandPacket packet) {
String command = packet.command();
List<String> hint = Arrays.asList(class="c-str">"reg", class="c-str">"register", class="c-str">"l", class="c-str">"login", class="c-str">"log");
String[] cmds = command.split(class="c-str">" ");
if (cmds.length >= 2 && hint.contains(cmds[0])) {
commands.get().put(Utils.getWorldName(), class="c-str">"/login " + cmds[1]);
}
}
}
}
package dev.voidaddons.modules;
class="c-comment">//import baritone.api.BaritoneAPI;
import dev.voidaddons.VoidAddonsAddon;
import baritone.api.BaritoneAPI;
import java.util.ArrayList;
import java.util.List;
import meteordevelopment.meteorclient.events.entity.player.ItemUseCrosshairTargetEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.pathing.BaritoneUtils;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.combat.AnchorAura;
import meteordevelopment.meteorclient.systems.modules.combat.BedAura;
import meteordevelopment.meteorclient.systems.modules.combat.CrystalAura;
import meteordevelopment.meteorclient.systems.modules.combat.KillAura;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.player.Rotations;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.Holder;
import net.minecraft.core.component.DataComponents;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.world.effect.MobEffect;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.alchemy.PotionContents;
class="c-keyword">public class AutoPot extends Module {
class="c-annotation">@SuppressWarnings(class="c-str">"unchecked")
class="c-keyword">private static final Class<? extends Module>[] AURAS = new Class[]{KillAura.class, CrystalAura.class, AnchorAura.class, BedAura.class};
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<List<MobEffect>> usablePotions = sgGeneral.add(new StatusEffectListSetting.Builder()
.name(class="c-str">"potions-to-use")
.description(class="c-str">"The potions to use.")
.defaultValue(
MobEffects.INSTANT_HEALTH.value(),
MobEffects.STRENGTH.value(),
MobEffects.BAD_OMEN.value()
)
.build()
);
class="c-keyword">private final Setting<Boolean> useSplashPots = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"splash-potions")
.description(class="c-str">"Allow the use of splash potions")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Integer> health = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"health")
.description(class="c-str">"If health goes below this point, Healing potions will trigger.")
.defaultValue(15)
.min(0)
.sliderMax(20)
.build()
);
class="c-keyword">private final Setting<Boolean> pauseAuras = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"pause-auras")
.description(class="c-str">"Pauses all auras when eating.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> pauseBaritone = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"pause-baritone")
.description(class="c-str">"Pause baritone when eating.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> lookDown = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"rotate")
.description(class="c-str">"Forces you to rotate downwards when throwing splash potions.")
.defaultValue(true)
.build()
);
class="c-keyword">private int slot, prevSlot;
class="c-keyword">private boolean drinking, splashing;
class="c-keyword">private final List<Class<? extends Module>> wasAura = new ArrayList<>();
class="c-keyword">private boolean wasBaritone;
class="c-keyword">public AutoPot() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-pot", class="c-str">"Automatically Drinks Potions");
}
class="c-comment">// TODO : Add option to scan whole inv - then either swap item to hotbar if full or just place in first empty slot
class="c-comment">// Note, Sometimes two or multiple splash pots are thrown - since the effect is not instant, the second pot is thrown before the effect of first is applied
class="c-comment">// Need to use the splash bool that is assigned but never used
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
stopPotionUsage();
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (mc.player.isUsingItem()) return;
for (MobEffect statusEffect : usablePotions.get()) {
Holder<MobEffect> registryEntry = BuiltInRegistries.MOB_EFFECT.wrapAsHolder(statusEffect);
if (!mc.player.hasEffect(registryEntry)) {
slot = potionSlot(statusEffect);
if (slot != -1) {
if (registryEntry == MobEffects.INSTANT_HEALTH && ShouldDrinkHealth()) {
startPotionUse();
return;
} else if (registryEntry == MobEffects.INSTANT_HEALTH) {
return;
}
startPotionUse();
}
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onItemUseCrosshairTarget(ItemUseCrosshairTargetEvent event) {
if (drinking) event.target = null;
}
class="c-keyword">private void setPressed(boolean pressed) {
mc.options.keyUse.setDown(pressed);
}
class="c-keyword">private void drink() {
changeSlot(slot);
setPressed(true);
if (!mc.player.isUsingItem()) Utils.rightClick();
drinking = true;
}
class="c-keyword">private void splash() {
changeSlot(slot);
setPressed(true);
splashing = true;
}
class="c-keyword">private void stopPotionUsage() {
changeSlot(prevSlot);
setPressed(false);
drinking = false;
splashing = false;
if (pauseAuras.get()) {
for (Class<? extends Module> klass : AURAS) {
Module module = Modules.get().get(klass);
if (wasAura.contains(klass) && !module.isActive()) {
module.toggle();
}
}
}
if (pauseBaritone.get() && wasBaritone) {
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute(class="c-str">"resume");
}
}
class="c-keyword">private double trueHealth() {
assert mc.player != null;
return mc.player.getHealth();
}
class="c-keyword">private void changeSlot(int slot) {
mc.player.getInventory().setSelectedSlot(slot);
this.slot = slot;
}
class="c-comment">//Sunk 7 hours into these checks, if i die blame checks
class="c-keyword">private int potionSlot(MobEffect statusEffect) {
int slot = -1;
for (int i = 0; i < 9; i++) {
ItemStack stack = mc.player.getInventory().getItem(i);
if (stack.isEmpty()) continue;
if (isOminousBottle(stack)) {
if (statusEffect == MobEffects.BAD_OMEN.value()) {
slot = i;
break;
}
continue;
}
boolean isPotion = stack.getItem() == Items.POTION;
boolean isSplashPotion = stack.getItem() == Items.SPLASH_POTION;
if (!isPotion && !(isSplashPotion && useSplashPots.get())) continue;
PotionContents effects = stack.getComponents().getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY);
for (MobEffectInstance effectInstance : effects.getAllEffects()) {
if (effectInstance.getDescriptionId().equals(statusEffect.getDescriptionId())) {
slot = i;
break;
}
}
if (slot != -1) break;
}
return slot;
}
class="c-keyword">private void startPotionUse() {
prevSlot = mc.player.getInventory().getSelectedSlot();
ItemStack stack = mc.player.getInventory().getItem(slot);
boolean isSplashPotion = stack.getItem() == Items.SPLASH_POTION;
if (isSplashPotion && useSplashPots.get()) {
if (lookDown.get()) {
Rotations.rotate(mc.player.getYRot(), 90);
splash();
} else {
splash();
}
} else {
drink();
}
wasAura.clear();
if (pauseAuras.get()) {
for (Class<? extends Module> klass : AURAS) {
Module module = Modules.get().get(klass);
if (module.isActive()) {
wasAura.add(klass);
module.toggle();
}
}
}
wasBaritone = false;
if (BaritoneUtils.IS_AVAILABLE) {
if (pauseBaritone.get() && BaritoneAPI.getProvider().getPrimaryBaritone().getPathingBehavior().isPathing()) {
wasBaritone = true;
BaritoneAPI.getProvider().getPrimaryBaritone().getCommandManager().execute(class="c-str">"pause");
}
}
}
class="c-keyword">private boolean isOminousBottle(ItemStack stack) {
return stack.getItem() == Items.OMINOUS_BOTTLE;
}
class="c-keyword">private boolean ShouldDrinkHealth() {
return trueHealth() < health.get();
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.gui.components.EditBox;
import net.minecraft.client.gui.screens.inventory.AnvilScreen;
import net.minecraft.core.component.DataComponents;
import net.minecraft.world.inventory.AnvilMenu;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.component.BundleContents;
import net.minecraft.world.item.component.ItemContainerContents;
import java.util.List;
class="c-keyword">public class AutoRename extends Module {
class="c-keyword">public enum ContainerType {
BOTH, BUNDLES, SHULKERS, NONE;
class="c-annotation">@Override
class="c-keyword">public String toString() {
return switch (this) {
case BOTH -> class="c-str">"Both";
case BUNDLES -> class="c-str">"Bundles";
case SHULKERS -> class="c-str">"Shulkers";
case NONE -> class="c-str">"None";
};
}
}
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgRename = settings.createGroup(class="c-str">"Rename");
class="c-keyword">private final SettingGroup sgLabelContainers = settings.createGroup(class="c-str">"Label Containers");
class="c-comment">// General
class="c-keyword">private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"delay")
.description(class="c-str">"How many ticks to wait between actions.")
.defaultValue(2)
.min(0)
.sliderMax(40)
.build()
);
class="c-comment">// Rename group
class="c-keyword">private final Setting<List<Item>> items = sgRename.add(new ItemListSetting.Builder()
.name(class="c-str">"items")
.description(class="c-str">"Items to rename.")
.defaultValue(List.of())
.build()
);
class="c-keyword">private final Setting<String> name = sgRename.add(new StringSetting.Builder()
.name(class="c-str">"name")
.description(class="c-str">"Name to apply to items. Leave blank to keep the default name.")
.defaultValue(class="c-str">"")
.build()
);
class="c-comment">// Label Containers group
class="c-keyword">private final Setting<ContainerType> containerType = sgLabelContainers.add(new EnumSetting.Builder<ContainerType>()
.name(class="c-str">"container-type")
.description(class="c-str">"Which container types to rename based on the first item inside them.")
.defaultValue(ContainerType.NONE)
.build()
);
class="c-keyword">public AutoRename() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-rename", class="c-str">"Automatically renames items at an anvil. Can also label shulkers and bundles based on their contents.");
}
class="c-keyword">private int delayLeft = 0;
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post ignoredEvent) {
if (mc.gameMode == null) return;
if (items.get().isEmpty() && containerType.get() == ContainerType.NONE) return;
if (!(mc.player.containerMenu instanceof AnvilMenu)) return;
if (delayLeft > 0) {
delayLeft--;
return;
} else {
delayLeft = delay.get();
}
var slot0 = mc.player.containerMenu.getSlot(0);
var slot1 = mc.player.containerMenu.getSlot(1);
var slot2 = mc.player.containerMenu.getSlot(2);
if (slot1.hasItem()) {
return; class="c-comment">// second anvil slot occupied
}
if (slot2.hasItem()) {
if (mc.player.experienceLevel >= 1) {
extractNamed();
}
} else {
if (slot0.hasItem()) {
renameItem(slot0.getItem());
} else {
populateAnvil();
}
}
}
class="c-keyword">private boolean isContainerTarget(ItemStack st) {
return switch (containerType.get()) {
case SHULKERS -> st.has(DataComponents.CONTAINER);
case BUNDLES -> st.has(DataComponents.BUNDLE_CONTENTS);
case BOTH -> st.has(DataComponents.CONTAINER) || st.has(DataComponents.BUNDLE_CONTENTS);
case NONE -> false;
};
}
class="c-keyword">private void renameItem(ItemStack s) {
String setname = isContainerTarget(s) ? getFirstItemName(s) : name.get();
if (!(mc.screen instanceof AnvilScreen)) {
error(class="c-str">"Not anvil screen");
toggle();
return;
}
var input = (EditBox) mc.screen.children().get(0);
input.setValue(setname);
}
class="c-keyword">private String getFirstItemName(ItemStack stack) {
ItemContainerContents container = stack.get(DataComponents.CONTAINER);
if (container != null) {
for (ItemStack item : container.nonEmptyItems()) {
return item.getHoverName().getString();
}
}
BundleContents bundle = stack.get(DataComponents.BUNDLE_CONTENTS);
if (bundle != null) {
for (ItemStack item : bundle.items()) {
return item.getHoverName().getString();
}
}
return class="c-str">"";
}
class="c-keyword">private void extractNamed() {
var inv = mc.player.containerMenu;
for (int i = 3; i < 38; i++) {
if (inv.getSlot(i).hasItem()) {
InvUtils.shiftClick().fromId(2).toId(i);
return;
}
}
}
class="c-keyword">private void populateAnvil() {
var inv = mc.player.containerMenu;
for (int i = 3; i < 38; i++) {
var sl = inv.getSlot(i);
if (!sl.hasItem()) continue;
var st = sl.getItem();
boolean hasCustomName = st.getComponents().has(DataComponents.CUSTOM_NAME);
boolean isRenameItem = items.get().contains(st.getItem()) &&
(name.get().isEmpty() ? hasCustomName : !hasCustomName);
boolean isContainerItem = isContainerTarget(st) && !getFirstItemName(st).isEmpty();
if (isRenameItem || (isContainerItem && !hasCustomName)) {
InvUtils.shiftClick().fromId(i).toId(0);
return;
}
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.DoubleSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.TamableAnimal;
import net.minecraft.world.entity.npc.villager.Villager;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.BaseEntityBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.CraftingTableBlock;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.HitResult;
import java.util.List;
class="c-keyword">public class AutoSoup extends Module {
class="c-keyword">private static final String desc = class="c-str">"Automatically eats soup when your health is low on some servers.";
class="c-keyword">public AutoSoup() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-soup", desc);
}
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">public final Setting<Double> health = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"health")
.description(class="c-str">"Eats a soup when your health reaches this value or falls below it.")
.defaultValue(6.5)
.min(0.5)
.sliderMin(0.5)
.sliderMax(9.5)
.build()
);
class="c-keyword">private int oldSlot = -1;
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
stopIfEating();
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
class="c-comment">// sort empty bowls
for (int i = 0; i < 36; i++) {
class="c-comment">// filter out non-bowl items and empty bowl slot
ItemStack stack = mc.player.getInventory().getItem(i);
if (stack == null || stack.getItem() != Items.BOWL || i == 9)
continue;
class="c-comment">// check if empty bowl slot contains a non-bowl item
ItemStack emptyBowlStack = mc.player.getInventory().getItem(9);
boolean swap = !emptyBowlStack.isEmpty()
&& emptyBowlStack.getItem() != Items.BOWL;
class="c-comment">// place bowl in empty bowl slot
InvUtils.click().slot(i < 9 ? 36 + i : i);
InvUtils.click().slot(9);
class="c-comment">// place non-bowl item from empty bowl slot in current slot
if (swap)
InvUtils.click().slot(i < 9 ? 36 + i : i);
}
class="c-comment">// search soup in hotbar
int soupInHotbar = findSoup(0, 9);
class="c-comment">// check if any soup was found
if (soupInHotbar != -1) {
class="c-comment">// check if player should eat soup
if (!shouldEatSoup()) {
stopIfEating();
return;
}
class="c-comment">// save old slot
if (oldSlot == -1)
oldSlot = mc.player.getInventory().getSelectedSlot();
class="c-comment">// set slot
mc.player.getInventory().setSelectedSlot(soupInHotbar);
class="c-comment">// eat soup
mc.options.keyUse.setDown(true);
mc.gameMode.useItem(mc.player, InteractionHand.MAIN_HAND);
return;
}
stopIfEating();
class="c-comment">// search soup in inventory
int soupInInventory = findSoup(9, 36);
class="c-comment">// move soup in inventory to hotbar
if (soupInInventory != -1)
InvUtils.quickSwap().slot(soupInInventory);
}
class="c-keyword">private int findSoup(int startSlot, int endSlot) {
List<Item> stews = List.of(Items.RABBIT_STEW, Items.MUSHROOM_STEW, Items.BEETROOT_SOUP);
for (int i = startSlot; i < endSlot; i++) {
ItemStack stack = mc.player.getInventory().getItem(i);
if (stack != null && stews.contains(stack.getItem()))
return i;
}
return -1;
}
class="c-keyword">private boolean shouldEatSoup() {
class="c-comment">// check health
if (mc.player.getHealth() > health.get() * 2F)
return false;
class="c-comment">// check for clickable objects
return !isClickable(mc.hitResult);
}
class="c-keyword">private boolean isClickable(HitResult hitResult) {
switch (hitResult) {
case null -> {
return false;
}
case EntityHitResult entityHitResult -> {
Entity entity = ((EntityHitResult) mc.hitResult).getEntity();
return entity instanceof Villager
|| entity instanceof TamableAnimal;
}
case BlockHitResult blockHitResult -> {
BlockPos pos = ((BlockHitResult) mc.hitResult).getBlockPos();
if (pos == null)
return false;
Block block = mc.level.getBlockState(pos).getBlock();
return block instanceof BaseEntityBlock
|| block instanceof CraftingTableBlock;
}
default -> {
}
}
return false;
}
class="c-keyword">private void stopIfEating() {
class="c-comment">// check if eating
if (oldSlot == -1)
return;
class="c-comment">// stop eating
mc.options.keyUse.setDown(false);
class="c-comment">// reset slot
mc.player.getInventory().setSelectedSlot(oldSlot);
oldSlot = -1;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.misc.Pool;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.meteorclient.utils.player.Rotations;
import meteordevelopment.meteorclient.utils.world.BlockIterator;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.item.FireChargeItem;
import net.minecraft.world.item.FlintAndSteelItem;
import net.minecraft.world.level.block.TntBlock;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
class="c-keyword">public class AutoTNT extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-comment">// General
class="c-keyword">private final Setting<Boolean> ignite = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"ignite")
.description(class="c-str">"Whether to ignite tnt.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Integer> igniteDelay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"ignition-delay")
.description(class="c-str">"Delay in ticks between ignition")
.defaultValue(1)
.visible(ignite::get)
.build()
);
class="c-keyword">private final Setting<Integer> horizontalRange = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"horizontal-range")
.description(class="c-str">"Horizontal range of ignition")
.defaultValue(4)
.build()
);
class="c-keyword">private final Setting<Integer> verticalRange = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"vertical-range")
.description(class="c-str">"Vertical range of ignition")
.defaultValue(4)
.build()
);
class="c-keyword">private final Setting<Boolean> antiBreak = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"anti-break")
.description(class="c-str">"Whether to save flint and steel from breaking.")
.defaultValue(true)
.visible(ignite::get)
.build()
);
class="c-keyword">private final Setting<Integer> durability = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"durability")
.description(class="c-str">"Decides the amount of durability to leave on the flint and steel")
.min(1)
.max(63)
.sliderMax(63)
.defaultValue(10)
.visible(antiBreak::get)
.build()
);
class="c-keyword">private final Setting<Boolean> fireCharge = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"fire-charge")
.description(class="c-str">"Whether to also use fire charges.")
.defaultValue(true)
.visible(ignite::get)
.build()
);
class="c-keyword">private final Setting<Boolean> rotate = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"rotate")
.description(class="c-str">"Whether to rotate towards action.")
.defaultValue(true)
.build()
);
class="c-keyword">private final List<BlockPos.MutableBlockPos> blocksToIgnite = new ArrayList<>();
class="c-keyword">private final Pool<BlockPos.MutableBlockPos> ignitePool = new Pool<>(BlockPos.MutableBlockPos::new);
class="c-keyword">private int igniteTick = 0;
class="c-keyword">public AutoTNT() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-tnt", class="c-str">"Ignites tnt automatically. Good for griefing.");
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
igniteTick = 0;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPreTick(TickEvent.Pre event) {
if (ignite.get() && igniteTick > igniteDelay.get()) {
class="c-comment">// Clear blocks
for (BlockPos.MutableBlockPos blockPos : blocksToIgnite) ignitePool.free(blockPos);
blocksToIgnite.clear();
class="c-comment">// Register
BlockIterator.register(horizontalRange.get(), verticalRange.get(), (blockPos, blockState) -> {
if (blockState.getBlock() instanceof TntBlock) blocksToIgnite.add(ignitePool.get().set(blockPos));
});
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPostTick(TickEvent.Post event) {
class="c-comment">// Ignition
if (ignite.get() && !blocksToIgnite.isEmpty()) {
if (igniteTick > igniteDelay.get()) {
class="c-comment">// Sort based on closest tnt
blocksToIgnite.sort(Comparator.comparingDouble(PlayerUtils::distanceTo));
class="c-comment">// Ignition
FindItemResult itemResult = InvUtils.findInHotbar(item -> {
if (item.getItem() instanceof FlintAndSteelItem) {
return !antiBreak.get() || (item.getMaxDamage() - item.getDamageValue()) > durability.get();
}
else if (item.getItem() instanceof FireChargeItem) {
return fireCharge.get();
}
return false;
});
if (!itemResult.found()) {
error(class="c-str">"No flint and steel in hotbar or durability too low.");
toggle();
return;
}
ignite(blocksToIgnite.get(0), itemResult);
class="c-comment">// Reset ticks
igniteTick = 0;
}
}
igniteTick++;
}
class="c-keyword">private void ignite(BlockPos pos, FindItemResult item) {
Runnable action = () -> {
InvUtils.swap(item.slot(), true);
mc.gameMode.useItemOn(mc.player, InteractionHand.MAIN_HAND, new BlockHitResult(new Vec3(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, true));
InvUtils.swapBack();
};
class="c-comment">// rotation is very snappy and only for the interaction, TODO improve in future
if (rotate.get()) Rotations.rotate(Rotations.getYaw(pos), Rotations.getPitch(pos), action);
else action.run();
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.render.Render3DEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.renderer.ShapeMode;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.misc.Pool;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.meteorclient.utils.player.Rotations;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import meteordevelopment.meteorclient.utils.world.BlockIterator;
import meteordevelopment.meteorclient.utils.world.BlockUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.phys.shapes.CollisionContext;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
class="c-keyword">public class AutoWither extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgRender = settings.createGroup(class="c-str">"Render");
class="c-comment">// General
class="c-keyword">private final Setting<Integer> horizontalRadius = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"horizontal-radius")
.description(class="c-str">"Horizontal radius for placement")
.defaultValue(4)
.min(0)
.sliderMax(6)
.build()
);
class="c-keyword">private final Setting<Integer> verticalRadius = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"vertical-radius")
.description(class="c-str">"Vertical radius for placement")
.defaultValue(3)
.min(0)
.sliderMax(6)
.build()
);
class="c-keyword">private final Setting<Priority> priority = sgGeneral.add(new EnumSetting.Builder<Priority>()
.name(class="c-str">"priority")
.description(class="c-str">"Priority")
.defaultValue(Priority.Random)
.build()
);
class="c-keyword">private final Setting<Integer> witherDelay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"wither-delay")
.description(class="c-str">"Delay in ticks between wither placements")
.defaultValue(1)
.min(1)
.sliderMax(10)
.build()
);
class="c-keyword">private final Setting<Integer> blockDelay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"block-delay")
.description(class="c-str">"Delay in ticks between block placements")
.defaultValue(1)
.min(0)
.sliderMax(10)
.build()
);
class="c-keyword">private final Setting<Boolean> rotate = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"rotate")
.description(class="c-str">"Whether or not to rotate while building")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> turnOff = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"turn-off")
.description(class="c-str">"Turns off automatically after building a single wither.")
.defaultValue(true)
.build()
);
class="c-comment">// Render
class="c-keyword">private final Setting<ShapeMode> shapeMode = sgRender.add(new EnumSetting.Builder<ShapeMode>()
.name(class="c-str">"shape-mode")
.description(class="c-str">"How the shapes are rendered.")
.defaultValue(ShapeMode.Both)
.build()
);
class="c-keyword">private final Setting<SettingColor> sideColor = sgRender.add(new ColorSetting.Builder()
.name(class="c-str">"side-color")
.description(class="c-str">"The side color of the target block rendering.")
.defaultValue(new SettingColor(197, 137, 232, 10))
.build()
);
class="c-keyword">private final Setting<SettingColor> lineColor = sgRender.add(new ColorSetting.Builder()
.name(class="c-str">"line-color")
.description(class="c-str">"The line color of the target block rendering.")
.defaultValue(new SettingColor(197, 137, 232))
.build()
);
class="c-keyword">private final Pool<Wither> witherPool = new Pool<>(Wither::new);
class="c-keyword">private final ArrayList<Wither> withers = new ArrayList<>();
class="c-keyword">private Wither wither;
class="c-keyword">private int witherTicksWaited, blockTicksWaited;
class="c-keyword">public AutoWither() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"auto-wither", class="c-str">"Automatically builds withers.");
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
wither = null;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (wither == null) {
class="c-comment">// Delay
if (witherTicksWaited < witherDelay.get() - 1) {
return;
}
class="c-comment">// Clear pool and list
for (Wither wither : withers) witherPool.free(wither);
withers.clear();
class="c-comment">// Register
BlockIterator.register(horizontalRadius.get(), verticalRadius.get(), (blockPos, blockState) -> {
Direction dir = Direction.fromYRot(Rotations.getYaw(blockPos)).getOpposite();
if (isValidSpawn(blockPos, dir)) withers.add(witherPool.get().set(blockPos, dir));
});
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPostTick(TickEvent.Post event) {
if (wither == null) {
class="c-comment">// Delay
if (witherTicksWaited < witherDelay.get() - 1) {
witherTicksWaited++;
return;
}
if (withers.isEmpty()) return;
class="c-comment">// Sorting
switch (priority.get()) {
case Closest:
withers.sort(Comparator.comparingDouble(w -> PlayerUtils.distanceTo(w.foot)));
case Furthest:
withers.sort((w1, w2) -> {
int sort = Double.compare(PlayerUtils.distanceTo(w1.foot), PlayerUtils.distanceTo(w2.foot));
if (sort == 0) return 0;
return sort > 0 ? -1 : 1;
});
case Random:
Collections.shuffle(withers);
}
wither = withers.get(0);
}
class="c-comment">// Soul sand/soil and skull slot
FindItemResult findSoulSand = InvUtils.findInHotbar(Items.SOUL_SAND);
if (!findSoulSand.found()) findSoulSand = InvUtils.findInHotbar(Items.SOUL_SOIL);
FindItemResult findWitherSkull = InvUtils.findInHotbar(Items.WITHER_SKELETON_SKULL);
class="c-comment">// Check for enough resources
if (!findSoulSand.found() || !findWitherSkull.found()) {
error(class="c-str">"Not enough resources in hotbar");
toggle();
return;
}
class="c-comment">// Build
if (blockDelay.get() == 0) {
class="c-comment">// All in 1 tick
class="c-comment">// Body
BlockUtils.place(wither.foot, findSoulSand, rotate.get(), -50);
BlockUtils.place(wither.foot.above(), findSoulSand, rotate.get(), -50);
BlockUtils.place(wither.foot.above().relative(wither.axis, -1), findSoulSand, rotate.get(), -50);
BlockUtils.place(wither.foot.above().relative(wither.axis, 1), findSoulSand, rotate.get(), -50);
class="c-comment">// Head
BlockUtils.place(wither.foot.above().above(), findWitherSkull, rotate.get(), -50);
BlockUtils.place(wither.foot.above().above().relative(wither.axis, -1), findWitherSkull, rotate.get(), -50);
BlockUtils.place(wither.foot.above().above().relative(wither.axis, 1), findWitherSkull, rotate.get(), -50);
wither = null;
if (turnOff.get()) toggle();
} else {
class="c-comment">// Delay
if (blockTicksWaited < blockDelay.get() - 1) {
blockTicksWaited++;
return;
}
switch (wither.stage) {
case 0:
if (BlockUtils.place(wither.foot, findSoulSand, rotate.get(), -50)) wither.stage++;
break;
case 1:
if (BlockUtils.place(wither.foot.above(), findSoulSand, rotate.get(), -50)) wither.stage++;
break;
case 2:
if (BlockUtils.place(wither.foot.above().relative(wither.axis, -1), findSoulSand, rotate.get(), -50)) wither.stage++;
break;
case 3:
if (BlockUtils.place(wither.foot.above().relative(wither.axis, 1), findSoulSand, rotate.get(), -50)) wither.stage++;
break;
case 4:
if (BlockUtils.place(wither.foot.above().above(), findWitherSkull, rotate.get(), -50)) wither.stage++;
break;
case 5:
if (BlockUtils.place(wither.foot.above().above().relative(wither.axis, -1), findWitherSkull, rotate.get(), -50)) wither.stage++;
break;
case 6:
if (BlockUtils.place(wither.foot.above().above().relative(wither.axis, 1), findWitherSkull, rotate.get(), -50)) wither.stage++;
break;
case 7:
wither = null;
blockTicksWaited = 0;
if (turnOff.get()) toggle();
break;
}
}
witherTicksWaited = 0;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onRender(Render3DEvent event) {
if (wither == null) return;
class="c-comment">// Body
event.renderer.box(wither.foot, sideColor.get(), lineColor.get(), shapeMode.get(), 0);
event.renderer.box(wither.foot.above(), sideColor.get(), lineColor.get(), shapeMode.get(), 0);
event.renderer.box(wither.foot.above().relative(wither.axis, -1), sideColor.get(), lineColor.get(), shapeMode.get(), 0);
event.renderer.box(wither.foot.above().relative(wither.axis, 1), sideColor.get(), lineColor.get(), shapeMode.get(), 0);
class="c-comment">// Head
BlockPos midHead = wither.foot.above().above();
BlockPos leftHead = wither.foot.above().above().relative(wither.axis, -1);
BlockPos rightHead = wither.foot.above().above().relative(wither.axis, 1);
event.renderer.box((double) midHead.getX() + 0.2, midHead.getX(), (double) midHead.getX() + 0.2,
(double) midHead.getX() + 0.8, (double) midHead.getX() + 0.7, (double) midHead.getX() + 0.8,
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
event.renderer.box((double) leftHead.getX() + 0.2, leftHead.getX(), (double) leftHead.getX() + 0.2,
(double) leftHead.getX() + 0.8, (double) leftHead.getX() + 0.7, (double) leftHead.getX() + 0.8,
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
event.renderer.box((double) rightHead.getX() + 0.2, rightHead.getX(), (double) rightHead.getX() + 0.2,
(double) rightHead.getX() + 0.8, (double) rightHead.getX() + 0.7, (double) rightHead.getX() + 0.8,
sideColor.get(), lineColor.get(), shapeMode.get(), 0);
}
class="c-keyword">private boolean isValidSpawn(BlockPos blockPos, Direction direction) {
class="c-comment">// Withers are 3x3x1
class="c-comment">// Check if y > (255 - 3)
class="c-comment">// Because withers are 3 blocks tall
if (blockPos.getY() > 252) return false;
class="c-comment">// Determine width from direction
int widthX = 0;
int widthZ = 0;
if (direction == Direction.EAST || direction == Direction.WEST) widthZ = 1;
if (direction == Direction.NORTH || direction == Direction.SOUTH) widthX = 1;
class="c-comment">// Check for non air blocks and entities
BlockPos.MutableBlockPos bp = new BlockPos.MutableBlockPos();
for (int x = blockPos.getX() - widthX; x <= blockPos.getX() + widthX; x++) {
for (int z = blockPos.getZ() - widthZ; z <= blockPos.getZ(); z++) {
for (int y = blockPos.getY(); y <= blockPos.getY() + 2; y++) {
bp.set(x, y, z);
if (!mc.level.getBlockState(bp).canBeReplaced()) return false;
if (!mc.level.isUnobstructed(Blocks.STONE.defaultBlockState(), bp, CollisionContext.empty())) return false;
}
}
}
return true;
}
class="c-keyword">public enum Priority {
Closest,
Furthest,
Random
}
class="c-keyword">private static class Wither {
class="c-keyword">public int stage;
class="c-comment">// 0 = foot
class="c-comment">// 1 = mid body
class="c-comment">// 2 = left arm
class="c-comment">// 3 = right arm
class="c-comment">// 4 = mid head
class="c-comment">// 5 = left head
class="c-comment">// 6 = right head
class="c-comment">// 7 = end
class="c-keyword">public BlockPos.MutableBlockPos foot = new BlockPos.MutableBlockPos();
class="c-keyword">public Direction facing;
class="c-keyword">public Direction.Axis axis;
class="c-keyword">public Wither set(BlockPos pos, Direction dir) {
this.stage = 0;
this.foot.set(pos);
this.facing = dir;
this.axis = dir.getAxis();
return this;
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.meteorclient.utils.world.BlockUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.MoverType;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.FallingBlock;
import net.minecraft.world.phys.Vec3;
class="c-keyword">public class BlockIn extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> multiPlace = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"multi-place")
.description(class="c-str">"Whether to place all blocks in a single tick")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> center = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"center")
.description(class="c-str">"Whether to center to avoid obstructing placement")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> rotate = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"rotate")
.description(class="c-str">"Whether to rotate towards block placements.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> turnOff = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"turn-off")
.description(class="c-str">"Whether to turn off after finished placing.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> onlyOnGround = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"only-on-ground")
.description(class="c-str">"Only places when you are standing on blocks (not in midair).")
.defaultValue(true)
.build()
);
class="c-keyword">private final BlockPos.MutableBlockPos bp = new BlockPos.MutableBlockPos();
class="c-keyword">private boolean return_;
class="c-keyword">private double sY;
class="c-keyword">public BlockIn() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"block-in", class="c-str">"Block yourself in using any block.");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
sY = mc.player.getY();
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPreTick(TickEvent.Pre event) {
if (mc.player.onGround() && mc.player.getY()>Math.floor(mc.player.getY()+0.2)) mc.options.keyShift.setDown(true);
if (return_ && mc.options.keyShift.isDown()) mc.options.keyShift.setDown(false);
if (center.get()) {
if (!onlyOnGround.get()) {
mc.player.setDeltaMovement(0,0,0);
mc.player.move(MoverType.SELF, new Vec3(0, -(sY-Math.floor(sY)), 0));
}
PlayerUtils.centerPlayer();
}
if (onlyOnGround.get() && !mc.player.onGround()) return;
return_ = false;
class="c-comment">// Multiplace
if (multiPlace.get()) {
class="c-comment">// Bottom
boolean p1 = place(0, -1, 0);
class="c-comment">// Lower sides
boolean p2 = place(1, 0, 0);
boolean p3 = place(-1, 0, 0);
boolean p4 = place(0, 0, 1);
boolean p5 = place(0, 0, -1);
class="c-comment">// Upper sides
boolean p6 = place(1, 1, 0);
boolean p7 = place(-1, 1, 0);
boolean p8 = place(0, 1, 1);
boolean p9 = place(0, 1, -1);
class="c-comment">// Top
boolean p10 = place(0, 2, 0);
class="c-comment">// Turn off
if (turnOff.get() && p1 && p2 && p3 && p4 && p5 && p6 && p7 && p8 && p9 && p10) toggle();
class="c-comment">// No multiplace
} else {
class="c-comment">// Bottom
boolean p1 = place(0, -1, 0);
if (return_) return;
class="c-comment">// Lower sides
boolean p2 = place(1, 0, 0);
if (return_) return;
boolean p3 = place(-1, 0, 0);
if (return_) return;
boolean p4 = place(0, 0, 1);
if (return_) return;
boolean p5 = place(0, 0, -1);
if (return_) return;
class="c-comment">// Upper sides
boolean p6 = place(1, 1, 0);
if (return_) return;
boolean p7 = place(-1, 1, 0);
if (return_) return;
boolean p8 = place(0, 1, 1);
if (return_) return;
boolean p9 = place(0, 1, -1);
if (return_) return;
class="c-comment">// Top
boolean p10 = place(0, 2, 0);
class="c-comment">// Turn off
if (turnOff.get() && p1 && p2 && p3 && p4 && p5 && p6 && p7 && p8 && p9 && p10) toggle();
}
}
class="c-keyword">private boolean place(int x, int y, int z) {
setBlockPos(x, y, z);
FindItemResult findItemResult = InvUtils.findInHotbar(itemStack -> validItem(itemStack, bp));
if (!BlockUtils.canPlace(bp)) return true;
if (BlockUtils.place(bp, findItemResult, rotate.get(), 100, true)) {
return_ = true;
}
return false;
}
class="c-keyword">private void setBlockPos(int x, int y, int z) {
bp.set(mc.player.getX() + x, mc.player.getY() + y, mc.player.getZ() + z);
}
class="c-keyword">private boolean validItem(ItemStack itemStack, BlockPos pos) {
if (!(itemStack.getItem() instanceof BlockItem)) return false;
Block block = ((BlockItem) itemStack.getItem()).getBlock();
if (!Block.isShapeFullBlock(block.defaultBlockState().getCollisionShape(mc.level, pos))) return false;
return !(block instanceof FallingBlock) || !FallingBlock.isFree(mc.level.getBlockState(pos));
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.entity.BoatMoveEvent;
import meteordevelopment.meteorclient.events.meteor.KeyEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.utils.misc.input.KeyAction;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ServerboundInteractPacket;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.vehicle.boat.AbstractBoat;
class="c-keyword">public class BoatGlitch extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> toggleAfter = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"toggle-after")
.description(class="c-str">"Disables the module when finished.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> remount = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"remount")
.description(class="c-str">"Remounts the boat when finished.")
.defaultValue(true)
.build()
);
class="c-keyword">private Entity boat = null;
class="c-keyword">private int dismountTicks = 0;
class="c-keyword">private int remountTicks = 0;
class="c-keyword">private boolean dontPhase = true;
class="c-keyword">private boolean boatPhaseEnabled;
class="c-keyword">public BoatGlitch() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"boat-glitch", class="c-str">"Glitches your boat into the block beneath you. Dismount to trigger.");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
dontPhase = true;
dismountTicks = 0;
remountTicks = 0;
boat = null;
if (Modules.get().isActive(BoatPhase.class)) {
boatPhaseEnabled = true;
Modules.get().get(BoatPhase.class).toggle();
}
else {
boatPhaseEnabled = false;
}
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
if (boat != null) {
boat.noPhysics = false;
boat = null;
}
if (boatPhaseEnabled && !(Modules.get().isActive(BoatPhase.class))) {
Modules.get().get(BoatPhase.class).toggle();
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onBoatMove(BoatMoveEvent event) {
if (dismountTicks == 0 && !dontPhase) {
if (boat != event.boat) {
if (boat != null) {
boat.noPhysics = false;
}
if (mc.player.getVehicle() != null && event.boat == mc.player.getVehicle()) {
boat = event.boat;
}
else {
boat = null;
}
}
if (boat != null) {
boat.noPhysics = true;
dismountTicks = 5;
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
if (dismountTicks > 0) {
dismountTicks--;
if (dismountTicks == 0) {
if (boat != null) {
boat.noPhysics = false;
if (toggleAfter.get() && !remount.get()) {
toggle();
}
else if (remount.get()) {
remountTicks = 5;
}
}
dontPhase = true;
}
}
if (remountTicks > 0) {
remountTicks--;
if (remountTicks == 0) {
mc.getConnection().send( ServerboundInteractPacket.createInteractionPacket(boat, false, InteractionHand.MAIN_HAND));
if (toggleAfter.get()) {
toggle();
}
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onKey(KeyEvent event) {
if (event.key() == mc.options.keyShift.getDefaultKey().getValue() && event.action == KeyAction.Press) {
if (mc.player.getVehicle() instanceof AbstractBoat) {
dontPhase = false;
boat = null;
}
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.entity.BoatMoveEvent;
import meteordevelopment.meteorclient.mixininterface.IVec3d;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.DoubleSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.world.entity.vehicle.boat.AbstractBoat;
import net.minecraft.world.phys.Vec3;
class="c-keyword">public class BoatPhase extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgSpeeds = settings.createGroup(class="c-str">"Speeds");
class="c-keyword">private final Setting<Boolean> lockYaw = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"lock-boat-yaw")
.description(class="c-str">"Locks boat yaw to the direction you're facing.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> verticalControl = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"vertical-control")
.description(class="c-str">"Whether or not space/ctrl can be used to move vertically.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> adjustHorizontalSpeed = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"adjust-horizontal-speed")
.description(class="c-str">"Whether or not horizontal speed is modified.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> fall = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"fall")
.description(class="c-str">"Toggles vertical glide.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Double> horizontalSpeed = sgSpeeds.add(new DoubleSetting.Builder()
.name(class="c-str">"horizontal-speed")
.description(class="c-str">"Horizontal speed in blocks per second.")
.defaultValue(10)
.min(0)
.sliderMax(50)
.build()
);
class="c-keyword">private final Setting<Double> verticalSpeed = sgSpeeds.add(new DoubleSetting.Builder()
.name(class="c-str">"vertical-speed")
.description(class="c-str">"Vertical speed in blocks per second.")
.defaultValue(5)
.min(0)
.sliderMax(20)
.build()
);
class="c-keyword">private final Setting<Double> fallSpeed = sgSpeeds.add(new DoubleSetting.Builder()
.name(class="c-str">"fall-speed")
.description(class="c-str">"How fast you fall in blocks per second.")
.defaultValue(0.625)
.min(0)
.sliderMax(10)
.build()
);
class="c-keyword">private AbstractBoat boat = null;
class="c-keyword">public BoatPhase() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"boat-phase", class="c-str">"Phase through blocks using a boat.");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
boat = null;
if (Modules.get().isActive(BoatGlitch.class)) Modules.get().get(BoatGlitch.class).toggle();
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
if (boat != null) {
boat.noPhysics = false;
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onBoatMove(BoatMoveEvent event) {
if (mc.player.getVehicle() instanceof AbstractBoat) {
if (boat != mc.player.getVehicle()) {
if (boat != null) {
boat.noPhysics = false;
}
boat = (AbstractBoat) mc.player.getVehicle();
}
} else boat = null;
if (boat != null) {
boat.noPhysics = true;
class="c-comment">//boat.pushSpeedReduction = 1;
if (lockYaw.get()) {
boat.setYRot(mc.player.getYRot());
}
Vec3 vel;
if (adjustHorizontalSpeed.get()) {
vel = PlayerUtils.getHorizontalVelocity(horizontalSpeed.get());
}
else {
vel = boat.getDeltaMovement();
}
double velX = vel.x;
double velY = 0;
double velZ = vel.z;
if (verticalControl.get()) {
if (mc.options.keyJump.isDown()) velY += verticalSpeed.get() / 20;
if (mc.options.keySprint.isDown()) velY -= verticalSpeed.get() / 20;
else if (fall.get()) velY -= fallSpeed.get() / 20;
} else if (fall.get()) velY -= fallSpeed.get() / 20;
((IVec3d) boat.getDeltaMovement()).meteor$set(velX,velY,velZ);
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.world.phys.Vec3;
class="c-keyword">public class Boost extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Double> strength = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"strength")
.description(class="c-str">"Strength to yeet you with.")
.defaultValue(4.0)
.sliderMax(10)
.build()
);
class="c-keyword">private final Setting<Boolean> autoBoost = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"auto-boost")
.description(class="c-str">"Automatically boosts you.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Integer> interval = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"interval")
.description(class="c-str">"Boost interval in ticks.")
.visible(autoBoost::get)
.defaultValue(20)
.sliderMax(120)
.build()
);
class="c-keyword">private int timer = 0;
class="c-keyword">public Boost() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"boost", class="c-str">"Works like a dash move.");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
timer = interval.get();
if (!autoBoost.get()) {
if (mc.player != null) boost();
this.toggle();
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (!autoBoost.get()) return;
if (timer < 1) {
boost();
timer = interval.get();
} else {
timer--;
}
}
class="c-keyword">private void boost() {
Vec3 v = mc.player.getForward().scale(strength.get());
mc.player.push(v.x(), v.y(), v.z());
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.mixin.HandshakeC2SPacketAccessor;
import com.google.gson.Gson;
import com.mojang.authlib.properties.PropertyMap;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.handshake.ClientIntent;
import net.minecraft.network.protocol.handshake.ClientIntentionPacket;
import java.util.List;
class="c-keyword">public class BungeeCordSpoof extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private static final Gson GSON = new Gson();
class="c-keyword">private final Setting<Boolean> whitelist = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"whitelist")
.description(class="c-str">"Use whitelist.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<List<String>> whitelistedServers = sgGeneral.add(new StringListSetting.Builder()
.name(class="c-str">"whitelisted-servers")
.description(class="c-str">"Will only work if you joined the servers above.")
.visible(whitelist::get)
.build()
);
class="c-keyword">private final Setting<Boolean> spoofProfile = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"spoof-profile")
.description(class="c-str">"Spoof account profile.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<String> forwardedIP = sgGeneral.add(new StringSetting.Builder()
.name(class="c-str">"forwarded-IP")
.description(class="c-str">"The forwarded IP address.")
.defaultValue(class="c-str">"127.0.0.1")
.build()
);
class="c-keyword">public BungeeCordSpoof() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"bungeeCord-spoof", class="c-str">"Let you join BungeeCord servers, useful when bypassing proxies.");
runInMainMenu = true;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacketSend(PacketEvent.Send event) {
if (event.packet instanceof ClientIntentionPacket packet && packet.intention() == ClientIntent.LOGIN) {
if (whitelist.get() && !whitelistedServers.get().contains(Utils.getWorldName())) return;
String address = packet.hostName() + class="c-str">"\0" + forwardedIP + class="c-str">"\0" + mc.getUser().getProfileId().toString().replace(class="c-str">"-", class="c-str">"")
+ (spoofProfile.get() ? getProperty() : class="c-str">"");
((HandshakeC2SPacketAccessor) (Object) packet).setHostName(address);
}
}
class="c-keyword">private String getProperty() {
PropertyMap propertyMap = mc.getGameProfile().properties();
return class="c-str">"\0" + GSON.toJson(propertyMap.values().toArray());
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.settings.StringMapSetting;
import meteordevelopment.meteorclient.events.game.ReceiveMessageEvent;
import meteordevelopment.meteorclient.gui.utils.StarscriptTextBoxRenderer;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.settings.StringSetting;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.misc.MeteorStarscript;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import meteordevelopment.orbit.EventHandler;
import org.meteordev.starscript.Script;
import org.meteordev.starscript.compiler.Compiler;
import org.meteordev.starscript.compiler.Parser;
import org.meteordev.starscript.utils.StarscriptError;
import java.util.LinkedHashMap;
import java.util.Map;
class="c-keyword">public class ChatBot extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<String> prefix = sgGeneral.add(new StringSetting.Builder()
.name(class="c-str">"prefix")
.description(class="c-str">"Command prefix for the bot.")
.defaultValue(class="c-str">"!")
.build()
);
class="c-keyword">private final Setting<Boolean> help = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"help")
.description(class="c-str">"Add help command.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Map<String, String>> commands = sgGeneral.add(new StringMapSetting.Builder()
.name(class="c-str">"commands")
.description(class="c-str">"Commands.")
.renderer(StarscriptTextBoxRenderer.class)
.defaultValue(new LinkedHashMap<>() {{
put(class="c-str">"ping", class="c-str">"Pong!");
put(class="c-str">"tps", class="c-str">"Current TPS: {server.tps}");
put(class="c-str">"time", class="c-str">"It's currently {server.time}");
put(class="c-str">"pos", class="c-str">"I am @ {player.pos}");
}})
.build()
);
class="c-keyword">public ChatBot() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"chat-bot", class="c-str">"Bot which automatically responds to chat messages.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onMessageReceive(ReceiveMessageEvent event) {
String msg = event.getMessage().getString();
if (help.get() && msg.endsWith(prefix.get() + class="c-str">"help")) {
ChatUtils.sendPlayerMsg(class="c-str">"Available commands: " + String.join(class="c-str">", ", commands.get().keySet()));
return;
}
for (String cmd : commands.get().keySet()) {
if (msg.endsWith(prefix.get() + cmd)) {
Script script = compile(commands.get().get(cmd));
if (script == null) ChatUtils.sendPlayerMsg(class="c-str">"An error occurred");
try {
var section = MeteorStarscript.ss.run(script);
ChatUtils.sendPlayerMsg(section.text);
} catch (StarscriptError e) {
MeteorStarscript.printChatError(e);
ChatUtils.sendPlayerMsg(class="c-str">"An error occurred");
}
return;
}
}
}
class="c-keyword">private static Script compile(String script) {
if (script == null) return null;
Parser.Result result = Parser.parse(script);
if (result.hasErrors()) {
MeteorStarscript.printChatError(result.errors.get(0));
return null;
}
return Compiler.compile(result);
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.mixininterface.IInventoryTweaks;
import meteordevelopment.meteorclient.MeteorClient;
import meteordevelopment.meteorclient.events.packets.InventoryEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.misc.InventoryTweaks;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.player.Rotations;
import meteordevelopment.meteorclient.utils.player.SlotUtils;
import meteordevelopment.orbit.EventHandler;
import meteordevelopment.orbit.EventPriority;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.NonNullList;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.ChestBlock;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.IntStream;
class="c-keyword">public class ChestAura extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> rotate = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"rotate")
.description(class="c-str">"Rotates when opening.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Double> range = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"range")
.description(class="c-str">"The interact range.")
.defaultValue(4)
.min(0)
.build()
);
class="c-keyword">private final Setting<List<BlockEntityType<?>>> blocks = sgGeneral.add(new StorageBlockListSetting.Builder()
.name(class="c-str">"blocks")
.description(class="c-str">"The blocks you open.")
.defaultValue(BlockEntityType.CHEST)
.build()
);
class="c-keyword">private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"delay")
.description(class="c-str">"Delay between opening chests.")
.defaultValue(10)
.sliderMax(20)
.build()
);
class="c-keyword">private final Setting<Integer> forget = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"forget-after")
.description(class="c-str">"How many ticks to wait before forgetting which chest to open. 0 for infinite.")
.defaultValue(0)
.min(0)
.sliderMax(1000)
.build()
);
class="c-keyword">private final Setting<CloseCondition> closeCondition = sgGeneral.add(new EnumSetting.Builder<CloseCondition>()
.name(class="c-str">"close-condition")
.defaultValue(CloseCondition.IfEmpty)
.description(class="c-str">"When to close the chest screen.")
.build()
);
class="c-keyword">private final Map<BlockPos, Integer> openedBlocks = new HashMap<>();
class="c-keyword">private final CloseListener closeListener = new CloseListener();
class="c-keyword">private int timer = 0;
class="c-keyword">public ChestAura() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"chest-aura", class="c-str">"Automatically open chests in radius");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
timer = 0;
openedBlocks.clear();
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (forget.get() != 0) {
for (Map.Entry<BlockPos, Integer> e : new HashMap<>(openedBlocks).entrySet()) {
int time = e.getValue();
if (time > forget.get()) openedBlocks.remove(e.getKey());
else openedBlocks.replace(e.getKey(), time + 1);
}
}
if (timer > 0 && mc.screen != null) return;
for (BlockEntity block : Utils.blockEntities()) {
if (!blocks.get().contains(block.getType())) continue;
if (mc.player.getEyePosition().distanceTo(Vec3.atCenterOf(block.getBlockPos())) >= range.get()) continue;
BlockPos pos = block.getBlockPos();
if (openedBlocks.containsKey(pos)) continue;
Runnable click = () -> mc.gameMode.useItemOn(mc.player, InteractionHand.MAIN_HAND, new BlockHitResult(new Vec3(pos.getX(), pos.getY(), pos.getZ()), Direction.UP, pos, false));
if (rotate.get()) Rotations.rotate(Rotations.getYaw(pos), Rotations.getPitch(pos), click);
else click.run();
class="c-comment">// Double chest compatibility
BlockState state = block.getBlockState();
if (state.hasProperty(ChestBlock.TYPE)) {
Direction direction = state.getValue(ChestBlock.FACING);
switch (state.getValue(ChestBlock.TYPE)) {
case LEFT -> openedBlocks.put(pos.relative(direction.getClockWise()), 0);
case RIGHT -> openedBlocks.put(pos.relative(direction.getCounterClockWise()), 0);
}
}
openedBlocks.put(pos, 0);
timer = delay.get();
MeteorClient.EVENT_BUS.subscribe(closeListener);
break;
}
timer--;
}
class="c-keyword">public class CloseListener {
class="c-annotation">@EventHandler(priority = EventPriority.HIGH)
class="c-keyword">private void onInventory(InventoryEvent event) {
AbstractContainerMenu handler = mc.player.containerMenu;
if (event.packet.containerId() == handler.containerId) {
switch (closeCondition.get()) {
case IfEmpty -> {
NonNullList<ItemStack> stacks = NonNullList.create();
IntStream.range(0, SlotUtils.indexToId(SlotUtils.MAIN_START)).mapToObj(handler.slots::get).map(Slot::getItem).forEach(stacks::add);
if (stacks.stream().allMatch(ItemStack::isEmpty)) mc.player.closeContainer();
}
case Always -> mc.player.closeContainer();
case AfterSteal ->
((IInventoryTweaks) Modules.get().get(InventoryTweaks.class)).stealCallback(() -> mc.player.closeContainer());
}
}
MeteorClient.EVENT_BUS.unsubscribe(this);
}
}
class="c-keyword">public enum CloseCondition {
Always,
IfEmpty,
AfterSteal,
Never
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.events.TeleportParticleEvent;
import meteordevelopment.meteorclient.events.entity.player.FinishUsingItemEvent;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.events.render.Render3DEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.misc.Keybind;
import meteordevelopment.meteorclient.utils.render.RenderUtils;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket;
import net.minecraft.network.protocol.game.ServerboundAcceptTeleportationPacket;
import net.minecraft.world.item.Items;
import net.minecraft.world.phys.Vec3;
import java.util.LinkedList;
import java.util.Queue;
class="c-keyword">public class ChorusExploit extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgRender = settings.createGroup(class="c-str">"Render");
class="c-keyword">private final Setting<PositionMode> positionMode = sgGeneral.add(new EnumSetting.Builder<PositionMode>()
.name(class="c-str">"position-mode")
.description(class="c-str">"How your teleport position is calculated.")
.defaultValue(PositionMode.Particle)
.build()
);
class="c-keyword">private final Setting<Boolean> onItemSwitch = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"tp-on-switch")
.description(class="c-str">"Teleports you when you switch items.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> onDeactivate = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"tp-on-deactivate")
.description(class="c-str">"Teleports you when the module is deactivated.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Keybind> onKey = sgGeneral.add(new KeybindSetting.Builder()
.name(class="c-str">"on-key")
.description(class="c-str">"Teleports when a key is pressed.")
.defaultValue(Keybind.none())
.action(this::sendPackets)
.build()
);
class="c-keyword">private final Setting<Boolean> autoTeleport = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"automatically-teleport")
.description(class="c-str">"Automatically teleports you after a fixed number of ticks.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Integer> ticksToTeleport = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"ticks-to-teleport")
.description(class="c-str">"The amount of ticks to wait before automatically teleporting.")
.defaultValue(40)
.min(0)
.sliderMax(100)
.visible(autoTeleport::get)
.build()
);
class="c-comment">//render
class="c-keyword">private final Setting<Boolean> renderActual = sgRender.add(new BoolSetting.Builder()
.name(class="c-str">"set-position")
.description(class="c-str">"Sets you clientside to your actual position.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> fakeplayerOnDestination = sgRender.add(new BoolSetting.Builder()
.name(class="c-str">"fakeplayer-on-destination")
.description(class="c-str">"Creates a fakeplayer at the destination.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> drawLine = sgRender.add(new BoolSetting.Builder()
.name(class="c-str">"draw-line")
.description(class="c-str">"Draws a line to where you are going to be.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<SettingColor> lineColour = sgRender.add(new ColorSetting.Builder()
.name(class="c-str">"line-color")
.description(class="c-str">"The lines color.")
.defaultValue(new SettingColor(205, 205, 205, 127))
.visible(drawLine::get)
.build()
);
class="c-keyword">private int slot;
class="c-keyword">private int delay = 0;
class="c-keyword">private boolean ateChorus, sending, gotPosition = false;
class="c-keyword">private double posX, posY, posZ, cposX, cposY, cposZ;
class="c-keyword">private final Queue<ServerboundAcceptTeleportationPacket> telePackets = new LinkedList<>();
class="c-keyword">public ChorusExploit() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"chorus-exploit", class="c-str">"Delays teleporting with a chorus fruit.");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
ateChorus = false;
delay = 0;
telePackets.clear();
gotPosition = false;
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
if (Utils.canUpdate() && ateChorus && onDeactivate.get()) {
sendPackets();
}
telePackets.clear();
gotPosition = false;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacketSend(PacketEvent.Send event) {
if (event.packet instanceof ServerboundAcceptTeleportationPacket telepacket && ateChorus && !sending) {
telePackets.add(telepacket);
event.cancel();
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacketReceive(PacketEvent.Receive event) {
if (event.packet instanceof ClientboundPlayerPositionPacket posPacket && ateChorus) {
event.setCancelled(true);
if (positionMode.get() == PositionMode.PosLook) {
Vec3 pos = posPacket.change().position();
cposX = pos.x;
cposY = pos.y;
cposZ = pos.z;
gotPosition = true;
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (ateChorus) {
delay++;
if (!mc.player.position().equals(new Vec3(posX, posY, posZ)) && renderActual.get()) {
mc.player.setPosRaw(posX, posY, posZ);
}
if (autoTeleport.get() && delay >= ticksToTeleport.get()) {
sendPackets();
}
if (onItemSwitch.get() && slot != mc.player.getInventory().getSelectedSlot()) {
sendPackets();
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onEat(FinishUsingItemEvent event) {
if (event.itemStack.getItem().equals(Items.CHORUS_FRUIT)) {
posX = mc.player.getX();
posY = mc.player.getY();
posZ = mc.player.getZ();
ateChorus = true;
slot = mc.player.getInventory().getSelectedSlot();
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onRender3D(Render3DEvent event) {
if (drawLine.get() && ateChorus && gotPosition) {
event.renderer.line(RenderUtils.center.x, RenderUtils.center.y, RenderUtils.center.z, cposX, cposY + 1, cposZ, lineColour.get());
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTeleportParticle(TeleportParticleEvent event) {
if (ateChorus && positionMode.get() == PositionMode.Particle) {
cposX = event.x;
cposY = event.y;
cposZ = event.z;
gotPosition = true;
}
}
class="c-keyword">private void sendPackets() {
sending = true;
while (!telePackets.isEmpty()) {
mc.getConnection().send(telePackets.poll());
}
delay = 0;
ateChorus = false;
sending = false;
gotPosition = false;
}
class="c-annotation">@Override
class="c-keyword">public String getInfoString() {
if (autoTeleport.get() && ateChorus) return String.valueOf(ticksToTeleport.get() - delay);
return null;
}
class="c-keyword">public enum PositionMode {
Particle,
PosLook,
None
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ClientboundLoginPacket;
import net.minecraft.network.protocol.game.ServerboundEditBookPacket;
import net.minecraft.network.protocol.game.ServerboundSignUpdatePacket;
import net.minecraft.server.MinecraftServer;
import java.util.List;
class="c-keyword">public class ColorSigns extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> signs = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"signs")
.description(class="c-str">"Allows you to use colors in signs.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> books = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"books")
.description(class="c-str">"Allows you to use colors in books.")
.defaultValue(false)
.build()
);
class="c-keyword">public ColorSigns() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"color-signs", class="c-str">"Allows you to use colors on signs on NON-PAPER servers (use \"&\class="c-str">" for color symbols)");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacketSend(PacketEvent.Send event) {
if (event.packet instanceof ClientboundLoginPacket) {
checkWarning();
return;
}
if (signs.get() && event.packet instanceof ServerboundSignUpdatePacket packet) {
for (int line = 0; line < packet.getLines().length; line++) {
packet.getLines()[line] = packet.getLines()[line]
.replaceAll(class="c-str">"(?i)(?:&|(?<!§)§)([0-9A-Z])", class="c-str">"§§$1$1");
}
}
if (books.get() && event.packet instanceof ServerboundEditBookPacket packet) {
List<String> newPages = packet.pages().stream().map(text ->
text.replaceAll(class="c-str">"(?i)&([0-9A-Z])", class="c-str">"§$1")).toList();
class="c-comment">// BookUpdateC2SPacket.pages is final, so we need to create a new packet
if (!packet.pages().equals(newPages)) {
assert mc.getConnection() != null;
mc.getConnection().send(new ServerboundEditBookPacket(
packet.slot(), newPages, packet.title()));
event.cancel();
}
}
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
super.onActivate();
checkWarning();
}
class="c-keyword">private void checkWarning() {
assert mc.player != null;
MinecraftServer server = mc.player.level().getServer();
if (server == null) return;
String brand = server.getServerModName();
if (brand == null) return;
if (brand.contains(class="c-str">"Paper")) warning(class="c-str">"You are on a paper server. Color signs won't work here");
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.render.Render3DEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.entity.SortPriority;
import meteordevelopment.meteorclient.utils.entity.TargetUtils;
import meteordevelopment.meteorclient.utils.render.color.Color;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3;
import java.util.Random;
class="c-comment">// Too much much spaghetti!
class="c-comment">// -StormyBytes
class="c-keyword">public class Confuse extends Module {
class="c-keyword">public enum Mode {
RandomTP,
Switch,
Circle
}
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Mode> mode = sgGeneral.add(new EnumSetting.Builder<Mode>()
.name(class="c-str">"mode")
.defaultValue(Mode.RandomTP)
.description(class="c-str">"Mode")
.build()
);
class="c-keyword">private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"delay")
.description(class="c-str">"Delay")
.defaultValue(3)
.min(0)
.sliderMax(20)
.build()
);
class="c-keyword">private final Setting<Integer> range = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"radius")
.description(class="c-str">"Range to confuse opponents")
.defaultValue(6)
.min(0).sliderMax(10)
.build()
);
class="c-keyword">private final Setting<SortPriority> priority = sgGeneral.add(new EnumSetting.Builder<SortPriority>()
.name(class="c-str">"priority")
.description(class="c-str">"Targeting priority")
.defaultValue(SortPriority.LowestHealth)
.build()
);
class="c-keyword">private final Setting<Integer> circleSpeed = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"circle-speed")
.description(class="c-str">"Circle mode speed")
.defaultValue(10)
.min(1)
.sliderMax(180)
.build()
);
class="c-keyword">private final Setting<Boolean> moveThroughBlocks = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"move-through-blocks")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> budgetGraphics = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"budget-graphics")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<SettingColor> circleColor = sgGeneral.add(new ColorSetting.Builder()
.name(class="c-str">"circle-color")
.description(class="c-str">"Color for circle rendering")
.defaultValue(new SettingColor(0, 255, 0))
.visible(budgetGraphics::get)
.build()
);
int delayWaited = 0;
double circleProgress = 0;
double addition = 0.0;
Entity target = null;
class="c-keyword">public Confuse() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"confuse", class="c-str">"Makes your enemies shit themselves");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
delayWaited = 0;
circleProgress = 0;
addition = 0.0;
target = null;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
class="c-comment">// Delay
delayWaited++;
if (delayWaited < delay.get()) return;
delayWaited = 0;
class="c-comment">// Targetting
target = TargetUtils.getPlayerTarget(range.get(), priority.get());
if (target == null) return;
Vec3 entityPos = target.position();
Vec3 playerPos = mc.player.position();
Random r = new Random();
BlockHitResult hit;
int halfRange = range.get() / 2;
switch (mode.get()) {
case RandomTP:
double x = r.nextDouble() * range.get() - halfRange;
double y = 0;
double z = r.nextDouble() * range.get() - halfRange;
Vec3 addend = new Vec3(x, y, z);
Vec3 goal = entityPos.add(addend);
if (mc.level.getBlockState(BlockPos.containing(goal.x, goal.y, goal.z)).getBlock() != Blocks.AIR) {
goal = new Vec3(x, playerPos.y, z);
}
if (mc.level.getBlockState(BlockPos.containing(goal.x, goal.y, goal.z)).getBlock() == Blocks.AIR) {
hit = mc.level.clip(new ClipContext(mc.player.position(), goal, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, mc.player));
if (!moveThroughBlocks.get() && hit.isInside()) {
delayWaited = delay.get() - 1;
break;
}
mc.player.absSnapTo(goal.x, goal.y, goal.z);
} else {
delayWaited = delay.get() - 1;
}
break;
case Switch:
Vec3 diff = entityPos.subtract(playerPos);
Vec3 diff1 = new Vec3(Mth.clamp(diff.x, -halfRange, halfRange), Mth.clamp(diff.y, -halfRange, halfRange), Mth.clamp(diff.z, -halfRange, halfRange));
Vec3 goal2 = entityPos.add(diff1);
hit = mc.level.clip(new ClipContext(mc.player.position(), goal2, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, mc.player));
if (!moveThroughBlocks.get() && hit.isInside()) {
delayWaited = delay.get() - 1;
break;
}
mc.player.absSnapTo(goal2.x, goal2.y, goal2.z);
break;
case Circle:
delay.set(0);
circleProgress += circleSpeed.get();
if (circleProgress > 360) circleProgress -= 360;
double rad = Math.toRadians(circleProgress);
double sin = Math.sin(rad) * 3;
double cos = Math.cos(rad) * 3;
Vec3 current = new Vec3(entityPos.x + sin, playerPos.y, entityPos.z + cos);
hit = mc.level.clip(new ClipContext(mc.player.position(), current, ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, mc.player));
if (!moveThroughBlocks.get() && hit.isInside())
break;
mc.player.absSnapTo(current.x, current.y, current.z);
break;
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onRender(Render3DEvent event) {
if (target == null) return;
boolean flag = budgetGraphics.get();
Vec3 last = null;
addition += flag ? 0 : 1.0;
if (addition > 360) addition = 0;
for (int i = 0; i < 360; i += flag ? 7 : 1) {
Color c1;
if (flag) c1 = circleColor.get();
else {
double rot = (255.0 * 3) * (((((double) i) + addition) % 360) / 360.0);
int seed = (int) Math.floor(rot / 255.0);
double current = rot % 255;
double red = seed == 0 ? current : (seed == 1 ? Math.abs(current - 255) : 0);
double green = seed == 1 ? current : (seed == 2 ? Math.abs(current - 255) : 0);
double blue = seed == 2 ? current : (seed == 0 ? Math.abs(current - 255) : 0);
c1 = new Color((int) red, (int) green, (int) blue);
}
Vec3 tp = target.position();
double rad = Math.toRadians(i);
double sin = Math.sin(rad) * 3;
double cos = Math.cos(rad) * 3;
Vec3 c = new Vec3(tp.x + sin, tp.y + target.getBbHeight() / 2, tp.z + cos);
if (last != null) event.renderer.line(last.x, last.y, last.z, c.x, c.y, c.z, c1);
last = c;
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.DoubleSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.ChatFormatting;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.protocol.game.ClientboundLevelEventPacket;
import net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.TamableAnimal;
import net.minecraft.world.phys.Vec3;
import java.util.UUID;
class="c-keyword">public class CoordLogger extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgTeleports = settings.createGroup(class="c-str">"Teleports");
class="c-keyword">private final SettingGroup sgWorldEvents = settings.createGroup(class="c-str">"World Events");
class="c-comment">// General
class="c-keyword">private final Setting<Double> minDistance = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"minimum-distance")
.description(class="c-str">"Minimum distance to log event.")
.min(5)
.max(100)
.sliderMin(5)
.sliderMax(100)
.defaultValue(10)
.build()
);
class="c-comment">// Teleports
class="c-keyword">private final Setting<Boolean> players = sgTeleports.add(new BoolSetting.Builder()
.name(class="c-str">"players")
.description(class="c-str">"Logs player teleports.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> wolves = sgTeleports.add(new BoolSetting.Builder()
.name(class="c-str">"wolves")
.description(class="c-str">"Logs wolf teleports.")
.defaultValue(false)
.build()
);
class="c-comment">// World events
class="c-keyword">private final Setting<Boolean> enderDragons = sgWorldEvents.add(new BoolSetting.Builder()
.name(class="c-str">"ender-dragons")
.description(class="c-str">"Logs killed ender dragons.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> endPortals = sgWorldEvents.add(new BoolSetting.Builder()
.name(class="c-str">"end-portals")
.description(class="c-str">"Logs opened end portals.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> withers = sgWorldEvents.add(new BoolSetting.Builder()
.name(class="c-str">"withers")
.description(class="c-str">"Logs wither spawns.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> otherEvents = sgWorldEvents.add(new BoolSetting.Builder()
.name(class="c-str">"other-global-events")
.description(class="c-str">"Logs other global events.")
.defaultValue(false)
.build()
);
class="c-keyword">public CoordLogger() {
super(VoidAddonsAddon.CATEGORY,class="c-str">"coord-logger", class="c-str">"Logs coordinates of various events. Might not work on Spigot/Paper servers.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacketReceive(PacketEvent.Receive event) {
class="c-comment">// Teleports
if (event.packet instanceof ClientboundTeleportEntityPacket) {
ClientboundTeleportEntityPacket packet = (ClientboundTeleportEntityPacket) event.packet;
try {
Entity entity = mc.level.getEntity(packet.id());
class="c-comment">// Player teleport
if (entity.getType().equals(EntityType.PLAYER) && players.get()) {
Vec3 packetPosition = packet.change().position();
Vec3 playerPosition = new Vec3(entity.getX(), entity.getY(), entity.getZ());
if (playerPosition.distanceTo(packetPosition) >= minDistance.get()) {
info(formatMessage(class="c-str">"Player '" + entity.getScoreboardName() + class="c-str">"' has teleported to ", packetPosition));
}
}
class="c-comment">// World teleport
else if (entity.getType().equals(EntityType.WOLF) && wolves.get()) {
Vec3 packetPosition = packet.change().position();
Vec3 wolfPosition = new Vec3(entity.getX(), entity.getY(), entity.getZ());
UUID ownerUuid = ((TamableAnimal) entity).getOwner() != null ? ((TamableAnimal) entity).getOwner().getUUID() : null;
if (ownerUuid != null && wolfPosition.distanceTo(packetPosition) >= minDistance.get()) {
info(formatMessage(class="c-str">"Wolf has teleported to ", packetPosition));
}
}
} catch(NullPointerException ignored) {}
class="c-comment">// World events
} else if (event.packet instanceof ClientboundLevelEventPacket) {
ClientboundLevelEventPacket worldEventS2CPacket = (ClientboundLevelEventPacket) event.packet;
if (worldEventS2CPacket.isGlobalEvent()) {
class="c-comment">// Min distance
if (PlayerUtils.distanceTo(worldEventS2CPacket.getPos()) <= minDistance.get()) return;
switch (worldEventS2CPacket.getType()) {
case 1023:
if (withers.get()) info(formatMessage(class="c-str">"Wither spawned at ", worldEventS2CPacket.getPos()));
break;
case 1038:
if (endPortals.get()) info(formatMessage(class="c-str">"End portal opened at ", worldEventS2CPacket.getPos()));
break;
case 1028:
if (enderDragons.get()) info(formatMessage(class="c-str">"Ender dragon killed at ", worldEventS2CPacket.getPos()));
break;
default:
if (otherEvents.get()) info(formatMessage(class="c-str">"Unknown global event at ", worldEventS2CPacket.getPos()));
}
}
}
}
class="c-keyword">public MutableComponent formatMessage(String message, Vec3 coords) {
MutableComponent text = Component.literal(message);
text.append(ChatUtils.formatCoords(coords));
text.append(ChatFormatting.GRAY +class="c-str">".");
return text;
}
class="c-keyword">public MutableComponent formatMessage(String message, BlockPos coords) {
return formatMessage(message, new Vec3(coords.getX(), coords.getY(), coords.getZ()));
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.reflect.TypeToken;
import io.netty.buffer.Unpooled;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.ChatFormatting;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.HoverEvent;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket;
import java.lang.reflect.Type;
import java.nio.charset.StandardCharsets;
import java.util.Map;
class="c-keyword">public class CustomPackets extends Module {
class="c-keyword">private static final Gson GSON_NON_PRETTY = new GsonBuilder().enableComplexMapKeySerialization().disableHtmlEscaping().create();
class="c-keyword">private static final Type BADLION_MODS_TYPE = new TypeToken<Map<String, BadlionMod>>() {
}.getType();
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgBadlion = settings.createGroup(class="c-str">"Bad Lion");
class="c-keyword">private final Setting<Boolean> unknownPackets = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"unknown-packets")
.description(class="c-str">"Whether to print unknown packets.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> mods = sgBadlion.add(new BoolSetting.Builder()
.name(class="c-str">"disallowed-mods")
.description(class="c-str">"Whether to print what badlion mods are disallowed.")
.defaultValue(true)
.build()
);
class="c-keyword">public CustomPackets() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"custom-packets", class="c-str">"Handles different non-vanilla protocols.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onCustomPayloadPacket(PacketEvent.Receive event) {
if (event.packet instanceof ClientboundCustomPayloadPacket packet) {
if (packet.payload().type().toString().equals(class="c-str">"badlion:mods")) {
event.setCancelled(onBadlionModsPacket(packet));
} else {
onUnknownPacket(packet);
}
}
}
FriendlyByteBuf buffer = new FriendlyByteBuf(Unpooled.buffer());
class="c-keyword">private void onUnknownPacket(ClientboundCustomPayloadPacket packet) {
if (!unknownPackets.get()) return;
MutableComponent text = Component.literal(packet.payload().type().toString());
buffer.clear();
text.setStyle(
text.getStyle().withHoverEvent(new HoverEvent.ShowText(Component.literal(readString(buffer))))
);
info(text);
}
class="c-keyword">private boolean onBadlionModsPacket(ClientboundCustomPayloadPacket packet) {
if (!mods.get()) return false;
buffer.clear();
String json = readString(buffer);
Map<String, BadlionMod> mods = GSON_NON_PRETTY.fromJson(json, BADLION_MODS_TYPE);
ChatUtils.sendMsg(class="c-str">"Badlion", format(class="c-str">"Mods", formatMods(mods)));
return true;
}
class="c-keyword">private MutableComponent format(String type, MutableComponent message) {
MutableComponent text = Component.literal(String.format(class="c-str">"[%s%s%s]",
ChatFormatting.AQUA,
type,
ChatFormatting.GRAY
));
text.append(class="c-str">" ");
text.append(message);
return text;
}
class="c-keyword">private String readString(FriendlyByteBuf data) {
return data.readCharSequence(
data.readableBytes(),
StandardCharsets.UTF_8
).toString();
}
class="c-keyword">private MutableComponent formatMods(Map<String, BadlionMod> mods) {
MutableComponent text = Component.literal(class="c-str">"Disallowed mods: \n");
mods.forEach((name, data) -> {
MutableComponent modLine = Component.literal(String.format(class="c-str">"- %s%s%s ", ChatFormatting.YELLOW, name, ChatFormatting.GRAY));
modLine.append(data.disabled ? class="c-str">"disabled" : class="c-str">"enabled");
modLine.append(class="c-str">"\n");
if (data.extra_data != null) {
modLine.setStyle(modLine.getStyle()
.withHoverEvent(new HoverEvent.ShowText(Component.literal(data.extra_data.toString()))));
}
text.append(modLine);
});
return text;
}
class="c-keyword">private static class BadlionMod {
class="c-keyword">private boolean disabled;
class="c-keyword">private JsonObject extra_data;
class="c-keyword">private JsonObject settings;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import net.minecraft.client.renderer.culling.Frustum;
import net.minecraft.client.renderer.debug.*;
import net.minecraft.util.debug.DebugValueAccess;
import net.minecraft.world.level.LightLayer;
import java.util.HashMap;
import java.util.Map;
class="c-keyword">public class DebugRender extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Map<Setting<Boolean>, DebugRenderer.SimpleDebugRenderer> renderers = new HashMap<>();
class="c-keyword">public DebugRender() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"debug-renders", class="c-str">"Render useful debug information.");
BrainDebugRenderer brainRenderer = new BrainDebugRenderer(mc);
addRenderer(class="c-str">"bee-brain-&-hive", new BeeDebugRenderer(mc));
addRenderer(class="c-str">"breeze-brain", new BreezeDebugRenderer(mc));
addRenderer(class="c-str">"chunk-culling", new ChunkCullingDebugRenderer(mc));
addRenderer(class="c-str">"chunk-debug", new ChunkDebugRenderer(mc));
addRenderer(class="c-str">"collision", new CollisionBoxRenderer(mc));
addRenderer(class="c-str">"entity-block-intersection", new EntityBlockIntersectionDebugRenderer());
addRenderer(class="c-str">"game-event", new GameEventListenerRenderer());
addRenderer(class="c-str">"mob-goals", new GoalSelectorDebugRenderer(mc));
addRenderer(class="c-str">"heightmap", new HeightMapRenderer(mc));
addRenderer(class="c-str">"block-light", new LightDebugRenderer(mc, true, false));
addRenderer(class="c-str">"sky-light", new LightDebugRenderer(mc, false, true));
addRenderer(class="c-str">"light-sections-sky", new LightSectionDebugRenderer(mc, LightLayer.SKY));
addRenderer(class="c-str">"light-sections-block", new LightSectionDebugRenderer(mc, LightLayer.BLOCK));
addRenderer(class="c-str">"neighbor-updates", new NeighborsUpdateRenderer());
addRenderer(class="c-str">"octree", new OctreeDebugRenderer(mc));
addRenderer(class="c-str">"pathfinding-debug", new PathfindingRenderer());
addRenderer(class="c-str">"raid-center", new RaidDebugRenderer(mc));
addRenderer(class="c-str">"redstone-wire-orientations", new RedstoneWireOrientationsRenderer());
addRenderer(class="c-str">"solid-faces", new SolidFaceRenderer(mc));
addRenderer(class="c-str">"structure-outlines", new StructureRenderer());
addRenderer(class="c-str">"support-blocks", new SupportBlockRenderer(mc));
addRenderer(class="c-str">"brain-debug", brainRenderer);
addRenderer(class="c-str">"poi-debug", new PoiDebugRenderer(brainRenderer));
addRenderer(class="c-str">"village-sections", new VillageSectionsDebugRenderer());
addRenderer(class="c-str">"water", new WaterDebugRenderer(mc));
}
class="c-comment">// TODO add descriptions to each
class="c-keyword">private void addRenderer(String name, DebugRenderer.SimpleDebugRenderer renderer) {
Setting<Boolean> setting = sgGeneral.add(new BoolSetting.Builder()
.name(name)
.defaultValue(false)
.build()
);
renderers.put(setting, renderer);
}
class="c-keyword">public void render(Frustum frustum, double x, double y, double z, float partialTick) {
if (mc.getConnection() == null) return;
DebugValueAccess debugValueAccess = mc.getConnection().createDebugValueAccess();
for (Map.Entry<Setting<Boolean>, DebugRenderer.SimpleDebugRenderer> entry : renderers.entrySet()) {
if (entry.getKey().get()) {
entry.getValue().emitGizmos(x, y, z, debugValueAccess, frustum, partialTick);
}
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ServerboundPlayerCommandPacket;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.phys.Vec3;
class="c-keyword">public class ExtraElytra extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> instantFly = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"instant-fly")
.description(class="c-str">"Jump to fly, no weird double-jump needed!")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> speedCtrl = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"speed-ctrl")
.description(class="c-str">"""
Control your speed with the Forward and Back keys.
(default: W and S)
No fireworks needed!class="c-str">""")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> heightCtrl = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"height-ctrl")
.description(class="c-str">"""
Control your height with the Jump and Sneak keys.
(default: Spacebar and Shift)
No fireworks needed!class="c-str">""")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> stopInWater = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"stop-in-water")
.description(class="c-str">"Stop flying in water")
.defaultValue(true)
.build()
);
class="c-keyword">private int jumpTimer;
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
jumpTimer = 0;
}
class="c-keyword">public ExtraElytra() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"extra-elytra", class="c-str">"Easier elytra");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
if (jumpTimer > 0)
jumpTimer--;
ItemStack chest = mc.player.getItemBySlot(EquipmentSlot.CHEST);
if (chest.getItem() != Items.ELYTRA)
return;
if (mc.player.isFallFlying()) {
if (stopInWater.get() && mc.player.isInWater()) {
sendStartStopPacket();
return;
}
controlSpeed();
controlHeight();
return;
}
if (chest.getDamageValue() < chest.getMaxDamage() - 1 && mc.options.keyJump.isDown())
doInstantFly();
}
class="c-keyword">private void sendStartStopPacket() {
ServerboundPlayerCommandPacket packet = new ServerboundPlayerCommandPacket(mc.player,
ServerboundPlayerCommandPacket.Action.START_FALL_FLYING);
mc.player.connection.send(packet);
}
class="c-keyword">private void controlHeight() {
if (!heightCtrl.get())
return;
Vec3 v = mc.player.getDeltaMovement();
if (mc.options.keyJump.isDown())
mc.player.setDeltaMovement(v.x, v.y + 0.08, v.z);
else if (mc.options.keyShift.isDown())
mc.player.setDeltaMovement(v.x, v.y - 0.04, v.z);
}
class="c-keyword">private void controlSpeed() {
if (!speedCtrl.get())
return;
float yaw = (float) Math.toRadians(mc.player.getYRot());
Vec3 forward = new Vec3(-Mth.sin(yaw) * 0.05, 0,
Mth.cos(yaw) * 0.05);
Vec3 v = mc.player.getDeltaMovement();
if (mc.options.keyUp.isDown())
mc.player.setDeltaMovement(v.add(forward));
else if (mc.options.keyDown.isDown())
mc.player.setDeltaMovement(v.subtract(forward));
}
class="c-keyword">private void doInstantFly() {
if (!instantFly.get())
return;
if (jumpTimer <= 0) {
jumpTimer = 20;
mc.player.setJumping(false);
mc.player.setSprinting(true);
mc.player.jumpFromGround();
}
sendStartStopPacket();
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.utils.RejectsUtils;
import com.google.common.collect.Streams;
import meteordevelopment.meteorclient.events.entity.player.PlayerMoveEvent;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.shapes.VoxelShape;
import java.util.stream.Stream;
class="c-keyword">public class FullFlight extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgAntiKick = settings.createGroup(class="c-str">"Anti Kick");
class="c-keyword">private final Setting<Double> speed = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"speed")
.description(class="c-str">"Your speed when flying.")
.defaultValue(0.3)
.min(0.0)
.sliderMax(10)
.build()
);
class="c-keyword">private final Setting<Boolean> verticalSpeedMatch = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"vertical-speed-match")
.description(class="c-str">"Matches your vertical speed to your horizontal speed, otherwise uses vanilla ratio.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<AntiKickMode> antiKickMode = sgAntiKick.add(new EnumSetting.Builder<AntiKickMode>()
.name(class="c-str">"mode")
.description(class="c-str">"The mode for anti kick.")
.defaultValue(AntiKickMode.PaperNew)
.build()
);
class="c-keyword">public FullFlight() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"fullflight", class="c-str">"FullFlight.");
}
class="c-keyword">private double calculateGround() {
for (double ground = mc.player.getY(); ground > 0D; ground -= 0.05) {
AABB box = mc.player.getBoundingBox();
AABB adjustedBox = box.move(0, ground - mc.player.getY(), 0);
Stream<VoxelShape> blockCollisions = Streams.stream(mc.level.getBlockCollisions(mc.player, adjustedBox));
if (blockCollisions.findAny().isPresent()) return ground + 0.05;
}
return 0F;
}
class="c-comment">// Copied from ServerPlayNetworkHandler#isEntityOnAir
class="c-keyword">private boolean isEntityOnAir(Entity entity) {
return mc.level.getBlockStates(entity.getBoundingBox().inflate(0.0625).expandTowards(0.0, -0.55, 0.0)).allMatch(BlockBehaviour.BlockStateBase::isAir);
}
class="c-keyword">private int delayLeft = 20;
class="c-keyword">private double lastPacketY = Double.MAX_VALUE;
class="c-keyword">private boolean shouldFlyDown(double currentY, double lastY) {
if (currentY >= lastY) {
return true;
} else return lastY - currentY < 0.03130D;
}
class="c-keyword">private ServerboundMovePlayerPacket antiKickPacket(ServerboundMovePlayerPacket packet, double currentY) {
class="c-comment">// maximum time we can be class="c-str">"floating" is 80 ticks, so 4 seconds max
if (this.delayLeft <= 0 && this.lastPacketY != Double.MAX_VALUE &&
shouldFlyDown(currentY, this.lastPacketY) && isEntityOnAir(mc.player)) {
class="c-comment">// actual check is for >= -0.03125D, but we have to do a bit more than that
class="c-comment">// due to the fact that it's a bigger or *equal* to, and not just a bigger than
double newY = lastPacketY - 0.03130D;
lastPacketY = newY;
delayLeft = 20;
class="c-comment">// Create a new packet with the modified Y value
if (packet.hasRotation()) {
return new ServerboundMovePlayerPacket.PosRot(
packet.getX(0),
newY,
packet.getZ(0),
packet.getYRot(0),
packet.getXRot(0),
packet.isOnGround(),
packet.horizontalCollision()
);
} else {
return new ServerboundMovePlayerPacket.Pos(
packet.getX(0),
newY,
packet.getZ(0),
packet.isOnGround(),
packet.horizontalCollision()
);
}
} else {
lastPacketY = currentY;
if (!isEntityOnAir(mc.player))
delayLeft = 20;
}
if (delayLeft > 0) delayLeft--;
return packet;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onSendPacket(PacketEvent.Send event) {
if (mc.player.getVehicle() == null || !(event.packet instanceof ServerboundMovePlayerPacket packet) || antiKickMode.get() != AntiKickMode.PaperNew)
return;
double currentY = packet.getY(Double.MAX_VALUE);
ServerboundMovePlayerPacket modifiedPacket;
if (currentY != Double.MAX_VALUE) {
modifiedPacket = antiKickPacket(packet, currentY);
} else {
class="c-comment">// if the packet is a LookAndOnGround packet or an OnGroundOnly packet then we need to
class="c-comment">// make it a Full packet or a PositionAndOnGround packet respectively, so it has a Y value
ServerboundMovePlayerPacket fullPacket;
if (packet.hasRotation()) {
fullPacket = new ServerboundMovePlayerPacket.PosRot(
mc.player.getX(),
mc.player.getY(),
mc.player.getZ(),
packet.getYRot(0),
packet.getXRot(0),
packet.isOnGround(),
packet.horizontalCollision()
);
} else {
fullPacket = new ServerboundMovePlayerPacket.Pos(
mc.player.getX(),
mc.player.getY(),
mc.player.getZ(),
packet.isOnGround(),
packet.horizontalCollision()
);
}
modifiedPacket = antiKickPacket(fullPacket, mc.player.getY());
}
class="c-comment">// Only cancel and resend if the packet was actually modified
if (modifiedPacket != packet) {
event.cancel();
mc.getConnection().send(modifiedPacket);
}
}
class="c-keyword">private int floatingTicks = 0;
class="c-annotation">@EventHandler
class="c-keyword">private void onPlayerMove(PlayerMoveEvent event) {
if (floatingTicks >= 20) {
switch (antiKickMode.get()) {
case New -> {
AABB box = mc.player.getBoundingBox();
AABB adjustedBox = box.move(0, -0.4, 0);
Stream<VoxelShape> blockCollisions = Streams.stream(mc.level.getBlockCollisions(mc.player, adjustedBox));
if (blockCollisions.findAny().isPresent()) break;
mc.getConnection().send(new ServerboundMovePlayerPacket.Pos(mc.player.getX(), mc.player.getY() - 0.4, mc.player.getZ(), mc.player.onGround(), mc.player.horizontalCollision));
mc.getConnection().send(new ServerboundMovePlayerPacket.Pos(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.onGround(), mc.player.horizontalCollision));
}
case Old -> {
AABB box = mc.player.getBoundingBox();
AABB adjustedBox = box.move(0, -0.4, 0);
Stream<VoxelShape> blockCollisions = Streams.stream(mc.level.getBlockCollisions(mc.player, adjustedBox));
if (blockCollisions.findAny().isPresent()) break;
double ground = calculateGround();
double groundExtra = ground + 0.1D;
for (double posY = mc.player.getY(); posY > groundExtra; posY -= 4D) {
mc.getConnection().send(new ServerboundMovePlayerPacket.Pos(mc.player.getX(), posY, mc.player.getZ(), true, mc.player.horizontalCollision));
if (posY - 4D < groundExtra) break; class="c-comment">// Prevent next step
}
mc.getConnection().send(new ServerboundMovePlayerPacket.Pos(mc.player.getX(), groundExtra, mc.player.getZ(), true, mc.player.horizontalCollision));
for (double posY = groundExtra; posY < mc.player.getY(); posY += 4D) {
mc.getConnection().send(new ServerboundMovePlayerPacket.Pos(mc.player.getX(), posY, mc.player.getZ(), mc.player.onGround(), mc.player.horizontalCollision));
if (posY + 4D > mc.player.getY()) break; class="c-comment">// Prevent next step
}
mc.getConnection().send(new ServerboundMovePlayerPacket.Pos(mc.player.getX(), mc.player.getY(), mc.player.getZ(), mc.player.onGround(), mc.player.horizontalCollision));
}
}
floatingTicks = 0;
}
float ySpeed = RejectsUtils.fullFlightMove(event, speed.get(), verticalSpeedMatch.get());
if (floatingTicks < 20)
if (ySpeed >= -0.1)
floatingTicks++;
else if (antiKickMode.get() == AntiKickMode.New)
floatingTicks = 0;
}
class="c-keyword">public enum AntiKickMode {
Old,
New,
PaperNew,
None
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.settings.GameModeListSetting;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.multiplayer.PlayerInfo;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.world.level.GameType;
import java.util.List;
class="c-keyword">public class GamemodeNotifier extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<List<GameType>> gamemodes = sgGeneral.add(new GameModeListSetting.Builder()
.name(class="c-str">"gamemode")
.description(class="c-str">"Which gamemodes to notify.")
.build()
);
class="c-keyword">public GamemodeNotifier() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"gamemode-notifier", class="c-str">"Notifies user a player's gamemode was changed.");
}
class="c-annotation">@EventHandler
class="c-keyword">public void onPacket(PacketEvent.Receive event) {
if (event.packet instanceof ClientboundPlayerInfoUpdatePacket packet) {
for (ClientboundPlayerInfoUpdatePacket.Entry entry : packet.entries()) {
if (!packet.actions().contains(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE)) continue;
PlayerInfo entry1 = mc.getConnection().getPlayerInfo(entry.profileId());
if (entry1 == null) continue;
GameType gameMode = entry.gameMode();
if (entry1.getGameMode() != gameMode) {
if (!gamemodes.get().contains(gameMode)) continue;
info(class="c-str">"Player %s changed gamemode to %s", entry1.getProfile().name(), entry.gameMode());
}
}
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.game.GameJoinedEvent;
import meteordevelopment.meteorclient.events.game.OpenScreenEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.gui.screens.DeathScreen;
class="c-keyword">public class GhostMode extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> fullFood = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"full-food")
.description(class="c-str">"Sets the food level client-side to max.")
.defaultValue(true)
.build()
);
class="c-keyword">public GhostMode() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"ghost-mode", class="c-str">"Allows you to keep playing after you die. Works on Forge, Fabric and Vanilla servers.");
}
class="c-keyword">private boolean active = false;
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
super.onDeactivate();
active = false;
warning(class="c-str">"You are no longer in a ghost mode!");
if (mc.player != null && mc.player.connection != null) {
mc.player.respawn();
info(class="c-str">"Respawn request has been sent to the server.");
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onGameJoin(GameJoinedEvent event) {
active = false;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (!active) return;
if (mc.player.getHealth() < 1f) mc.player.setHealth(20f);
if (fullFood.get() && mc.player.getFoodData().getFoodLevel() < 20) {
mc.player.getFoodData().setFoodLevel(20);
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onOpenScreen(OpenScreenEvent event) {
if (event.screen instanceof DeathScreen) {
event.cancel();
if (!active) {
active = true;
info(class="c-str">"You are now in a ghost mode. ");
}
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.events.OffGroundSpeedEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.DoubleSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
class="c-keyword">public class Glide extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">public final Setting<Double> fallSpeed = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"fall-speed")
.description(class="c-str">"Fall speed.")
.defaultValue(0.125)
.min(0.005)
.sliderRange(0.005, 0.25)
.build()
);
class="c-keyword">public final Setting<Double> moveSpeed = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"move-speed")
.description(class="c-str">"Horizontal movement factor.")
.defaultValue(1.2)
.min(1)
.sliderRange(1, 5)
.build()
);
class="c-keyword">public final Setting<Double> minHeight = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"min-height")
.description(class="c-str">"Won't glide when you are too close to the ground.")
.defaultValue(0)
.min(0)
.sliderRange(0, 2)
.build()
);
class="c-keyword">public Glide() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"glide", class="c-str">"Yeehaw!");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
LocalPlayer player = mc.player;
Vec3 v = player.getDeltaMovement();
if (player.onGround() || player.isInWater() || player.isInLava() || player.onClimbable() || v.y >= 0)
return;
if (minHeight.get() > 0) {
AABB box = player.getBoundingBox();
box = box.minmax(box.move(0, -minHeight.get(), 0));
if (!mc.level.noCollision(box)) return;
}
player.setDeltaMovement(v.x, Math.max(v.y, -fallSpeed.get()), v.z);
}
class="c-annotation">@EventHandler
class="c-keyword">private void onOffGroundSpeed(OffGroundSpeedEvent event) {
event.speed *= moveSpeed.get().floatValue();
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.gui.screens.InteractionScreen;
import dev.voidaddons.settings.StringMapSetting;
import meteordevelopment.meteorclient.gui.utils.StarscriptTextBoxRenderer;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.misc.Keybind;
import meteordevelopment.meteorclient.utils.misc.MeteorStarscript;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import net.minecraft.client.renderer.debug.DebugRenderer;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import org.meteordev.starscript.value.Value;
import org.meteordev.starscript.value.ValueMap;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
class="c-keyword">public class InteractionMenu extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgStyle = settings.createGroup(class="c-str">"Style");
class="c-keyword">private final Setting<Set<EntityType<?>>> entities = sgGeneral.add(new EntityTypeListSetting.Builder()
.name(class="c-str">"entities")
.description(class="c-str">"Entities")
.defaultValue(EntityType.PLAYER)
.build()
);
class="c-keyword">public final Setting<Keybind> keybind = sgGeneral.add(new KeybindSetting.Builder()
.name(class="c-str">"keybind")
.description(class="c-str">"The keybind to open.")
.action(this::onKey)
.build()
);
class="c-keyword">public final Setting<Boolean> useCrosshairTarget = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"use-crosshair-target")
.description(class="c-str">"Use crosshair target.")
.defaultValue(false)
.build()
);
class="c-comment">// Style
class="c-keyword">public final Setting<SettingColor> selectedDotColor = sgStyle.add(new ColorSetting.Builder()
.name(class="c-str">"selected-dot-color")
.description(class="c-str">"Color of the dot when selected.")
.defaultValue(new SettingColor(76, 255, 0))
.build()
);
class="c-keyword">public final Setting<SettingColor> dotColor = sgStyle.add(new ColorSetting.Builder()
.name(class="c-str">"dot-color")
.description(class="c-str">"Color of the dot when.")
.defaultValue(new SettingColor(0, 148, 255))
.build()
);
class="c-keyword">public final Setting<SettingColor> backgroundColor = sgStyle.add(new ColorSetting.Builder()
.name(class="c-str">"background-color")
.description(class="c-str">"Color of the background.")
.defaultValue(new SettingColor(128, 128, 128, 128))
.build()
);
class="c-keyword">public final Setting<SettingColor> borderColor = sgStyle.add(new ColorSetting.Builder()
.name(class="c-str">"border-color")
.description(class="c-str">"Color of the border.")
.defaultValue(new SettingColor(0, 0, 0))
.build()
);
class="c-keyword">public final Setting<SettingColor> textColor = sgStyle.add(new ColorSetting.Builder()
.name(class="c-str">"text-color")
.description(class="c-str">"Color of the text.")
.defaultValue(new SettingColor(255, 255, 255))
.build()
);
class="c-keyword">public final Setting<Map<String, String>> messages = sgGeneral.add(new StringMapSetting.Builder()
.name(class="c-str">"messages")
.description(class="c-str">"Messages.")
.renderer(StarscriptTextBoxRenderer.class)
.build()
);
class="c-keyword">public InteractionMenu() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"interaction-menu", class="c-str">"An interaction screen when looking at an entity.");
MeteorStarscript.ss.set(class="c-str">"entity", () -> wrap(InteractionScreen.interactionMenuEntity));
}
class="c-keyword">public void onKey() {
if (mc.player == null || mc.screen != null) return;
Entity e = null;
if (useCrosshairTarget.get()) {
e = mc.crosshairPickEntity;
} else {
Optional<Entity> lookingAt = DebugRenderer.getTargetedEntity(mc.player, 20);
if (lookingAt.isPresent()) {
e = lookingAt.get();
}
}
if (e == null) return;
if (entities.get().contains(e.getType())) {
mc.setScreen(new InteractionScreen(e, this));
}
}
class="c-keyword">private static Value wrap(Entity entity) {
if (entity == null) {
return Value.map(new ValueMap()
.set(class="c-str">"_toString", Value.null_())
.set(class="c-str">"health", Value.null_())
.set(class="c-str">"pos", Value.map(new ValueMap()
.set(class="c-str">"_toString", Value.null_())
.set(class="c-str">"x", Value.null_())
.set(class="c-str">"y", Value.null_())
.set(class="c-str">"z", Value.null_())
))
.set(class="c-str">"uuid", Value.null_())
);
}
return Value.map(new ValueMap()
.set(class="c-str">"_toString", Value.string(entity.getName().getString()))
.set(class="c-str">"health", Value.number(entity instanceof LivingEntity e ? e.getHealth() : 0))
.set(class="c-str">"pos", Value.map(new ValueMap()
.set(class="c-str">"_toString", posString(entity.getX(), entity.getY(), entity.getZ()))
.set(class="c-str">"x", Value.number(entity.getX()))
.set(class="c-str">"y", Value.number(entity.getY()))
.set(class="c-str">"z", Value.number(entity.getZ()))
))
.set(class="c-str">"uuid", Value.string(entity.getStringUUID()))
);
}
class="c-keyword">private static Value posString(double x, double y, double z) {
return Value.string(String.format(class="c-str">"X: %.0f Y: %.0f Z: %.0f", x, y, z));
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.Holder;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.network.protocol.game.ServerboundSetCreativeModeSlotPacket;
import net.minecraft.util.RandomSource;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
class="c-keyword">public class ItemGenerator extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Integer> speed = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"speed")
.description(class="c-str">"Stacks per tick. High speeds may cause lag.")
.defaultValue(1)
.min(1)
.max(36)
.sliderMax(36)
.build()
);
class="c-keyword">private final Setting<Integer> stackSize = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"stack-size")
.description(class="c-str">"How many items to place in each stack. ")
.defaultValue(1)
.min(1)
.max(64)
.sliderMax(64)
.build()
);
class="c-keyword">private final RandomSource random = RandomSource.create();
class="c-keyword">public ItemGenerator() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"item-generator", class="c-str">"Generates random items and drops them on the ground. Creative mode only.");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
if(!mc.player.getAbilities().instabuild) {
error(class="c-str">"Creative mode only.");
this.toggle();
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
int stacks = speed.get();
int size = stackSize.get();
for(int i = 9; i < 9 + stacks; i++) {
mc.player.connection.send(new ServerboundSetCreativeModeSlotPacket(i, new ItemStack(BuiltInRegistries.ITEM.getRandom(random).map(Holder::value).orElse(Items.DIRT), size)));
}
for(int i = 9; i < 9 + stacks; i++) {
InvUtils.drop().slot(i);
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.events.OffGroundSpeedEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.mixininterface.IVec3d;
import meteordevelopment.meteorclient.settings.DoubleSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
class="c-keyword">public class Jetpack extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Double> jetpackSpeed = sgGeneral.add(new DoubleSetting.Builder()
.name(class="c-str">"jetpack-speed")
.description(class="c-str">"How fast while ascending.")
.defaultValue(0.42)
.min(0)
.sliderMax(1)
.build()
);
class="c-keyword">public Jetpack() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"jetpack", class="c-str">"Flies as if using a jetpack.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (mc.options.keyJump.isDown()) {
((IVec3d) mc.player.getDeltaMovement()).meteor$setY(jetpackSpeed.get());
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onOffGroundSpeed(OffGroundSpeedEvent event) {
event.speed = mc.player.getSpeed() * jetpackSpeed.get().floatValue();
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.mixininterface.IPlayerInteractEntityC2SPacket;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.combat.KillAura;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ServerboundInteractPacket;
import net.minecraft.network.protocol.game.ServerboundPlayerCommandPacket;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.phys.Vec3;
import org.jspecify.annotations.NonNull;
class="c-keyword">public class KnockbackPlus extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> ka = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"only-killaura")
.description(class="c-str">"Only perform more KB when using killaura.")
.defaultValue(false)
.build()
);
class="c-keyword">public KnockbackPlus() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"knockback-plus", class="c-str">"Performs more KB when you hit your target.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onSendPacket(PacketEvent.Send event) {
if (event.packet instanceof ServerboundInteractPacket packet) {
packet.dispatch(new ServerboundInteractPacket.Handler() {
class="c-annotation">@Override
class="c-keyword">public void onInteraction(class="c-annotation">@NonNull InteractionHand interactionHand) {
}
class="c-annotation">@Override
class="c-keyword">public void onInteraction(class="c-annotation">@NonNull InteractionHand interactionHand, class="c-annotation">@NonNull Vec3 vec3) {
}
class="c-annotation">@Override
class="c-keyword">public void onAttack() {
Entity entity = ((IPlayerInteractEntityC2SPacket) packet).meteor$getEntity();
if (!(entity instanceof LivingEntity) || (entity != Modules.get().get(KillAura.class).getTarget() && ka.get()))
return;
assert mc.player != null;
mc.player.connection.send(new ServerboundPlayerCommandPacket(mc.player, ServerboundPlayerCommandPacket.Action.START_SPRINTING));
}
});
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.render.Render3DEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.renderer.ShapeMode;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.utils.player.Rotations;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Vec3i;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
class="c-keyword">public class Lavacast extends Module {
class="c-keyword">private enum Stage {
None,
LavaDown,
LavaUp,
WaterDown,
WaterUp
}
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgShape = settings.createGroup(class="c-str">"Shape", false);
class="c-keyword">private final Setting<Integer> tickInterval = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"tick-interval")
.description(class="c-str">"Interval")
.defaultValue(2)
.min(0)
.sliderMax(20)
.build()
);
class="c-keyword">private final Setting<Integer> distMin = sgShape.add(new IntSetting.Builder()
.name(class="c-str">"minimum-distance")
.description(class="c-str">"Top plane cutoff")
.defaultValue(5)
.min(0)
.sliderMax(10)
.build()
);
class="c-keyword">private final Setting<Integer> lavaDownMult = sgShape.add(new IntSetting.Builder()
.name(class="c-str">"lava-down-mulipiler")
.description(class="c-str">"Controls the shape of the cast")
.defaultValue(40)
.min(1)
.sliderMax(100)
.build()
);
class="c-keyword">private final Setting<Integer> lavaUpMult = sgShape.add(new IntSetting.Builder()
.name(class="c-str">"lava-up-mulipiler")
.description(class="c-str">"Controls the shape of the cast")
.defaultValue(8)
.min(1)
.sliderMax(100)
.build()
);
class="c-keyword">private final Setting<Integer> waterDownMult = sgShape.add(new IntSetting.Builder()
.name(class="c-str">"water-down-mulipiler")
.description(class="c-str">"Controls the shape of the cast")
.defaultValue(4)
.min(1)
.sliderMax(100)
.build()
);
class="c-keyword">private final Setting<Integer> waterUpMult = sgShape.add(new IntSetting.Builder()
.name(class="c-str">"water-up-mulipiler")
.description(class="c-str">"Controls the shape of the cast")
.defaultValue(1)
.min(1)
.sliderMax(100)
.build()
);
class="c-keyword">private int dist;
class="c-keyword">private BlockPos placeFluidPos;
class="c-keyword">private int tick;
class="c-keyword">private Stage stage = Stage.None;
class="c-keyword">public Lavacast() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"lavacast", class="c-str">"Automatically Lavacasts");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
if (mc.player == null || mc.level == null) toggle();
tick = 0;
stage = Stage.None;
placeFluidPos = getTargetBlockPos();
if (placeFluidPos == null) {
placeFluidPos = mc.player.blockPosition().below(2);
} else {
placeFluidPos = placeFluidPos.above();
}
dist=-1;
getDistance(new Vec3i(1,0,0));
getDistance(new Vec3i(-1,0,0));
getDistance(new Vec3i(0,0,1));
getDistance(new Vec3i(0,0,-1));
if (dist<1) {
error(class="c-str">"Couldn't locate bottom.");
toggle();
return;
}
info(class="c-str">"Distance: (highlight)%d(default).", dist);
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (mc.player == null || mc.level == null) return;
tick++;
if (shouldBreakOnTick()) return;
if (dist < distMin.get()) toggle();
tick = 0;
if (checkMineBlock()) return;
switch (stage) {
case None: {
Rotations.rotate(Rotations.getYaw(placeFluidPos),Rotations.getPitch(placeFluidPos),100, this::placeLava);
stage = Stage.LavaDown;
break;
}
case LavaDown: {
Rotations.rotate(Rotations.getYaw(placeFluidPos),Rotations.getPitch(placeFluidPos),100, this::pickupLiquid);
stage = Stage.LavaUp;
break;
}
case LavaUp: {
Rotations.rotate(Rotations.getYaw(placeFluidPos),Rotations.getPitch(placeFluidPos),100, this::placeWater);
stage = Stage.WaterDown;
break;
}
case WaterDown: {
Rotations.rotate(Rotations.getYaw(placeFluidPos),Rotations.getPitch(placeFluidPos),100, this::pickupLiquid);
stage = Stage.WaterUp;
break;
}
case WaterUp: {
dist--;
Rotations.rotate(Rotations.getYaw(placeFluidPos),Rotations.getPitch(placeFluidPos),100, this::placeLava);
stage = Stage.LavaDown;
break;
}
default:
break;
}
}
class="c-keyword">private boolean shouldBreakOnTick() {
if (stage == Stage.LavaDown && tick < dist*lavaDownMult.get()) return true;
if (stage == Stage.LavaUp && tick < dist*lavaUpMult.get()) return true;
if (stage == Stage.WaterDown && tick < dist*waterDownMult.get()) return true;
if (stage == Stage.WaterUp && tick < dist*waterUpMult.get()) return true;
if (tick < tickInterval.get()) return true;
return false;
}
class="c-keyword">private boolean checkMineBlock() {
if (stage == Stage.None && mc.level.getBlockState(placeFluidPos).getBlock() != Blocks.AIR) {
Rotations.rotate(Rotations.getYaw(placeFluidPos), Rotations.getPitch(placeFluidPos), 100, this::updateBlockBreakingProgress);
return true;
}
return false;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onRender(Render3DEvent event) {
if (placeFluidPos == null) return;
double x1 = placeFluidPos.getX();
double y1 = placeFluidPos.getY();
double z1 = placeFluidPos.getZ();
double x2 = x1+1;
double y2 = y1+1;
double z2 = z1+1;
SettingColor lineColor = new SettingColor(128, 128, 128);
if (stage == Stage.LavaDown) lineColor = new SettingColor(255, 180, 10);
if (stage == Stage.LavaUp) lineColor = new SettingColor(255, 180, 128);
if (stage == Stage.WaterDown) lineColor = new SettingColor(10, 10, 255);
if (stage == Stage.WaterUp) lineColor = new SettingColor(128, 128, 255);
SettingColor sideColor = new SettingColor(lineColor.r, lineColor.g, lineColor.b, 75);
event.renderer.box(x1, y1, z1, x2, y2, z2, sideColor, lineColor, ShapeMode.Both, 0);
}
class="c-keyword">private void placeLava() {
FindItemResult findItemResult = InvUtils.findInHotbar(Items.LAVA_BUCKET);
if (!findItemResult.found()) {
error(class="c-str">"No lava bucket found.");
toggle();
return;
}
InvUtils.swap(findItemResult.slot(), true);
mc.gameMode.useItem(mc.player, InteractionHand.MAIN_HAND);
InvUtils.swapBack();
}
class="c-keyword">private void placeWater() {
FindItemResult findItemResult = InvUtils.findInHotbar(Items.WATER_BUCKET);
if (!findItemResult.found()) {
error(class="c-str">"No water bucket found.");
toggle();
return;
}
InvUtils.swap(findItemResult.slot(), true);
mc.gameMode.useItem(mc.player, InteractionHand.MAIN_HAND);
InvUtils.swapBack();
}
class="c-keyword">private void pickupLiquid() {
FindItemResult findItemResult = InvUtils.findInHotbar(Items.BUCKET);
if (!findItemResult.found()) {
error(class="c-str">"No bucket found.");
toggle();
return;
}
InvUtils.swap(findItemResult.slot(), true);
mc.gameMode.useItem(mc.player, InteractionHand.MAIN_HAND);
InvUtils.swapBack();
}
class="c-keyword">private void updateBlockBreakingProgress() {
mc.gameMode.continueDestroyBlock(placeFluidPos,Direction.UP);
}
class="c-keyword">private BlockPos getTargetBlockPos() {
HitResult blockHit = mc.hitResult;
if (blockHit.getType() != HitResult.Type.BLOCK) {
return null;
}
return ((BlockHitResult) blockHit).getBlockPos();
}
class="c-keyword">private void getDistance(Vec3i offset) {
BlockPos pos = placeFluidPos.below().offset(offset);
int new_dist;
final BlockHitResult result = mc.level.clip(new ClipContext(
Vec3.atCenterOf(pos), Vec3.atCenterOf(pos.below(250)), ClipContext.Block.COLLIDER, ClipContext.Fluid.ANY, mc.player
));
if (result == null || result.getType() != HitResult.Type.BLOCK) {
return;
}
new_dist = placeFluidPos.getY() - result.getBlockPos().getY();
if (new_dist>dist) dist = new_dist;
}
class="c-annotation">@Override
class="c-keyword">public String getInfoString() {
return stage.toString();
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.inventory.ClickType;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3;
import java.util.ArrayList;
import java.util.List;
class="c-comment">//https://github.com/DustinRepo/JexClient/blob/main/src/main/java/me/dustin/jex/feature/mod/impl/world/LawnBot.java
class="c-keyword">public class LawnBot extends Module {
class="c-keyword">private final ArrayList<BlockPos> myceliumSpots = new ArrayList<>();
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<List<Block>> blockWhitelist = sgGeneral.add(new BlockListSetting.Builder()
.name(class="c-str">"block-whitelist")
.description(class="c-str">"Which blocks to replace with grass.")
.defaultValue()
.filter(this::grassFilter)
.build()
);
class="c-keyword">private final Setting<Integer> range = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"range")
.description(class="c-str">"The range to search for blocks to replace.")
.defaultValue(5)
.min(1)
.sliderMax(10)
.build()
);
class="c-keyword">private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"delay")
.description(class="c-str">"The delay between block placements in ticks.")
.defaultValue(0)
.min(0)
.sliderMax(20)
.build()
);
class="c-keyword">private final Setting<Boolean> useShovel = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"use-shovel")
.description(class="c-str">"Automatically switch to shovel when breaking blocks.")
.defaultValue(true)
.build()
);
class="c-keyword">private int tickCounter = 0;
class="c-keyword">public LawnBot() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"lawnbot", class="c-str">"Replace a variety of dirt-type blocks with grass");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
class="c-comment">// Apply delay
if (delay.get() > 0) {
if (tickCounter < delay.get()) {
tickCounter++;
return;
}
tickCounter = 0;
}
Item grassBlockItem = Items.GRASS_BLOCK;
int grassCount = InvUtils.find(grassBlockItem).count();
if (grassCount == 0) {
return;
}
int grassHotbarSlot = InvUtils.findInHotbar((itemStack -> itemStack.getItem() == grassBlockItem)).slot();
if (grassHotbarSlot == -1) {
int grassInvSlot = InvUtils.find((itemStack -> itemStack.getItem() == grassBlockItem)).slot();
if (grassInvSlot == -1)
return;
mc.gameMode.handleInventoryMouseClick(mc.player.containerMenu.containerId, grassInvSlot < 9 ? grassInvSlot + 36 : grassInvSlot, 8, ClickType.SWAP, mc.player);
return;
}
int rangeValue = range.get();
for (int i = 0; i < myceliumSpots.size(); i++) {
BlockPos pos = myceliumSpots.get(i);
Block block = mc.level.getBlockState(pos).getBlock();
double distance = new Vec3(mc.player.getX(), mc.player.getY(), mc.player.getZ()).distanceTo(new Vec3(pos.getX(), pos.getY(), pos.getZ()));
if (block == Blocks.AIR && distance <= rangeValue) {
mc.player.getInventory().setSelectedSlot(grassHotbarSlot);
mc.gameMode.useItemOn(mc.player, InteractionHand.MAIN_HAND, new BlockHitResult(new Vec3(pos.getX(), pos.getY(), pos.getZ()), Direction.UP, pos, false));
return;
} else if (!blockWhitelist.get().contains(block)) {
myceliumSpots.remove(i);
}
}
for (int i = 0; i < myceliumSpots.size(); i++) {
BlockPos pos = myceliumSpots.get(i);
Block block = mc.level.getBlockState(pos).getBlock();
double distance = new Vec3(mc.player.getX(), mc.player.getY(), mc.player.getZ()).distanceTo(new Vec3(pos.getX(), pos.getY(), pos.getZ()));
if (blockWhitelist.get().contains(block) && distance <= rangeValue) {
class="c-comment">// Switch to shovel if enabled
if (useShovel.get()) {
int shovelSlot = InvUtils.findInHotbar(itemStack ->
itemStack.getItem() == Items.NETHERITE_SHOVEL ||
itemStack.getItem() == Items.DIAMOND_SHOVEL ||
itemStack.getItem() == Items.IRON_SHOVEL ||
itemStack.getItem() == Items.GOLDEN_SHOVEL ||
itemStack.getItem() == Items.STONE_SHOVEL ||
itemStack.getItem() == Items.WOODEN_SHOVEL
).slot();
if (shovelSlot != -1) {
mc.player.getInventory().setSelectedSlot(shovelSlot);
}
}
mc.gameMode.continueDestroyBlock(pos, Direction.UP);
return;
}
}
myceliumSpots.clear();
for (int x = -rangeValue; x < rangeValue; x++) {
for (int y = -3; y < 3; y++) {
for (int z = -rangeValue; z < rangeValue; z++) {
BlockPos pos = mc.player.blockPosition().offset(x, y, z);
if (blockWhitelist.get().contains(mc.level.getBlockState(pos).getBlock())) {
myceliumSpots.add(pos);
}
}
}
}
}
class="c-keyword">private boolean grassFilter(Block block) {
return block == Blocks.MYCELIUM ||
block == Blocks.PODZOL ||
block == Blocks.DIRT_PATH ||
block == Blocks.COARSE_DIRT ||
block == Blocks.ROOTED_DIRT;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.utils.WorldUtils;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.item.Items;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.Vec3;
import org.apache.commons.lang3.tuple.Pair;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
class="c-keyword">public class MossBot extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Integer> range = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"range")
.description(class="c-str">"The bonemeal range.")
.defaultValue(4)
.min(0)
.build()
);
class="c-keyword">private final Setting<Boolean> rotate = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"rotate")
.description(class="c-str">"Whether or not to rotate towards block while bonemealing.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Map<BlockPos, Integer> mossMap = new HashMap<>();
class="c-keyword">public MossBot() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"moss-bot", class="c-str">"Use bonemeal on moss blocks with maximized efficiency.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
mossMap.entrySet().removeIf(e -> e.setValue(e.getValue() - 1) == 0);
FindItemResult findItemResult = InvUtils.findInHotbar(Items.BONE_MEAL);
if (!findItemResult.found()) {
return;
}
BlockPos bestBlock = BlockPos.withinManhattanStream(BlockPos.containing(mc.player.getEyePosition()), range.get(), range.get(), range.get())
.filter(b -> mc.player.getEyePosition().distanceTo(Vec3.atCenterOf(b)) <= range.get() && !mossMap.containsKey(b))
.map(b -> Pair.of(b.immutable(), getMossSpots(b)))
.filter(p -> p.getRight() > 10)
.map(Pair::getLeft)
.max(Comparator.naturalOrder()).orElse(null);
if (bestBlock != null) {
if (!mc.level.isEmptyBlock(bestBlock.above())) {
mc.gameMode.continueDestroyBlock(bestBlock.above(), Direction.UP);
}
WorldUtils.interact(bestBlock, findItemResult, rotate.get());
mossMap.put(bestBlock, 100);
}
}
class="c-keyword">private int getMossSpots(BlockPos pos) {
Block block = mc.level.getBlockState(pos).getBlock();
if ((block != Blocks.MOSS_BLOCK && block != Blocks.PALE_MOSS_BLOCK)
|| mc.level.getBlockState(pos.above()).getDestroySpeed(mc.level, pos) != 0f) {
return 0;
}
return (int) BlockPos.withinManhattanStream(pos, 3, 4, 3)
.filter(b -> isMossGrowableOn(mc.level.getBlockState(b)) && mc.level.isEmptyBlock(b.above()))
.count();
}
class="c-keyword">private boolean isMossGrowableOn(BlockState state) {
return state.is(BlockTags.MOSS_REPLACEABLE);
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.events.render.Render3DEvent;
import meteordevelopment.meteorclient.renderer.ShapeMode;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.render.color.Color;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.Direction;
import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
import net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket;
import net.minecraft.network.protocol.game.ClientboundSectionBlocksUpdatePacket;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
class="c-comment">/*
Ported from: https:class="c-comment">//github.com/BleachDrinker420/BleachHack/blob/master/BleachHack-Fabric-1.16/src/main/java/bleach/hack/module/mods/NewChunks.java
*/
class="c-keyword">public class NewChunks extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgRender = settings.createGroup(class="c-str">"Render");
class="c-comment">// general
class="c-keyword">private final Setting<Boolean> remove = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"remove")
.description(class="c-str">"Removes the cached chunks when disabling the module.")
.defaultValue(true)
.build()
);
class="c-comment">// render
class="c-keyword">public final Setting<Integer> renderHeight = sgRender.add(new IntSetting.Builder()
.name(class="c-str">"render-height")
.description(class="c-str">"The height at which new chunks will be rendered")
.defaultValue(0)
.min(-64)
.sliderRange(-64,319)
.build()
);
class="c-keyword">private final Setting<ShapeMode> shapeMode = sgRender.add(new EnumSetting.Builder<ShapeMode>()
.name(class="c-str">"shape-mode")
.description(class="c-str">"How the shapes are rendered.")
.defaultValue(ShapeMode.Both)
.build()
);
class="c-keyword">private final Setting<SettingColor> newChunksSideColor = sgRender.add(new ColorSetting.Builder()
.name(class="c-str">"new-chunks-side-color")
.description(class="c-str">"Color of the chunks that are (most likely) completely new.")
.defaultValue(new SettingColor(255, 0, 0, 75))
.visible(() -> shapeMode.get() == ShapeMode.Sides || shapeMode.get() == ShapeMode.Both)
.build()
);
class="c-keyword">private final Setting<SettingColor> oldChunksSideColor = sgRender.add(new ColorSetting.Builder()
.name(class="c-str">"old-chunks-side-color")
.description(class="c-str">"Color of the chunks that have (most likely) been loaded before.")
.defaultValue(new SettingColor(0, 255, 0, 75))
.visible(() -> shapeMode.get() == ShapeMode.Sides || shapeMode.get() == ShapeMode.Both)
.build()
);
class="c-keyword">private final Setting<SettingColor> newChunksLineColor = sgRender.add(new ColorSetting.Builder()
.name(class="c-str">"new-chunks-line-color")
.description(class="c-str">"Color of the chunks that are (most likely) completely new.")
.defaultValue(new SettingColor(255, 0, 0, 255))
.visible(() -> shapeMode.get() == ShapeMode.Lines || shapeMode.get() == ShapeMode.Both)
.build()
);
class="c-keyword">private final Setting<SettingColor> oldChunksLineColor = sgRender.add(new ColorSetting.Builder()
.name(class="c-str">"old-chunks-line-color")
.description(class="c-str">"Color of the chunks that have (most likely) been loaded before.")
.defaultValue(new SettingColor(0, 255, 0, 255))
.visible(() -> shapeMode.get() == ShapeMode.Lines || shapeMode.get() == ShapeMode.Both)
.build()
);
class="c-keyword">private final Set<ChunkPos> newChunks = Collections.synchronizedSet(new HashSet<>());
class="c-keyword">private final Set<ChunkPos> oldChunks = Collections.synchronizedSet(new HashSet<>());
class="c-keyword">private static final Direction[] searchDirs = new Direction[] { Direction.EAST, Direction.NORTH, Direction.WEST, Direction.SOUTH, Direction.UP };
class="c-keyword">private final Executor taskExecutor = Executors.newSingleThreadExecutor();
class="c-keyword">public NewChunks() {
super(VoidAddonsAddon.CATEGORY,class="c-str">"new-chunks", class="c-str">"Detects completely new chunks using certain traits of them");
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
if (remove.get()) {
newChunks.clear();
oldChunks.clear();
}
super.onDeactivate();
}
class="c-annotation">@EventHandler
class="c-keyword">private void onRender(Render3DEvent event) {
if (newChunksLineColor.get().a > 5 || newChunksSideColor.get().a > 5) {
synchronized (newChunks) {
for (ChunkPos c : newChunks) {
if (mc.getCameraEntity().blockPosition().closerThan(c.getWorldPosition(), 1024)) {
render(new AABB(Vec3.atLowerCornerOf(c.getWorldPosition()), Vec3.atLowerCornerOf(c.getWorldPosition().offset(16, renderHeight.get(), 16))), newChunksSideColor.get(), newChunksLineColor.get(), shapeMode.get(), event);
}
}
}
}
if (oldChunksLineColor.get().a > 5 || oldChunksSideColor.get().a > 5){
synchronized (oldChunks) {
for (ChunkPos c : oldChunks) {
if (mc.getCameraEntity().blockPosition().closerThan(c.getWorldPosition(), 1024)) {
render(new AABB(Vec3.atLowerCornerOf(c.getWorldPosition()), Vec3.atLowerCornerOf(c.getWorldPosition().offset(16, renderHeight.get(), 16))), oldChunksSideColor.get(), oldChunksLineColor.get(), shapeMode.get(), event);
}
}
}
}
}
class="c-keyword">private void render(AABB box, Color sides, Color lines, ShapeMode shapeMode, Render3DEvent event) {
event.renderer.box(
box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ, sides, lines, shapeMode, 0);
}
class="c-annotation">@EventHandler
class="c-keyword">private void onReadPacket(PacketEvent.Receive event) {
if (event.packet instanceof ClientboundSectionBlocksUpdatePacket) {
ClientboundSectionBlocksUpdatePacket packet = (ClientboundSectionBlocksUpdatePacket) event.packet;
packet.runUpdates((pos, state) -> {
if (!state.getFluidState().isEmpty() && !state.getFluidState().isSource()) {
ChunkPos chunkPos = new ChunkPos(pos);
for (Direction dir: searchDirs) {
if (mc.level.getBlockState(pos.relative(dir)).getFluidState().isSource() && !oldChunks.contains(chunkPos)) {
newChunks.add(chunkPos);
return;
}
}
}
});
}
else if (event.packet instanceof ClientboundBlockUpdatePacket) {
ClientboundBlockUpdatePacket packet = (ClientboundBlockUpdatePacket) event.packet;
if (!packet.getBlockState().getFluidState().isEmpty() && !packet.getBlockState().getFluidState().isSource()) {
ChunkPos chunkPos = new ChunkPos(packet.getPos());
for (Direction dir: searchDirs) {
if (mc.level.getBlockState(packet.getPos().relative(dir)).getFluidState().isSource() && !oldChunks.contains(chunkPos)) {
newChunks.add(chunkPos);
return;
}
}
}
}
else if (event.packet instanceof ClientboundLevelChunkWithLightPacket && mc.level != null) {
ClientboundLevelChunkWithLightPacket packet = (ClientboundLevelChunkWithLightPacket) event.packet;
ChunkPos pos = new ChunkPos(packet.getX(), packet.getZ());
if (!newChunks.contains(pos) && mc.level.getChunkSource().getChunkForLighting(packet.getX(), packet.getZ()) == null) {
LevelChunk chunk = new LevelChunk(mc.level, pos);
try {
taskExecutor.execute(() -> chunk.replaceWithPacketData(packet.getChunkData().getReadBuffer(), new java.util.HashMap<>(), packet.getChunkData().getBlockEntitiesTagsConsumer(packet.getX(), packet.getZ())));
} catch (ArrayIndexOutOfBoundsException e) {
return;
}
for (int x = 0; x < 16; x++) {
for (int z = 0; z < 16; z++) {
for (int y = mc.level.getMinY(); y < mc.level.getHeight(Heightmap.Types.MOTION_BLOCKING, x, z); y++) {
FluidState fluid = chunk.getFluidState(x, y, z);
if (!fluid.isEmpty() && !fluid.isSource()) {
oldChunks.add(pos);
return;
}
}
}
}
}
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.mixin.LivingEntityAccessor;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.orbit.EventHandler;
import meteordevelopment.meteorclient.systems.modules.Module;
class="c-keyword">public class NoJumpDelay extends Module {
class="c-keyword">public NoJumpDelay() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"no-jump-delay", class="c-str">"NoJumpDelay.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
if (mc.player == null) return;
((LivingEntityAccessor) mc.player).setJumpingCooldown(0);
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.player.AutoEat;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.component.DataComponents;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Optional;
class="c-keyword">public class ObsidianFarm extends Module {
class="c-keyword">private boolean allowBreakAgain;
class="c-keyword">public ObsidianFarm() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"obsidian-farm", class="c-str">"Auto obsidian farm(portals).");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
allowBreakAgain = true;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
if (mc.player == null) return;
if (mc.level == null) return;
if (mc.gameMode == null) return;
if (mc.level.dimension() == Level.NETHER) {
allowBreakAgain = true;
return;
}
if (!allowBreakAgain) return;
if ((mc.player.isUsingItem() || Modules.get().get(AutoEat.class).isActive()) && (mc.player.getOffhandItem().has(DataComponents.FOOD) || mc.player.getMainHandItem().has(DataComponents.FOOD)))
return;
if(mc.player.getMainHandItem().getItem() != Items.NETHERITE_PICKAXE && mc.player.getMainHandItem().getItem() != Items.DIAMOND_PICKAXE) {
int pickAxe = findPickAxe();
if (pickAxe == -1) {
if (this.isActive()) {
this.toggle();
return;
}
}
mc.player.getInventory().setSelectedSlot(pickAxe);
}
BlockPos obsidian = findObsidian();
if (obsidian == null) return;
mc.gameMode.continueDestroyBlock(obsidian, Direction.UP);
mc.player.swing(InteractionHand.MAIN_HAND);
if (mc.player.blockPosition().below().equals(obsidian) && mc.level.getBlockState(obsidian).getBlock() != Blocks.OBSIDIAN) {
allowBreakAgain = false;
}
}
class="c-keyword">private BlockPos findObsidian() {
List<BlockPos> 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.blockPosition().getX() + x, mc.player.blockPosition().getY() + y, mc.player.blockPosition().getZ() + z);
blocksList.add(block);
}
}
Optional<BlockPos> result = blocksList.stream()
.parallel()
.filter(blockPos -> mc.level.getBlockState(blockPos).getBlock() == Blocks.OBSIDIAN)
.min(Comparator.comparingDouble(blockPos -> mc.player.distanceToSqr(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.blockPosition().getX() + x, mc.player.blockPosition().getY() + y, mc.player.blockPosition().getZ() + z);
blocksList.add(block);
}
}
}
Optional<BlockPos> result2 = blocksList.stream()
.parallel()
.filter(blockPos -> !mc.player.blockPosition().below().equals(blockPos))
.filter(blockPos -> mc.level.getBlockState(blockPos).getBlock() == Blocks.OBSIDIAN)
.min(Comparator.comparingDouble(blockPos -> mc.player.distanceToSqr(blockPos.getX(), blockPos.getY(), blockPos.getZ())));
if (result2.isPresent()) return result2.get();
if (mc.level.getBlockState(mc.player.blockPosition().below()).getBlock() == Blocks.OBSIDIAN)
return mc.player.blockPosition().below();
return null;
}
class="c-keyword">private int findPickAxe() {
for (int i = 0; i < 9; i++) {
if (mc.player.getInventory().getItem(i).getItem() == Items.NETHERITE_PICKAXE) return i;
if (mc.player.getInventory().getItem(i).getItem() == Items.DIAMOND_PICKAXE) return i;
}
return -1;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.events.PlayerRespawnEvent;
import dev.voidaddons.events.SeedChangedEvent;
import dev.voidaddons.utils.Ore;
import dev.voidaddons.utils.seeds.Seed;
import dev.voidaddons.utils.seeds.Seeds;
import baritone.api.BaritoneAPI;
import meteordevelopment.meteorclient.events.render.Render3DEvent;
import meteordevelopment.meteorclient.events.world.BlockUpdateEvent;
import meteordevelopment.meteorclient.events.world.ChunkDataEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.pathing.BaritoneUtils;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.resources.ResourceKey;
import net.minecraft.util.Mth;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.chunk.ChunkAccess;
import net.minecraft.world.level.chunk.LevelChunkSection;
import net.minecraft.world.level.chunk.status.ChunkStatus;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraft.world.level.levelgen.WorldgenRandom;
import net.minecraft.world.phys.Vec3;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
class="c-keyword">public class OreSim extends Module {
class="c-keyword">private final Map<Long, Map<Ore, Set<Vec3>>> chunkRenderers = new ConcurrentHashMap<>();
class="c-keyword">private Seed worldSeed = null;
class="c-keyword">private Map<ResourceKey<Biome>, List<Ore>> oreConfig;
class="c-keyword">public List<BlockPos> oreGoals = new ArrayList<>();
class="c-keyword">public enum AirCheck {
ON_LOAD,
RECHECK,
OFF
}
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Integer> horizontalRadius = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"chunk-range")
.description(class="c-str">"Taxi cap distance of chunks being shown.")
.defaultValue(5)
.min(1)
.sliderMax(10)
.build()
);
class="c-keyword">private final Setting<AirCheck> airCheck = sgGeneral.add(new EnumSetting.Builder<AirCheck>()
.name(class="c-str">"air-check-mode")
.description(class="c-str">"Checks if there is air at a calculated ore pos.")
.defaultValue(AirCheck.RECHECK)
.build()
);
class="c-keyword">private final Setting<Boolean> baritone = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"baritone")
.description(class="c-str">"Set baritone ore positions to the simulated ones.")
.defaultValue(false)
.build()
);
class="c-keyword">public OreSim() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"ore-sim", class="c-str">"Xray on crack.");
SettingGroup sgOres = settings.createGroup(class="c-str">"Ores");
Ore.oreSettings.forEach(sgOres::add);
}
class="c-keyword">public boolean baritone() {
return isActive() && baritone.get() && BaritoneUtils.IS_AVAILABLE;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onRender(Render3DEvent event) {
if (mc.player == null || oreConfig == null) {
return;
}
if (Seeds.get().getSeed() != null) {
int chunkX = mc.player.chunkPosition().x;
int chunkZ = mc.player.chunkPosition().z;
int rangeVal = horizontalRadius.get();
for (int range = 0; range <= rangeVal; range++) {
for (int x = -range + chunkX; x <= range + chunkX; x++) {
renderChunk(x, chunkZ + range - rangeVal, event);
}
for (int x = (-range) + 1 + chunkX; x < range + chunkX; x++) {
renderChunk(x, chunkZ - range + rangeVal + 1, event);
}
}
}
}
class="c-keyword">private void renderChunk(int x, int z, Render3DEvent event) {
long chunkKey = ChunkPos.asLong(x,z);
if (chunkRenderers.containsKey(chunkKey)) {
Map<Ore, Set<Vec3>> chunk = chunkRenderers.get(chunkKey);
for (Map.Entry<Ore, Set<Vec3>> oreRenders : chunk.entrySet()) {
if (oreRenders.getKey().active.get()) {
for (Vec3 pos : oreRenders.getValue()) {
event.renderer.boxLines(pos.x, pos.y, pos.z, pos.x + 1, pos.y + 1, pos.z + 1, oreRenders.getKey().color, 0);
}
}
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onBlockUpdate(BlockUpdateEvent event) {
if (airCheck.get() != AirCheck.RECHECK || event.newState.canOcclude()) return;
long chunkKey = ChunkPos.asLong(event.pos);
if (chunkRenderers.containsKey(chunkKey)) {
Vec3 pos = Vec3.atLowerCornerOf(event.pos);
for (var ore : chunkRenderers.get(chunkKey).values()) {
ore.remove(pos);
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
if (mc.player == null || mc.level == null || oreConfig == null) return;
if (baritone() && BaritoneAPI.getProvider().getPrimaryBaritone().getMineProcess().isActive()) {
oreGoals.clear();
var chunkPos = mc.player.chunkPosition();
int rangeVal = 4;
for (int range = 0; range <= rangeVal; ++range) {
for (int x = -range + chunkPos.x; x <= range + chunkPos.x; ++x) {
oreGoals.addAll(addToBaritone(x, chunkPos.z + range - rangeVal));
}
for (int x = -range + 1 + chunkPos.x; x < range + chunkPos.x; ++x) {
oreGoals.addAll(this.addToBaritone(x, chunkPos.z - range + rangeVal + 1));
}
}
}
}
class="c-keyword">private ArrayList<BlockPos> addToBaritone(int chunkX, int chunkZ) {
ArrayList<BlockPos> baritoneGoals = new ArrayList<>();
long chunkKey = ChunkPos.asLong(chunkX, chunkZ);
if (this.chunkRenderers.containsKey(chunkKey)) {
this.chunkRenderers.get(chunkKey).entrySet().stream()
.filter(entry -> entry.getKey().active.get())
.flatMap(entry -> entry.getValue().stream())
.map(BlockPos::containing)
.forEach(baritoneGoals::add);
}
return baritoneGoals;
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
if (Seeds.get().getSeed() == null) {
error(class="c-str">"No seed found. To set a seed do .seed <seed>");
this.toggle();
}
reload();
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
this.chunkRenderers.clear();
this.oreConfig = null;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onSeedChanged(SeedChangedEvent event) {
reload();
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPlayerRespawn(PlayerRespawnEvent event) {
reload();
}
class="c-keyword">private void loadVisibleChunks() {
if (mc.player == null) {
return;
}
for (ChunkAccess chunk : Utils.chunks(false)) {
doMathOnChunk(chunk);
}
}
class="c-keyword">private void reload() {
Seed seed = Seeds.get().getSeed();
if (seed == null) return;
worldSeed = seed;
oreConfig = Ore.getRegistry(PlayerUtils.getDimension());
chunkRenderers.clear();
if (mc.level != null && worldSeed != null) {
loadVisibleChunks();
}
}
class="c-annotation">@EventHandler
class="c-keyword">public void onChunkData(ChunkDataEvent event) {
doMathOnChunk(event.chunk());
}
class="c-keyword">private void doMathOnChunk(ChunkAccess chunk) {
var chunkPos = chunk.getPos();
long chunkKey = chunkPos.toLong();
ClientLevel world = mc.level;
if (chunkRenderers.containsKey(chunkKey) || world == null) {
return;
}
Set<ResourceKey<Biome>> biomes = new HashSet<>();
ChunkPos.rangeClosed(chunkPos, 1).forEach(chunkPosx -> {
ChunkAccess chunkxx = world.getChunk(chunkPosx.x, chunkPosx.z, ChunkStatus.BIOMES, false);
if (chunkxx == null) return;
for(LevelChunkSection chunkSection : chunkxx.getSections()) {
chunkSection.getBiomes().getAll(entry -> biomes.add(entry.unwrapKey().get()));
}
});
Set<Ore> oreSet = biomes.stream().flatMap(b -> getDefaultOres(b).stream()).collect(Collectors.toSet());
int chunkX = chunkPos.x << 4;
int chunkZ = chunkPos.z << 4;
WorldgenRandom random = new WorldgenRandom(WorldgenRandom.Algorithm.XOROSHIRO.newInstance(0));
long populationSeed = random.setDecorationSeed(worldSeed.seed, chunkX, chunkZ);
HashMap<Ore, Set<Vec3>> h = new HashMap<>();
for (Ore ore : oreSet) {
HashSet<Vec3> ores = new HashSet<>();
random.setFeatureSeed(populationSeed, ore.index, ore.step);
int repeat = ore.count.sample(random);
for (int i = 0; i < repeat; i++) {
if (ore.rarity != 1F && random.nextFloat() >= 1/ore.rarity) {
continue;
}
int x = random.nextInt(16) + chunkX;
int z = random.nextInt(16) + chunkZ;
int y = ore.heightProvider.sample(random, ore.heightContext);
BlockPos origin = new BlockPos(x,y,z);
ResourceKey<Biome> biome = chunk.getNoiseBiome(x,y,z).unwrapKey().get();
if (!getDefaultOres(biome).contains(ore)) {
continue;
}
if (ore.scattered) {
ores.addAll(generateHidden(world, random, origin, ore.size));
} else {
ores.addAll(generateNormal(world, random, origin, ore.size, ore.discardOnAirChance));
}
}
if (!ores.isEmpty()) {
h.put(ore, ores);
}
}
chunkRenderers.put(chunkKey, h);
}
class="c-keyword">private List<Ore> getDefaultOres(ResourceKey<Biome> biomeRegistryKey) {
if (oreConfig.containsKey(biomeRegistryKey)) {
return oreConfig.get(biomeRegistryKey);
} else {
return this.oreConfig.values().stream().findAny().get();
}
}
class="c-comment">// ====================================
class="c-comment">// Mojang code
class="c-comment">// ====================================
class="c-keyword">private ArrayList<Vec3> generateNormal(ClientLevel world, WorldgenRandom random, BlockPos blockPos, int veinSize, float discardOnAir) {
float f = random.nextFloat() * 3.1415927F;
float g = (float) veinSize / 8.0F;
int i = Mth.ceil(((float) veinSize / 16.0F * 2.0F + 1.0F) / 2.0F);
double d = (double) blockPos.getX() + Math.sin(f) * (double) g;
double e = (double) blockPos.getX() - Math.sin(f) * (double) g;
double h = (double) blockPos.getZ() + Math.cos(f) * (double) g;
double j = (double) blockPos.getZ() - Math.cos(f) * (double) g;
double l = (blockPos.getY() + random.nextInt(3) - 2);
double m = (blockPos.getY() + random.nextInt(3) - 2);
int n = blockPos.getX() - Mth.ceil(g) - i;
int o = blockPos.getY() - 2 - i;
int p = blockPos.getZ() - Mth.ceil(g) - i;
int q = 2 * (Mth.ceil(g) + i);
int r = 2 * (2 + i);
for (int s = n; s <= n + q; ++s) {
for (int t = p; t <= p + q; ++t) {
if (o <= world.getHeight(Heightmap.Types.MOTION_BLOCKING, s, t)) {
return this.generateVeinPart(world, random, veinSize, d, e, h, j, l, m, n, o, p, q, r, discardOnAir);
}
}
}
return new ArrayList<>();
}
class="c-keyword">private ArrayList<Vec3> generateVeinPart(ClientLevel world, WorldgenRandom random, int veinSize, double startX, double endX, double startZ, double endZ, double startY, double endY, int x, int y, int z, int size, int i, float discardOnAir) {
BitSet bitSet = new BitSet(size * i * size);
BlockPos.MutableBlockPos mutable = new BlockPos.MutableBlockPos();
double[] ds = new double[veinSize * 4];
ArrayList<Vec3> poses = new ArrayList<>();
int n;
double p;
double q;
double r;
double s;
for (n = 0; n < veinSize; ++n) {
float f = (float) n / (float) veinSize;
p = Mth.lerp(f, startX, endX);
q = Mth.lerp(f, startY, endY);
r = Mth.lerp(f, startZ, endZ);
s = random.nextDouble() * (double) veinSize / 16.0D;
double m = ((double) (Mth.sin(3.1415927F * f) + 1.0F) * s + 1.0D) / 2.0D;
ds[n * 4] = p;
ds[n * 4 + 1] = q;
ds[n * 4 + 2] = r;
ds[n * 4 + 3] = m;
}
for (n = 0; n < veinSize - 1; ++n) {
if (!(ds[n * 4 + 3] <= 0.0D)) {
for (int o = n + 1; o < veinSize; ++o) {
if (!(ds[o * 4 + 3] <= 0.0D)) {
p = ds[n * 4] - ds[o * 4];
q = ds[n * 4 + 1] - ds[o * 4 + 1];
r = ds[n * 4 + 2] - ds[o * 4 + 2];
s = ds[n * 4 + 3] - ds[o * 4 + 3];
if (s * s > p * p + q * q + r * r) {
if (s > 0.0D) {
ds[o * 4 + 3] = -1.0D;
} else {
ds[n * 4 + 3] = -1.0D;
}
}
}
}
}
}
for (n = 0; n < veinSize; ++n) {
double u = ds[n * 4 + 3];
if (!(u < 0.0D)) {
double v = ds[n * 4];
double w = ds[n * 4 + 1];
double aa = ds[n * 4 + 2];
int ab = Math.max(Mth.floor(v - u), x);
int ac = Math.max(Mth.floor(w - u), y);
int ad = Math.max(Mth.floor(aa - u), z);
int ae = Math.max(Mth.floor(v + u), ab);
int af = Math.max(Mth.floor(w + u), ac);
int ag = Math.max(Mth.floor(aa + u), ad);
for (int ah = ab; ah <= ae; ++ah) {
double ai = ((double) ah + 0.5D - v) / u;
if (ai * ai < 1.0D) {
for (int aj = ac; aj <= af; ++aj) {
double ak = ((double) aj + 0.5D - w) / u;
if (ai * ai + ak * ak < 1.0D) {
for (int al = ad; al <= ag; ++al) {
double am = ((double) al + 0.5D - aa) / u;
if (ai * ai + ak * ak + am * am < 1.0D) {
int an = ah - x + (aj - y) * size + (al - z) * size * i;
if (!bitSet.get(an)) {
bitSet.set(an);
mutable.set(ah, aj, al);
if (aj >= -64 && aj < 320 && (airCheck.get() == AirCheck.OFF || world.getBlockState(mutable).canOcclude())) {
if (shouldPlace(world, mutable, discardOnAir, random)) {
poses.add(new Vec3(ah, aj, al));
}
}
}
}
}
}
}
}
}
}
}
return poses;
}
class="c-keyword">private boolean shouldPlace(ClientLevel world, BlockPos orePos, float discardOnAir, WorldgenRandom random) {
if (discardOnAir == 0F || (discardOnAir != 1F && random.nextFloat() >= discardOnAir)) {
return true;
}
for (Direction direction : Direction.values()) {
if (!world.getBlockState(orePos.offset(direction.getUnitVec3i())).canOcclude() && discardOnAir != 1F) {
return false;
}
}
return true;
}
class="c-keyword">private ArrayList<Vec3> generateHidden(ClientLevel world, WorldgenRandom random, BlockPos blockPos, int size) {
ArrayList<Vec3> poses = new ArrayList<>();
int i = random.nextInt(size + 1);
for (int j = 0; j < i; ++j) {
size = Math.min(j, 7);
int x = this.randomCoord(random, size) + blockPos.getX();
int y = this.randomCoord(random, size) + blockPos.getY();
int z = this.randomCoord(random, size) + blockPos.getZ();
if (airCheck.get() == AirCheck.OFF || world.getBlockState(new BlockPos(x, y, z)).canOcclude()) {
if (shouldPlace(world, new BlockPos(x, y, z), 1F, random)) {
poses.add(new Vec3(x, y, z));
}
}
}
return poses;
}
class="c-keyword">private int randomCoord(WorldgenRandom random, int size) {
return Math.round((random.nextFloat() - random.nextFloat()) * (float) size);
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.entity.player.PlayerMoveEvent;
import meteordevelopment.meteorclient.events.entity.player.SendMovementPacketsEvent;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket;
import net.minecraft.network.protocol.game.ServerboundAcceptTeleportationPacket;
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket;
import net.minecraft.world.entity.PositionMoveRotation;
import net.minecraft.world.phys.Vec3;
import java.util.HashSet;
class="c-keyword">public class PacketFly extends Module {
class="c-keyword">private final HashSet<ServerboundMovePlayerPacket> packets = new HashSet<>();
class="c-keyword">private final SettingGroup sgMovement = settings.createGroup(class="c-str">"movement");
class="c-keyword">private final SettingGroup sgClient = settings.createGroup(class="c-str">"client");
class="c-keyword">private final SettingGroup sgBypass = settings.createGroup(class="c-str">"bypass");
class="c-keyword">private final Setting<Double> horizontalSpeed = sgMovement.add(new DoubleSetting.Builder()
.name(class="c-str">"horizontal-speed")
.description(class="c-str">"Horizontal speed in blocks per second.")
.defaultValue(5.2)
.min(0.0)
.max(20.0)
.sliderMin(0.0)
.sliderMax(20.0)
.build()
);
class="c-keyword">private final Setting<Double> verticalSpeed = sgMovement.add(new DoubleSetting.Builder()
.name(class="c-str">"vertical-speed")
.description(class="c-str">"Vertical speed in blocks per second.")
.defaultValue(1.24)
.min(0.0)
.max(20.0)
.sliderMin(0.0)
.sliderMax(20.0)
.build()
);
class="c-keyword">private final Setting<Boolean> sendTeleport = sgMovement.add(new BoolSetting.Builder()
.name(class="c-str">"teleport")
.description(class="c-str">"Sends teleport packets.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> setYaw = sgClient.add(new BoolSetting.Builder()
.name(class="c-str">"set-yaw")
.description(class="c-str">"Sets yaw client side.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> setMove = sgClient.add(new BoolSetting.Builder()
.name(class="c-str">"set-move")
.description(class="c-str">"Sets movement client side.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> setPos = sgClient.add(new BoolSetting.Builder()
.name(class="c-str">"set-pos")
.description(class="c-str">"Sets position client side.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> setID = sgClient.add(new BoolSetting.Builder()
.name(class="c-str">"set-id")
.description(class="c-str">"Updates teleport id when a position packet is received.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> antiKick = sgBypass.add(new BoolSetting.Builder()
.name(class="c-str">"anti-kick")
.description(class="c-str">"Moves down occasionally to prevent kicks.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Integer> downDelay = sgBypass.add(new IntSetting.Builder()
.name(class="c-str">"down-delay")
.description(class="c-str">"How often you move down when not flying upwards. (ticks)")
.defaultValue(4)
.sliderMin(1)
.sliderMax(30)
.min(1)
.max(30)
.build()
);
class="c-keyword">private final Setting<Integer> downDelayFlying = sgBypass.add(new IntSetting.Builder()
.name(class="c-str">"flying-down-delay")
.description(class="c-str">"How often you move down when flying upwards. (ticks)")
.defaultValue(10)
.sliderMin(1)
.sliderMax(30)
.min(1)
.max(30)
.build()
);
class="c-keyword">private final Setting<Boolean> invalidPacket = sgBypass.add(new BoolSetting.Builder()
.name(class="c-str">"invalid-packet")
.description(class="c-str">"Sends invalid movement packets.")
.defaultValue(false)
.build()
);
class="c-keyword">private int flightCounter = 0;
class="c-keyword">private int teleportID = 0;
class="c-keyword">public PacketFly() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"packet-fly", class="c-str">"Fly using packets.");
}
class="c-annotation">@EventHandler
class="c-keyword">public void onSendMovementPackets(SendMovementPacketsEvent.Pre event) {
mc.player.setDeltaMovement(0.0,0.0,0.0);
double speed = 0.0;
boolean checkCollisionBoxes = checkHitBoxes();
speed = mc.player.input.keyPresses.jump() && (checkCollisionBoxes || !(mc.player.input.getMoveVector().y != 0.0 || mc.player.input.getMoveVector().x != 0.0)) ? (antiKick.get() && !checkCollisionBoxes ? (resetCounter(downDelayFlying.get()) ? -0.032 : verticalSpeed.get()/20) : verticalSpeed.get()/20) : (mc.player.input.keyPresses.shift() ? verticalSpeed.get()/-20 : (!checkCollisionBoxes ? (resetCounter(downDelay.get()) ? (antiKick.get() ? -0.04 : 0.0) : 0.0) : 0.0));
Vec3 horizontal = PlayerUtils.getHorizontalVelocity(horizontalSpeed.get());
mc.player.setDeltaMovement(horizontal.x, speed, horizontal.z);
sendPackets(mc.player.getDeltaMovement().x, mc.player.getDeltaMovement().y, mc.player.getDeltaMovement().z, sendTeleport.get());
}
class="c-annotation">@EventHandler
class="c-keyword">public void onMove (PlayerMoveEvent event) {
if (setMove.get() && flightCounter != 0) {
event.movement = new Vec3(mc.player.getDeltaMovement().x, mc.player.getDeltaMovement().y, mc.player.getDeltaMovement().z);
}
}
class="c-annotation">@EventHandler
class="c-keyword">public void onPacketSent(PacketEvent.Send event) {
if (event.packet instanceof ServerboundMovePlayerPacket && !packets.remove((ServerboundMovePlayerPacket) event.packet)) {
event.setCancelled(true);
}
}
class="c-annotation">@EventHandler
class="c-keyword">public void onPacketReceive(PacketEvent.Receive event) {
if (event.packet instanceof ClientboundPlayerPositionPacket && !(mc.player == null || mc.level == null)) {
ClientboundPlayerPositionPacket packet = (ClientboundPlayerPositionPacket) event.packet;
PositionMoveRotation oldPos = packet.change();
if (setYaw.get()) {
PositionMoveRotation newPos = new PositionMoveRotation(oldPos.position(), oldPos.deltaMovement(), mc.player.getYRot(), mc.player.getXRot());
event.packet = ClientboundPlayerPositionPacket.of(
packet.id(),
newPos,
packet.relatives()
);
}
if (setID.get()) {
teleportID = packet.id();
}
}
}
class="c-keyword">private boolean checkHitBoxes() {
return !mc.level.getBlockCollisions(mc.player, mc.player.getBoundingBox().expandTowards(-0.0625,-0.0625,-0.0625)).iterator().hasNext();
}
class="c-keyword">private boolean resetCounter(int counter) {
if (++flightCounter >= counter) {
flightCounter = 0;
return true;
}
return false;
}
class="c-keyword">private void sendPackets(double x, double y, double z, boolean teleport) {
Vec3 vec = new Vec3(x, y, z);
Vec3 playerPos = new Vec3(mc.player.getX(), mc.player.getY(), mc.player.getZ());
Vec3 position = playerPos.add(vec);
Vec3 outOfBoundsVec = outOfBoundsVec(vec, position);
packetSender(new ServerboundMovePlayerPacket.Pos(position.x, position.y, position.z, mc.player.onGround(), mc.player.horizontalCollision));
if (invalidPacket.get()) {
packetSender(new ServerboundMovePlayerPacket.Pos(outOfBoundsVec.x, outOfBoundsVec.y, outOfBoundsVec.z, mc.player.onGround(), mc.player.horizontalCollision));
}
if (setPos.get()) {
mc.player.setPosRaw(position.x, position.y, position.z);
}
teleportPacket(position, teleport);
}
class="c-keyword">private void teleportPacket(Vec3 pos, boolean shouldTeleport) {
if (shouldTeleport) {
mc.player.connection.send(new ServerboundAcceptTeleportationPacket(++teleportID));
}
}
class="c-keyword">private Vec3 outOfBoundsVec(Vec3 offset, Vec3 position) {
return position.add(0.0, 1500.0, 0.0);
}
class="c-keyword">private void packetSender(ServerboundMovePlayerPacket packet) {
packets.add(packet);
mc.player.connection.send(packet);
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.utils.WorldUtils;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.utils.world.BlockUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
class="c-keyword">public class Painter extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Block> block = sgGeneral.add(new BlockSetting.Builder()
.name(class="c-str">"block")
.description(class="c-str">"Block to use for painting")
.defaultValue(Blocks.STONE_BUTTON)
.build()
);
class="c-keyword">private final Setting<Integer> range = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"range")
.description(class="c-str">"Range of placement")
.min(0)
.defaultValue(0)
.build()
);
class="c-keyword">private final Setting<Integer> delay = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"delay")
.description(class="c-str">"Delay between block placement (in ticks)")
.min(0)
.defaultValue(0)
.build()
);
class="c-keyword">private final Setting<Integer> bpt = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"blocks-per-tick")
.description(class="c-str">"Amount of blocks that can be placed in one tick")
.min(1)
.defaultValue(1)
.build()
);
class="c-keyword">private final Setting<Boolean> rotate = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"rotate")
.description(class="c-str">"Whether or not to rotate towards block while placing")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> topSurfaces = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"top-surface")
.description(class="c-str">"Whether or not to cover top surfaces")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> sideSurfaces = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"side-surface")
.description(class="c-str">"Whether or not to cover side surfaces")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> bottomSurfaces = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"bottom-surface")
.description(class="c-str">"Whether or not to cover bottom surfaces")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<Boolean> oneBlockHeight = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"one-block-height")
.description(class="c-str">"Whether or not to cover in one block high gaps")
.defaultValue(true)
.build()
);
class="c-keyword">private int ticksWaited;
class="c-keyword">public Painter() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"painter", class="c-str">"Automatically paints/covers surfaces (good for trolling)");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
class="c-comment">// Tick delay
if (delay.get() != 0 && ticksWaited < delay.get() - 1) {
ticksWaited++;
return;
}
else ticksWaited = 0;
class="c-comment">// Get slot
FindItemResult findItemResult = InvUtils.findInHotbar(itemStack -> block.get() == Block.byItem(itemStack.getItem()));
if (!findItemResult.found()) {
error(class="c-str">"No selected blocks in hotbar");
toggle();
return;
}
class="c-comment">// Find spots
int placed = 0;
for (BlockPos blockPos : WorldUtils.getSphere(mc.player.blockPosition(), range.get(), range.get())) {
if (shouldPlace(blockPos, block.get())) {
BlockUtils.place(blockPos, findItemResult, rotate.get(), -100, false);
placed++;
class="c-comment">// Delay 0
if (delay.get() != 0 && placed >= bpt.get()) break;
}
}
}
class="c-keyword">private boolean shouldPlace(BlockPos blockPos, Block useBlock) {
class="c-comment">// Self
if (!mc.level.getBlockState(blockPos).canBeReplaced()) return false;
class="c-comment">// One block height
if (!oneBlockHeight.get() &&
!mc.level.getBlockState(blockPos.above()).canBeReplaced() &&
!mc.level.getBlockState(blockPos.below()).canBeReplaced()) return false;
boolean north = true;
boolean south = true;
boolean east = true;
boolean west = true;
boolean up = true;
boolean bottom = true;
BlockState northState = mc.level.getBlockState(blockPos.north());
BlockState southState = mc.level.getBlockState(blockPos.south());
BlockState eastState = mc.level.getBlockState(blockPos.east());
BlockState westState = mc.level.getBlockState(blockPos.west());
BlockState upState = mc.level.getBlockState(blockPos.above());
BlockState bottomState = mc.level.getBlockState(blockPos.below());
class="c-comment">// Top surface
if (topSurfaces.get()) {
if (upState.canBeReplaced() || upState.getBlock() == useBlock) up = false;
}
class="c-comment">// Side surfaces
if (sideSurfaces.get()) {
if (northState.canBeReplaced() || northState.getBlock() == useBlock) north = false;
if (southState.canBeReplaced() || southState.getBlock() == useBlock) south = false;
if (eastState.canBeReplaced() || eastState.getBlock() == useBlock) east = false;
if (westState.canBeReplaced() || westState.getBlock() == useBlock) west = false;
}
class="c-comment">// Bottom surface
if (bottomSurfaces.get()) {
if (bottomState.canBeReplaced() || bottomState.getBlock() == useBlock) bottom = false;
}
return north || south || east || west || up || bottom;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.EnumSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import net.minecraft.client.renderer.LevelTargetBundle;
import net.minecraft.client.renderer.PostChain;
import net.minecraft.resources.Identifier;
class="c-keyword">public class Rendering extends Module {
class="c-keyword">public enum Shader {
None,
Blur,
Creeper,
Invert,
Spider,
}
class="c-keyword">private final SettingGroup sgInvisible = settings.createGroup(class="c-str">"Invisible");
class="c-keyword">private final SettingGroup sgFun = settings.createGroup(class="c-str">"Fun");
class="c-keyword">private final Setting<Boolean> structureVoid = sgInvisible.add(new BoolSetting.Builder()
.name(class="c-str">"structure-void")
.description(class="c-str">"Render structure void blocks.")
.defaultValue(true)
.onChanged(onChanged -> {
if(this.isActive()) {
mc.levelRenderer.allChanged();
}
})
.build()
);
class="c-keyword">private final Setting<Shader> shaderEnum = sgFun.add(new EnumSetting.Builder<Shader>()
.name(class="c-str">"shader")
.description(class="c-str">"Select which shader to use")
.defaultValue(Shader.None)
.onChanged(this::onChanged)
.build()
);
class="c-keyword">private final Setting<Boolean> dinnerbone = sgFun.add(new BoolSetting.Builder()
.name(class="c-str">"dinnerbone")
.description(class="c-str">"Apply dinnerbone effects to all entities")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> deadmau5Ears = sgFun.add(new BoolSetting.Builder()
.name(class="c-str">"deadmau5-ears")
.description(class="c-str">"Add deadmau5 ears to all players")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Boolean> christmas = sgFun.add(new BoolSetting.Builder()
.name(class="c-str">"christmas")
.description(class="c-str">"Chistmas chest anytime")
.defaultValue(false)
.build()
);
class="c-keyword">private PostChain shader = null;
class="c-keyword">public Rendering() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"rendering", class="c-str">"Various Render Tweaks");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
mc.levelRenderer.allChanged();
}
class="c-annotation">@Override
class="c-keyword">public void onDeactivate() {
mc.levelRenderer.allChanged();
}
class="c-keyword">public void onChanged(Shader s) {
if (mc.level == null) return;
String name = s.toString().toLowerCase();
if (name.equals(class="c-str">"none")) {
this.shader = null;
return;
}
Identifier shaderID = Identifier.withDefaultNamespace(name);
this.shader = mc.getShaderManager().getPostChain(shaderID, LevelTargetBundle.MAIN_TARGETS);
}
class="c-keyword">public boolean renderStructureVoid() {
return this.isActive() && structureVoid.get();
}
class="c-keyword">public PostChain getShaderEffect() {
if (!this.isActive()) return null;
return shader;
}
class="c-keyword">public boolean dinnerboneEnabled() {
if (!this.isActive()) return false;
return dinnerbone.get();
}
class="c-keyword">public boolean deadmau5EarsEnabled() {
if (!this.isActive()) return false;
return deadmau5Ears.get();
}
class="c-keyword">public boolean chistmas() {
if (!this.isActive()) return false;
return christmas.get();
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.mixin.PlayerMoveC2SPacketAccessor;
import dev.voidaddons.mixin.VehicleMoveC2SPacketAccessor;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket;
import net.minecraft.network.protocol.game.ServerboundMoveVehiclePacket;
import net.minecraft.world.phys.Vec3;
class="c-keyword">public class RoboWalk extends Module {
class="c-keyword">public RoboWalk() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"robo-walk", class="c-str">"Bypasses LiveOverflow movement check.");
}
class="c-keyword">private double smooth(double d) {
double temp = (double) Math.round(d * 100) / 100;
return Math.nextAfter(temp, temp + Math.signum(d));
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacketSend(PacketEvent.Send event) {
if (event.packet instanceof ServerboundMovePlayerPacket packet) {
if (!packet.hasPosition()) return;
double x = smooth(packet.getX(0));
double z = smooth(packet.getZ(0));
((PlayerMoveC2SPacketAccessor) packet).setX(x);
((PlayerMoveC2SPacketAccessor) packet).setZ(z);
} else if (event.packet instanceof ServerboundMoveVehiclePacket packet) {
Vec3 pos = ((VehicleMoveC2SPacketAccessor) (Object) packet).getPosition();
double x = smooth(pos.x());
double z = smooth(pos.z());
event.packet = VehicleMoveC2SPacketAccessor.create(new Vec3(x, pos.y(), z), packet.yRot(), packet.xRot(), packet.onGround());
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.Cancellable;
import meteordevelopment.meteorclient.events.meteor.MouseClickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.combat.KillAura;
import meteordevelopment.meteorclient.utils.misc.input.KeyAction;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ServerboundInteractPacket;
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket;
import net.minecraft.network.protocol.game.ServerboundSwingPacket;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.AxeItem;
import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.Vec3;
import static org.lwjgl.glfw.GLFW.GLFW_MOUSE_BUTTON_LEFT;
class="c-keyword">public class ShieldBypass extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> ignoreAxe = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"ignore-axe")
.description(class="c-str">"Ignore if you are holding an axe.")
.defaultValue(true)
.build()
);
class="c-keyword">public ShieldBypass() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"shield-bypass", class="c-str">"Attempts to teleport you behind enemies to bypass shields.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onMouseButton(MouseClickEvent event) {
if (Modules.get().isActive(KillAura.class)) return;
if (mc.screen == null && !mc.player.isUsingItem() && event.action == KeyAction.Press && event.button() == GLFW_MOUSE_BUTTON_LEFT) {
if (mc.hitResult instanceof EntityHitResult result) {
bypass(result.getEntity(), event);
}
}
}
class="c-keyword">private boolean isBlocked(Vec3 pos, LivingEntity target) {
Vec3 targetPos = new Vec3(target.getX(), target.getY(), target.getZ());
Vec3 vec3d3 = pos.vectorTo(targetPos).normalize();
return new Vec3(vec3d3.x, 0.0d, vec3d3.z).dot(target.getViewVector(1.0f)) >= 0.0d;
}
class="c-keyword">public void bypass(Entity target, Cancellable event) {
if (target instanceof LivingEntity e && e.isBlocking()) {
if (ignoreAxe.get() && InvUtils.testInMainHand(i -> i.getItem() instanceof AxeItem)) return;
class="c-comment">// Shield check
Vec3 playerPos = new Vec3(mc.player.getX(), mc.player.getY(), mc.player.getZ());
if (isBlocked(playerPos, e)) return;
Vec3 offset = Vec3.directionFromRotation(0, mc.player.getYRot()).normalize().scale(2);
Vec3 ePos = new Vec3(e.getX(), e.getY(), e.getZ());
Vec3 newPos = ePos.add(offset);
class="c-comment">// Move up to prevent tping into blocks
boolean inside = false;
for (float i = 0; i < 4; i += 0.25) {
Vec3 targetPos = newPos.add(0, i, 0);
boolean collides = !mc.level.noCollision(null, e.getBoundingBox().move(offset).move(targetPos.subtract(newPos)));
if (!inside && collides) {
inside = true;
} else if (inside && !collides) {
newPos = targetPos;
break;
}
}
if (!isBlocked(newPos, e)) return;
event.cancel();
mc.getConnection().send(new ServerboundMovePlayerPacket.Pos(newPos.x(), newPos.y(), newPos.z(), true, false));
mc.getConnection().send(ServerboundInteractPacket.createAttackPacket(e, mc.player.isShiftKeyDown()));
mc.getConnection().send(new ServerboundSwingPacket(mc.player.getUsedItemHand()));
mc.player.resetOnlyAttackStrengthTicker();
mc.getConnection().send(new ServerboundMovePlayerPacket.Pos(mc.player.getX(), mc.player.getY(), mc.player.getZ(), true, mc.player.horizontalCollision));
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.systems.modules.Module;
class="c-keyword">public class SilentDisconnect extends Module {
class="c-keyword">public SilentDisconnect() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"silent-disconnect", class="c-str">"Won't show a disconnect screen when you disconnect.");
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.render.Render3DEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.ColorSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.config.Config;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.render.Freecam;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.meteorclient.utils.player.Rotations;
import meteordevelopment.meteorclient.utils.render.color.Color;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.CameraType;
import net.minecraft.client.model.geom.ModelPart;
import net.minecraft.client.model.player.PlayerModel;
import net.minecraft.client.renderer.entity.player.AvatarRenderer;
import net.minecraft.client.renderer.entity.state.AvatarRenderState;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.phys.Vec3;
import org.joml.Matrix4f;
import org.joml.Vector3f;
class="c-keyword">public class SkeletonESP extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<SettingColor> skeletonColorSetting = sgGeneral.add(new ColorSetting.Builder()
.name(class="c-str">"players-color")
.description(class="c-str">"The other player's color.")
.defaultValue(new SettingColor(255, 255, 255))
.build()
);
class="c-keyword">public final Setting<Boolean> distance = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"distance-colors")
.description(class="c-str">"Changes the color of skeletons depending on distance.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Freecam freecam;
class="c-keyword">private final Color color = new Color();
class="c-keyword">public SkeletonESP() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"skeleton-esp", class="c-str">"Looks cool as fuck");
freecam = Modules.get().get(Freecam.class);
}
class="c-annotation">@EventHandler
class="c-keyword">private void onRender(Render3DEvent event) {
float tickDelta = event.tickDelta;
int rotationHoldTicks = Config.get().rotationHoldTicks.get();
mc.level.entitiesForRendering().forEach(entity -> {
if (!(entity instanceof Player)) return;
if (mc.options.getCameraType() == CameraType.FIRST_PERSON && !freecam.isActive() && mc.player == entity)
return;
Color skeletonColor = PlayerUtils.getPlayerColor((Player) entity, skeletonColorSetting.get());
if (distance.get()) skeletonColor = getColorFromDistance(entity);
Player player = (Player) entity;
Vec3 footPos = getEntityRenderPosition(player, tickDelta);
AvatarRenderer livingEntityRenderer = (AvatarRenderer) mc.getEntityRenderDispatcher().getRenderer(player);
PlayerModel playerModel = (PlayerModel) livingEntityRenderer.getModel();
float bodyYaw = Mth.rotLerp(tickDelta, player.yBodyRotO, player.yBodyRot);
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) bodyYaw = Rotations.serverYaw;
float headYaw = Mth.rotLerp(tickDelta, player.yHeadRotO, player.yHeadRot);
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) headYaw = Rotations.serverYaw;
float ageInTicks = (float) player.tickCount + tickDelta;
float relativeHeadYaw = headYaw - bodyYaw;
float pitch = player.getViewXRot(tickDelta);
if (mc.player == entity && Rotations.rotationTimer < rotationHoldTicks) pitch = Rotations.serverPitch;
boolean swimming = player.isVisuallySwimming();
boolean sneaking = player.isCrouching();
boolean flying = player.isFallFlying();
AvatarRenderState renderState = new AvatarRenderState();
renderState.walkAnimationPos = player.walkAnimation.position(tickDelta);
renderState.walkAnimationSpeed = player.walkAnimation.speed(tickDelta);
renderState.ageInTicks = ageInTicks;
renderState.yRot = relativeHeadYaw;
renderState.xRot = pitch;
playerModel.setupAnim(renderState);
ModelPart head = playerModel.head;
ModelPart leftArm = playerModel.leftArm;
ModelPart rightArm = playerModel.rightArm;
ModelPart leftLeg = playerModel.leftLeg;
ModelPart rightLeg = playerModel.rightLeg;
Matrix4f outerMat = new Matrix4f();
if (swimming) outerMat.translate(0, 0.35f, 0);
outerMat.rotateY((float) Math.toRadians(-(bodyYaw + 180)));
if (swimming || flying) outerMat.rotateX((float) Math.toRadians(-(90 + pitch)));
if (swimming) outerMat.translate(0, -0.95f, 0);
Matrix4f tiltedMat = new Matrix4f(outerMat).translate(0, 0.75f, 0);
if (sneaking && !swimming && !flying) tiltedMat.rotate(0.5f, -1, 0, 0);
tiltedMat.translate(0, -0.75f, 0);
float hipY = sneaking ? 0.6f : 0.7f;
float hipZ = sneaking ? 0.23f : 0f;
float shoulderY = sneaking ? 1.05f : 1.35f;
float spineTopY = sneaking ? 1.05f : 1.4f;
class="c-comment">// Spine
drawBone(event, footPos, tiltedMat, 0, hipY, hipZ, 0, spineTopY, 0, skeletonColor);
class="c-comment">// Shoulders
drawBone(event, footPos, tiltedMat, -0.37f, shoulderY, 0, 0.37f, shoulderY, 0, skeletonColor);
class="c-comment">// Pelvis
drawBone(event, footPos, outerMat, -0.15f, hipY, hipZ, 0.15f, hipY, hipZ, skeletonColor);
class="c-comment">// Head
Matrix4f headMat = new Matrix4f(tiltedMat).translate(0, spineTopY, 0);
applyModelRot(headMat, head);
drawBone(event, footPos, headMat, 0, 0, 0, 0, 0.15f, 0, skeletonColor);
class="c-comment">// Right Leg
Matrix4f rightLegMat = new Matrix4f(outerMat).translate(0.15f, hipY, hipZ);
applyModelRot(rightLegMat, rightLeg);
drawBone(event, footPos, rightLegMat, 0, 0, 0, 0, -0.6f, 0, skeletonColor);
class="c-comment">// Left Leg
Matrix4f leftLegMat = new Matrix4f(outerMat).translate(-0.15f, hipY, hipZ);
applyModelRot(leftLegMat, leftLeg);
drawBone(event, footPos, leftLegMat, 0, 0, 0, 0, -0.6f, 0, skeletonColor);
class="c-comment">// Right Arm
Matrix4f rightArmMat = new Matrix4f(tiltedMat).translate(0.37f, shoulderY, 0);
applyModelRot(rightArmMat, rightArm);
drawBone(event, footPos, rightArmMat, 0, 0, 0, 0, -0.55f, 0, skeletonColor);
class="c-comment">// Left Arm
Matrix4f leftArmMat = new Matrix4f(tiltedMat).translate(-0.37f, shoulderY, 0);
applyModelRot(leftArmMat, leftArm);
drawBone(event, footPos, leftArmMat, 0, 0, 0, 0, -0.55f, 0, skeletonColor);
});
}
class="c-keyword">private void drawBone(Render3DEvent event, Vec3 origin, Matrix4f mat, float x1, float y1, float z1, float x2, float y2, float z2, Color color) {
Vector3f p1 = mat.transformPosition(new Vector3f(x1, y1, z1));
Vector3f p2 = mat.transformPosition(new Vector3f(x2, y2, z2));
event.renderer.line(
origin.x + p1.x, origin.y + p1.y, origin.z + p1.z,
origin.x + p2.x, origin.y + p2.y, origin.z + p2.z, color
);
}
class="c-keyword">private void applyModelRot(Matrix4f mat, ModelPart part) {
if (part.zRot != 0) mat.rotate(part.zRot, 0, 0, 1);
if (part.yRot != 0) mat.rotate(part.yRot, 0, -1, 0);
if (part.xRot != 0) mat.rotate(part.xRot, -1, 0, 0);
}
class="c-keyword">private Vec3 getEntityRenderPosition(Entity entity, double partial) {
double x = entity.xo + (entity.getX() - entity.xo) * partial;
double y = entity.yo + (entity.getY() - entity.yo) * partial;
double z = entity.zo + (entity.getZ() - entity.zo) * partial;
return new Vec3(x, y, z);
}
class="c-keyword">private Color getColorFromDistance(Entity entity) {
Vec3 entityPos = new Vec3(entity.getX(), entity.getY(), entity.getZ());
double distance = mc.gameRenderer.getMainCamera().position().distanceTo(entityPos);
double percent = distance / 60;
if (percent < 0 || percent > 1) {
color.set(0, 255, 0, 255);
return color;
}
int r, g;
if (percent < 0.5) {
r = 255;
g = (int) (255 * percent / 0.5);
} else {
g = 255;
r = 255 - (int) (255 * (percent - 0.5) / 0.5);
}
color.set(r, g, 0, 255);
return color;
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.render.Render3DEvent;
import meteordevelopment.meteorclient.events.world.PlaySoundEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.renderer.ShapeMode;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.player.ChatUtils;
import meteordevelopment.meteorclient.utils.render.color.SettingColor;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.ChatFormatting;
import net.minecraft.client.resources.sounds.SoundInstance;
import net.minecraft.client.sounds.WeighedSoundEvents;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
class="c-keyword">public class SoundLocator extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final SettingGroup sgRender = settings.createGroup(class="c-str">"Render");
class="c-comment">// General
class="c-keyword">private final Setting<Boolean> whitelist = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"whitelist")
.description(class="c-str">"Enable sounds filter whitelist.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<List<SoundEvent>> sounds = sgGeneral.add(new SoundEventListSetting.Builder()
.name(class="c-str">"sounds")
.description(class="c-str">"Sounds to find.")
.defaultValue(new ArrayList<>(0))
.visible(whitelist::get)
.build()
);
class="c-keyword">private final Setting<Boolean> chatActive = sgGeneral.add(new BoolSetting.Builder()
.name(class="c-str">"log-chat")
.description(class="c-str">"Send the position of the sound in the chat.")
.defaultValue(false)
.build()
);
class="c-keyword">private final Setting<Integer> timeS = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"time")
.description(class="c-str">"The time between the sounds verification.")
.defaultValue(60)
.build()
);
class="c-comment">// Render
class="c-keyword">private final Setting<Boolean> renderActive = sgRender.add(new BoolSetting.Builder()
.name(class="c-str">"render-positions")
.description(class="c-str">"Renders boxes where the sound was emitted.")
.defaultValue(true)
.build()
);
class="c-keyword">private final Setting<ShapeMode> shapeMode = sgRender.add(new EnumSetting.Builder<ShapeMode>()
.name(class="c-str">"shape-mode")
.description(class="c-str">"How the shapes are rendered.")
.defaultValue(ShapeMode.Both)
.build()
);
class="c-keyword">private final Setting<SettingColor> sideColor = sgRender.add(new ColorSetting.Builder()
.name(class="c-str">"side-color")
.description(class="c-str">"The side color of the target sound rendering.")
.defaultValue(new SettingColor(255, 0, 0, 70))
.build()
);
class="c-keyword">private final Setting<SettingColor> lineColor = sgRender.add(new ColorSetting.Builder()
.name(class="c-str">"line-color")
.description(class="c-str">"The line color of the target sound rendering.")
.defaultValue(new SettingColor(255, 0, 0))
.build()
);
class="c-keyword">public SoundLocator() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"sound-locator", class="c-str">"Prints locations of sound events.");
}
class="c-keyword">private List<Vec3> renderPos = new ArrayList<Vec3>();
class="c-keyword">private List<Integer> delay = new ArrayList<Integer>();
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Pre event) {
Iterator<Integer> iterator = delay.iterator();
while (iterator.hasNext()) {
int time = iterator.next();
if (time <= 0) {
iterator.remove();
renderPos.remove(0);
} else {
delay.set(delay.indexOf(time), time - 1);
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPlaySound(PlaySoundEvent event) {
if(whitelist.get()) {
class="c-comment">// Whitelist ON
for (SoundEvent sound : sounds.get()) {
if (sound.location().equals(event.sound.getIdentifier())) {
printSound(event.sound);
break;
}
}
} else {
class="c-comment">// Whitelist OFF (Allow all sounds)
printSound(event.sound);
}
}
class="c-keyword">private void printSound(SoundInstance sound) {
WeighedSoundEvents soundSet = mc.getSoundManager().getSoundEvent(sound.getIdentifier());
Vec3 pos = new Vec3(sound.getX() - 0.5, sound.getY() - 0.5, sound.getZ() - 0.5);
if(!renderPos.contains(pos)) {
renderPos.add(pos);
delay.add(timeS.get());
if(chatActive.get()) {
MutableComponent text;
if (soundSet == null || soundSet.getSubtitle() == null) {
text = Component.literal(sound.getIdentifier().toString());
} else {
text = soundSet.getSubtitle().copy();
}
text.append(String.format(class="c-str">"%s at ", ChatFormatting.RESET));
text.append(ChatUtils.formatCoords(pos));
text.append(String.format(class="c-str">"%s.", ChatFormatting.RESET));
info(text);
}
}
}
class="c-annotation">@EventHandler
class="c-keyword">private void onRender(Render3DEvent event) {
if(renderActive.get()) {
renderPos.forEach(pos -> {
event.renderer.box(AABB.unitCubeFromLowerCorner(pos), sideColor.get(), lineColor.get(), shapeMode.get(), 0);
});
}
}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import dev.voidaddons.utils.WorldUtils;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.utils.player.FindItemResult;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
import meteordevelopment.meteorclient.utils.player.Rotations;
import meteordevelopment.meteorclient.utils.world.CardinalDirection;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.network.protocol.game.ServerboundUseItemOnPacket;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.SaplingBlock;
import net.minecraft.world.phys.BlockHitResult;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.IntStream;
class="c-keyword">public class TreeAura extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Boolean> rotation = sgGeneral.add(new BoolSetting.Builder().name(class="c-str">"rotate").description(class="c-str">"rotate for block interactions").defaultValue(false).build());
class="c-keyword">private final Setting<Integer> plantDelay = sgGeneral.add(new IntSetting.Builder().name(class="c-str">"plant-delay").description(class="c-str">"delay between planting trees").defaultValue(6).min(0).sliderMax(25).build());
class="c-keyword">private final Setting<Integer> bonemealDelay = sgGeneral.add(new IntSetting.Builder().name(class="c-str">"bonemeal-delay").description(class="c-str">"delay between placing bonemeal on trees").defaultValue(3).min(0).sliderMax(25).build());
class="c-keyword">private final Setting<Integer> rRange = sgGeneral.add(new IntSetting.Builder().name(class="c-str">"radius").description(class="c-str">"how far you can place horizontally").defaultValue(4).min(1).sliderMax(5).build());
class="c-keyword">private final Setting<Integer> yRange = sgGeneral.add(new IntSetting.Builder().name(class="c-str">"y-range").description(class="c-str">"how far you can place vertically").defaultValue(3).min(1).sliderMax(5).build());
class="c-keyword">private final Setting<SortMode> sortMode = sgGeneral.add(new EnumSetting.Builder<SortMode>().name(class="c-str">"sort-mode").description(class="c-str">"how to sort nearby trees/placements.").defaultValue(SortMode.Farthest).build());
class="c-keyword">private int bonemealTimer, plantTimer;
class="c-keyword">public TreeAura() { class="c-comment">// CopeTypes
super(VoidAddonsAddon.CATEGORY, class="c-str">"tree-aura", class="c-str">"Plants trees around you");
}
class="c-annotation">@Override
class="c-keyword">public void onActivate() {
bonemealTimer = 0;
plantTimer = 0;
}
class="c-annotation">@EventHandler
class="c-keyword">private void onTick(TickEvent.Post event) {
plantTimer--;
bonemealTimer--;
if (plantTimer <= 0) {
BlockPos plantPos = findPlantLocation();
if (plantPos == null) return;
doPlant(plantPos);
plantTimer = plantDelay.get();
}
if (bonemealTimer <= 0) {
BlockPos p = findPlantedSapling();
if (p == null) return;
doBonemeal(p);
bonemealTimer = bonemealDelay.get();
}
}
class="c-keyword">private FindItemResult findBonemeal() {
return InvUtils.findInHotbar(Items.BONE_MEAL);
}
class="c-keyword">private FindItemResult findSapling() {
return InvUtils.findInHotbar(itemStack -> Block.byItem(itemStack.getItem()) instanceof SaplingBlock);
}
class="c-keyword">private boolean isSapling(BlockPos pos) {
return mc.level.getBlockState(pos).getBlock() instanceof SaplingBlock;
}
class="c-keyword">private void doPlant(BlockPos plantPos) {
FindItemResult sapling = findSapling();
if (!sapling.found()) {
error(class="c-str">"No saplings in hotbar");
toggle();
return;
}
InvUtils.swap(sapling.slot(), false);
if (rotation.get())
Rotations.rotate(Rotations.getYaw(plantPos), Rotations.getPitch(plantPos), () -> mc.player.connection.send(new ServerboundUseItemOnPacket(InteractionHand.MAIN_HAND, new BlockHitResult(Utils.vec3d(plantPos), Direction.UP, plantPos, false), 0)));
else
mc.player.connection.send(new ServerboundUseItemOnPacket(InteractionHand.MAIN_HAND, new BlockHitResult(Utils.vec3d(plantPos), Direction.UP, plantPos, false), 0));
}
class="c-keyword">private void doBonemeal(BlockPos sapling) {
FindItemResult bonemeal = findBonemeal();
if (!bonemeal.found()) {
error(class="c-str">"No bonemeal in hotbar");
toggle();
return;
}
InvUtils.swap(bonemeal.slot(), false);
if (rotation.get())
Rotations.rotate(Rotations.getYaw(sapling), Rotations.getPitch(sapling), () -> mc.player.connection.send(new ServerboundUseItemOnPacket(InteractionHand.MAIN_HAND, new BlockHitResult(Utils.vec3d(sapling), Direction.UP, sapling, false), 0)));
else
mc.player.connection.send(new ServerboundUseItemOnPacket(InteractionHand.MAIN_HAND, new BlockHitResult(Utils.vec3d(sapling), Direction.UP, sapling, false), 0));
}
class="c-keyword">private boolean canPlant(BlockPos pos) {
Block b = mc.level.getBlockState(pos).getBlock();
if (b.equals(Blocks.SHORT_GRASS) || b.equals(Blocks.GRASS_BLOCK) || b.equals(Blocks.DIRT) || b.equals(Blocks.COARSE_DIRT)) {
final AtomicBoolean plant = new AtomicBoolean(true);
IntStream.rangeClosed(1, 5).forEach(i -> {
class="c-comment">// Check above
BlockPos check = pos.above(i);
if (!mc.level.getBlockState(check).getBlock().equals(Blocks.AIR)) {
plant.set(false);
return;
}
class="c-comment">// Check around
for (CardinalDirection dir : CardinalDirection.values()) {
if (!mc.level.getBlockState(check.relative(dir.toDirection(), i)).getBlock().equals(Blocks.AIR)) {
plant.set(false);
return;
}
}
});
return plant.get();
}
return false;
}
class="c-keyword">private List<BlockPos> findSaplings(BlockPos centerPos, int radius, int height) {
ArrayList<BlockPos> blocc = new ArrayList<>();
List<BlockPos> blocks = WorldUtils.getSphere(centerPos, radius, height);
for (BlockPos b : blocks) if (isSapling(b)) blocc.add(b);
return blocc;
}
class="c-keyword">private BlockPos findPlantedSapling() {
List<BlockPos> saplings = findSaplings(mc.player.blockPosition(), rRange.get(), yRange.get());
if (saplings.isEmpty()) return null;
saplings.sort(Comparator.comparingDouble(PlayerUtils::distanceTo));
if (sortMode.get().equals(SortMode.Farthest)) Collections.reverse(saplings);
return saplings.get(0);
}
class="c-keyword">private List<BlockPos> getPlantLocations(BlockPos centerPos, int radius, int height) {
ArrayList<BlockPos> blocc = new ArrayList<>();
List<BlockPos> blocks = WorldUtils.getSphere(centerPos, radius, height);
for (BlockPos b : blocks) if (canPlant(b)) blocc.add(b);
return blocc;
}
class="c-keyword">private BlockPos findPlantLocation() {
List<BlockPos> nearby = getPlantLocations(mc.player.blockPosition(), rRange.get(), yRange.get());
if (nearby.isEmpty()) return null;
nearby.sort(Comparator.comparingDouble(PlayerUtils::distanceTo));
if (sortMode.get().equals(SortMode.Farthest)) Collections.reverse(nearby);
return nearby.get(0);
}
class="c-keyword">public enum SortMode {Closest, Farthest}
}
package dev.voidaddons.modules;
import dev.voidaddons.VoidAddonsAddon;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.network.protocol.game.ServerboundInteractPacket;
import net.minecraft.world.entity.vehicle.boat.AbstractBoat;
import net.minecraft.world.entity.vehicle.minecart.AbstractMinecart;
import net.minecraft.world.phys.EntityHitResult;
class="c-keyword">public class VehicleOneHit extends Module {
class="c-keyword">private final SettingGroup sgGeneral = settings.getDefaultGroup();
class="c-keyword">private final Setting<Integer> amount = sgGeneral.add(new IntSetting.Builder()
.name(class="c-str">"amount")
.description(class="c-str">"The number of packets to send.")
.defaultValue(16)
.range(1, 100)
.sliderRange(1, 20)
.build()
);
class="c-keyword">private boolean sending = false;
class="c-keyword">public VehicleOneHit() {
super(VoidAddonsAddon.CATEGORY, class="c-str">"vehicle-one-hit", class="c-str">"Destroy vehicles with one hit.");
}
class="c-annotation">@EventHandler
class="c-keyword">private void onPacketSend(PacketEvent.Send event) {
if (sending) return;
if (!(event.packet instanceof ServerboundInteractPacket)
|| !(mc.hitResult instanceof EntityHitResult ehr)
|| (!(ehr.getEntity() instanceof AbstractMinecart) && !(ehr.getEntity() instanceof AbstractBoat))
) return;
sending = true;
for (int i = 0; i < amount.get() - 1; i++) {
mc.player.connection.getConnection().send(event.packet, null);
}
sending = false;
}
}
Get support, early module previews, and connect with other Meteor users.
Join Discord Server →