fix and remove features
This commit is contained in:
@@ -34,7 +34,6 @@
|
||||
- AntiBot (Removed from Meteor in [166fc](https://github.com/MeteorDevelopment/meteor-client/commit/166fccc73e53de6cfdbe41ea58dc593a2f5011f6#diff-05896d5a7f735a14ee8da5d12fbd24585862ca68efdf32b9401b3f4329d17c73))
|
||||
- AntiSpawnpoint
|
||||
- AntiVanish
|
||||
- Auto32K (Removed from Meteor in [67f93](https://github.com/MeteorDevelopment/meteor-client/commit/67f93de1e5e287ea62ddef041441306f01249c3d#diff-95d3e3b18ffadf76eef2358f30d424843d57acf8bde5ebd49a3f6befa6ff0529))
|
||||
- AutoBedTrap (Ported from [BleachHack-CupEdition](https://github.com/CUPZYY/BleachHack-CupEdition/blob/master/CupEdition-1.17/src/main/java/bleach/hack/module/mods/AutoBedtrap.java))
|
||||
- AutoCraft (More generalized version of [AutoBedCraft](https://github.com/Anticope/orion/blob/main/src/main/java/me/ghosttypes/orion/modules/main/AutoBedCraft.java) from orion)
|
||||
- AutoExtinguish
|
||||
@@ -59,7 +58,6 @@
|
||||
- Oresim (Ported from [Atomic](https://gitlab.com/0x151/atomic))
|
||||
- PacketFly (Taken from an [unmerged PR](https://github.com/MeteorDevelopment/meteor-client/pull/813))
|
||||
- Painter
|
||||
- Prone (Taken from an [unmerged PR](https://github.com/MeteorDevelopment/meteor-client/pull/1423))
|
||||
- Rendering
|
||||
- SkeletonESP (Ported from [JexClient](https://github.com/DustinRepo/JexClient-main/blob/main/src/main/java/me/dustin/jex/feature/mod/impl/render/Skeletons.java))
|
||||
- SoundLocator
|
||||
|
||||
@@ -42,7 +42,6 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
||||
modules.add(new AntiBot());
|
||||
modules.add(new AntiSpawnpoint());
|
||||
modules.add(new AntiVanish());
|
||||
modules.add(new Auto32K());
|
||||
modules.add(new AutoBedTrap());
|
||||
modules.add(new AutoCraft());
|
||||
modules.add(new AutoExtinguish());
|
||||
@@ -68,7 +67,6 @@ public class MeteorRejectsAddon extends MeteorAddon {
|
||||
modules.add(new OreSim());
|
||||
modules.add(new PacketFly());
|
||||
modules.add(new Painter());
|
||||
modules.add(new Prone());
|
||||
modules.add(new Rendering());
|
||||
modules.add(new SkeletonESP());
|
||||
modules.add(new SoundLocator());
|
||||
|
||||
@@ -1,308 +0,0 @@
|
||||
package anticope.rejects.modules;
|
||||
|
||||
//Created by squidoodly 13/07/2020
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import meteordevelopment.orbit.EventHandler;
|
||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||
import meteordevelopment.meteorclient.settings.*;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import meteordevelopment.meteorclient.utils.player.*;
|
||||
import meteordevelopment.meteorclient.utils.world.BlockUtils;
|
||||
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.client.gui.screen.ingame.Generic3x3ContainerScreen;
|
||||
import net.minecraft.client.gui.screen.ingame.HopperScreen;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Box;
|
||||
import net.minecraft.util.math.Direction;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class Auto32K extends Module {
|
||||
public enum Mode{
|
||||
Hopper,
|
||||
Dispenser
|
||||
}
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
private final Setting<Mode> mode = sgGeneral.add(new EnumSetting.Builder<Mode>()
|
||||
.name("mode")
|
||||
.description("The bypass mode used.")
|
||||
.defaultValue(Mode.Dispenser)
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Double> placeRange = sgGeneral.add(new DoubleSetting.Builder()
|
||||
.name("place-range")
|
||||
.description("The distance in a single direction the shulker is placed.")
|
||||
.defaultValue(3)
|
||||
.min(0)
|
||||
.sliderMax(5)
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Boolean> fillHopper = sgGeneral.add(new BoolSetting.Builder()
|
||||
.name("fill-hopper")
|
||||
.description("Fills all slots of the hopper except one for the 32k.")
|
||||
.defaultValue(true)
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<List<Block>> throwawayItems = sgGeneral.add(new BlockListSetting.Builder()
|
||||
.name("throwaway-blocks")
|
||||
.description("Whitelisted blocks to use to fill the hopper.")
|
||||
.defaultValue(setDefaultBlocks())
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Boolean> autoMove = sgGeneral.add(new BoolSetting.Builder()
|
||||
.name("auto-move")
|
||||
.description("Moves the 32K into your inventory automatically.")
|
||||
.defaultValue(true)
|
||||
.build()
|
||||
);
|
||||
|
||||
private int x;
|
||||
private int z;
|
||||
private int phase = 0;
|
||||
private BlockPos bestBlock;
|
||||
|
||||
public Auto32K(){
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-32k", "Automatically attacks other players with a 32k weapon.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivate() {
|
||||
phase = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivate() {
|
||||
bestBlock = findValidBlocksDispenser();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onTick(TickEvent.Post event) {
|
||||
if (phase <= 7) {
|
||||
if (mode.get() == Mode.Hopper) {
|
||||
FindItemResult findShulker = InvUtils.findInHotbar(this::isShulkerBox);
|
||||
FindItemResult findHopper = InvUtils.findInHotbar(Items.HOPPER);
|
||||
if (isValidSlot(findShulker) || isValidSlot(findHopper)) return;
|
||||
List<BlockPos> sortedBlocks = findValidBlocksHopper();
|
||||
sortedBlocks.sort(Comparator.comparingDouble(value -> mc.player.squaredDistanceTo(value.getX(), value.getY(), value.getZ())));
|
||||
Iterator<BlockPos> sortedIterator = sortedBlocks.iterator();
|
||||
BlockPos bestBlock = null;
|
||||
if(sortedIterator.hasNext()) bestBlock = sortedIterator.next();
|
||||
|
||||
if (bestBlock != null) {
|
||||
while (!BlockUtils.place(bestBlock, findHopper,true,100,false)) {
|
||||
if(sortedIterator.hasNext()) {
|
||||
bestBlock = sortedIterator.next().up();
|
||||
}else break;
|
||||
}
|
||||
mc.player.setSneaking(true);
|
||||
if (!BlockUtils.place(bestBlock.up(), findShulker,true,100,false)) {
|
||||
error("Failed to place.");
|
||||
this.toggle();
|
||||
return;
|
||||
}
|
||||
mc.player.setSneaking(false);
|
||||
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing(), bestBlock.up(), false));
|
||||
phase = 8;
|
||||
}
|
||||
} else if (mode.get() == Mode.Dispenser) {
|
||||
FindItemResult shulkerSlot = InvUtils.find(this::isShulkerBox);
|
||||
FindItemResult hopperSlot = InvUtils.find(Items.HOPPER);
|
||||
FindItemResult dispenserSlot = InvUtils.find(Items.DISPENSER);
|
||||
FindItemResult redstoneSlot = InvUtils.find(Items.REDSTONE_BLOCK);
|
||||
if ((isValidSlot(shulkerSlot) && mode.get() == Mode.Hopper) || isValidSlot(hopperSlot) || isValidSlot(dispenserSlot) || isValidSlot(redstoneSlot))
|
||||
return;
|
||||
if (phase == 0) {
|
||||
bestBlock = findValidBlocksDispenser();
|
||||
if(bestBlock == null) return;
|
||||
if (!BlockUtils.place(bestBlock.add(x, 0, z), hopperSlot, true, 100, false)) {
|
||||
error("Failed to place.");
|
||||
this.toggle();
|
||||
return;
|
||||
}
|
||||
phase += 1;
|
||||
} else if (phase == 1) {
|
||||
mc.player.getInventory().selectedSlot = dispenserSlot.slot();
|
||||
if (x == -1) {
|
||||
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(-90f, mc.player.getPitch(), mc.player.isOnGround()));
|
||||
} else if (x == 1) {
|
||||
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(90f, mc.player.getPitch(), mc.player.isOnGround()));
|
||||
} else if (z == -1) {
|
||||
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(1f, mc.player.getPitch(), mc.player.isOnGround()));
|
||||
} else if (z == 1) {
|
||||
mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket.LookAndOnGround(179f, mc.player.getPitch(), mc.player.isOnGround()));
|
||||
}
|
||||
phase += 1;
|
||||
} else if (phase == 2) {
|
||||
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), Direction.UP, bestBlock, false));
|
||||
phase += 1;
|
||||
} else if (phase == 3) {
|
||||
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing().getOpposite(), bestBlock.up(), false));
|
||||
phase += 1;
|
||||
}else if (phase == 4 && mc.currentScreen instanceof Generic3x3ContainerScreen) {
|
||||
InvUtils.move().from(shulkerSlot.slot()).toId(4);
|
||||
phase += 1;
|
||||
}else if (phase == 5 && mc.currentScreen instanceof Generic3x3ContainerScreen) {
|
||||
mc.player.closeHandledScreen();
|
||||
phase += 1;
|
||||
}else if (phase == 6) {
|
||||
mc.player.getInventory().selectedSlot = redstoneSlot.slot();
|
||||
mc.player.setSneaking(true);
|
||||
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing().getOpposite(), bestBlock.up(2), false));
|
||||
mc.player.setSneaking(false);
|
||||
phase += 1;
|
||||
}else if (phase == 7){
|
||||
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing().getOpposite(), bestBlock.add(x, 0, z), false));
|
||||
phase += 1;
|
||||
}
|
||||
}
|
||||
}else if(phase == 8) {
|
||||
if (mc.currentScreen instanceof HopperScreen) {
|
||||
if (fillHopper.get() && !throwawayItems.get().isEmpty()) {
|
||||
int slot = -1;
|
||||
int count = 0;
|
||||
Iterator<Block> blocks = throwawayItems.get().iterator();
|
||||
for (Item item = blocks.next().asItem(); blocks.hasNext(); item = blocks.next().asItem()) {
|
||||
for (int i = 5; i <= 40; i++) {
|
||||
ItemStack stack = mc.player.getInventory().getStack(i);
|
||||
if (stack.getItem() == item && stack.getCount() >= 4) {
|
||||
slot = i;
|
||||
count = stack.getCount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (count >= 4) break;
|
||||
}
|
||||
for (int i = 1; i < 5; i++) {
|
||||
if (mc.player.currentScreenHandler.getSlot(i).getStack().getItem() instanceof AirBlockItem) {
|
||||
InvUtils.move().from(slot - 4).toId(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
boolean manage = true;
|
||||
int slot = -1;
|
||||
int dropSlot = -1;
|
||||
for (int i = 32; i < 41; i++) {
|
||||
if (EnchantmentHelper.getLevel(Enchantments.SHARPNESS, mc.player.currentScreenHandler.getSlot(i).getStack()) > 5) {
|
||||
manage = false;
|
||||
slot = i;
|
||||
break;
|
||||
}else if (mc.player.currentScreenHandler.getSlot(i).getStack().getItem() instanceof SwordItem
|
||||
&& EnchantmentHelper.getLevel(Enchantments.SHARPNESS, mc.player.currentScreenHandler.getSlot(i).getStack()) <= 5) {
|
||||
dropSlot = i;
|
||||
}
|
||||
}
|
||||
if (dropSlot != -1) InvUtils.drop().slot(dropSlot);
|
||||
if(autoMove.get() && manage){
|
||||
int slot2 = mc.player.getInventory().getEmptySlot();
|
||||
if (slot2 < 9 && slot2 != -1 && EnchantmentHelper.getLevel(Enchantments.SHARPNESS, mc.player.currentScreenHandler.getSlot(0).getStack()) > 5) {
|
||||
InvUtils.move().fromId(0).to(slot2 - 4);
|
||||
} else if (EnchantmentHelper.getLevel(Enchantments.SHARPNESS, mc.player.currentScreenHandler.getSlot(0).getStack()) <= 5 && mc.player.currentScreenHandler.getSlot(0).getStack().getItem() != Items.AIR) {
|
||||
InvUtils.drop().slotId(0);
|
||||
}
|
||||
}
|
||||
if(slot != -1) {
|
||||
mc.player.getInventory().selectedSlot = slot - 32;
|
||||
}
|
||||
}else this.toggle();
|
||||
}
|
||||
}
|
||||
|
||||
private List<BlockPos> findValidBlocksHopper(){
|
||||
Iterator<BlockPos> allBlocks = getRange(mc.player.getBlockPos(), placeRange.get()).iterator();
|
||||
List<BlockPos> validBlocks = new ArrayList<>();
|
||||
for(BlockPos i = null; allBlocks.hasNext(); i = allBlocks.next()){
|
||||
if(i == null) continue;
|
||||
if(!mc.world.getBlockState(i).getMaterial().isReplaceable()
|
||||
&& (mc.world.getBlockState(i.up()).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.up().getX(), i.up().getY(), i.up().getZ(), i.up().getX() + 1.0D, i.up().getY() + 2.0D, i.up().getZ() + 1.0D)).isEmpty())
|
||||
&& mc.world.getBlockState(i.up(2)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.up(2).getX(), i.up(2).getY(), i.up(2).getZ(), i.up(2).getX() + 1.0D, i.up(2).getY() + 2.0D, i.up(2).getZ() + 1.0D)).isEmpty()){
|
||||
validBlocks.add(i);
|
||||
}
|
||||
}
|
||||
return validBlocks;
|
||||
}
|
||||
|
||||
private BlockPos findValidBlocksDispenser(){
|
||||
List<BlockPos> allBlocksNotSorted = getRange(mc.player.getBlockPos(), placeRange.get());
|
||||
allBlocksNotSorted.sort(Comparator.comparingDouble(value -> mc.player.squaredDistanceTo(value.getX(), value.getY(), value.getZ())));
|
||||
Iterator<BlockPos> allBlocks = allBlocksNotSorted.iterator();
|
||||
for(BlockPos i = null; allBlocks.hasNext(); i = allBlocks.next()){
|
||||
if(i == null) continue;
|
||||
if(!mc.world.getBlockState(i).getMaterial().isReplaceable()
|
||||
&& (mc.world.getBlockState(i.up()).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.up().getX(), i.up().getY(), i.up().getZ(), i.up().getX() + 1.0D, i.up().getY() + 2.0D, i.up().getZ() + 1.0D)).isEmpty())
|
||||
&& (mc.world.getBlockState(i.up(2)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.up(2).getX(), i.up(2).getY(), i.up(2).getZ(), i.up(2).getX() + 1.0D, i.up(2).getY() + 2.0D, i.up(2).getZ() + 1.0D)).isEmpty())
|
||||
&& (mc.world.getBlockState(i.up(3)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.up(3).getX(), i.up(3).getY(), i.up(3).getZ(), i.up(2).getX() + 1.0D, i.up(2).getY() + 2.0D, i.up(2).getZ() + 1.0D)).isEmpty())){
|
||||
if (mc.world.getBlockState(i.add(-1, 1, 0)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.add(-1, 1, 0).getX(), i.add(-1, 1, 0).getY(), i.add(-1, 1, 0).getZ(), i.add(-1, 1, 0).getX() + 1.0D, i.add(-1, 1, 0).getY() + 2.0D, i.add(-1, 1, 0).getZ() + 1.0D)).isEmpty()
|
||||
&& mc.world.getBlockState(i.add(-1, 0, 0)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.add(-1, 0, 0).getX(), i.add(-1, 0, 0).getY(), i.add(-1, 0, 0).getZ(), i.add(-1, 0, 0).getX() + 1.0D, i.add(-1, 0, 0).getY() + 2.0D, i.add(-1, 0, 0).getZ() + 1.0D)).isEmpty()) {
|
||||
x = -1;
|
||||
z = 0;
|
||||
return i;
|
||||
}else if (mc.world.getBlockState(i.add(1, 1, 0)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.add(1, 1, 0).getX(), i.add(1, 1, 0).getY(), i.add(1, 1, 0).getZ(), i.add(1, 1, 0).getX() + 1.0D, i.add(1, 1, 0).getY() + 2.0D, i.add(1, 1, 0).getZ() + 1.0D)).isEmpty()
|
||||
&& mc.world.getBlockState(i.add(1, 0, 0)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.add(1, 0, 0).getX(), i.add(1, 0, 0).getY(), i.add(1, 0, 0).getZ(), i.add(1, 0, 0).getX() + 1.0D, i.add(1, 0, 0).getY() + 2.0D, i.add(1, 0, 0).getZ() + 1.0D)).isEmpty()) {
|
||||
x = 1;
|
||||
z = 0;
|
||||
return i;
|
||||
}else if (mc.world.getBlockState(i.add(0, 1, -1)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.add(0, 1, -1).getX(), i.add(0, 1, -1).getY(), i.add(0, 1, -1).getZ(), i.add(0, 1, -1).getX() + 1.0D, i.add(0, 1, -1).getY() + 2.0D, i.add(0, 1, -1).getZ() + 1.0D)).isEmpty()
|
||||
&& mc.world.getBlockState(i.add(0, 0, -1)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.add(0, 0, -1).getX(), i.add(0, 0, -1).getY(), i.add(0, 0, -1).getZ(), i.add(0, 0, -1).getX() + 1.0D, i.add(0, 0, -1).getY() + 2.0D, i.add(0, 0, -1).getZ() + 1.0D)).isEmpty()) {
|
||||
x = 0;
|
||||
z = -1;
|
||||
return i;
|
||||
}else if (mc.world.getBlockState(i.add(0, 1, 1)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.add(0, 1, 1).getX(), i.add(0, 1, 1).getY(), i.add(0, 1, 1).getZ(), i.add(0, 1, 1).getX() + 1.0D, i.add(0, 1, 1).getY() + 2.0D, i.add(0, 1, 1).getZ() + 1.0D)).isEmpty()
|
||||
&& mc.world.getBlockState(i.add(0, 0, 1)).getBlock() == Blocks.AIR && mc.world.getOtherEntities(null, new Box(i.add(0, 0, 1).getX(), i.add(0, 0, 1).getY(), i.add(0, 0, 1).getZ(), i.add(0, 0, 1).getX() + 1.0D, i.add(0, 0, 1).getY() + 2.0D, i.add(0, 0, 1).getZ() + 1.0D)).isEmpty()) {
|
||||
x = 0;
|
||||
z = 1;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private boolean isShulkerBox(ItemStack stack) {
|
||||
Item item = stack.getItem();
|
||||
if (!(item instanceof BlockItem)) return false;
|
||||
Block block = ((BlockItem)item).getBlock();
|
||||
return block instanceof ShulkerBoxBlock;
|
||||
}
|
||||
|
||||
private List<BlockPos> getRange(BlockPos player, double range){
|
||||
List<BlockPos> allBlocks = new ArrayList<>();
|
||||
for(double i = player.getX() - range; i < player.getX() + range; i++){
|
||||
for(double j = player.getZ() - range; j < player.getZ() + range; j++){
|
||||
for(int k = player.getY() - 3; k < player.getY() + 3; k++){
|
||||
BlockPos x = new BlockPos(i, k, j);
|
||||
allBlocks.add(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
return allBlocks;
|
||||
}
|
||||
|
||||
private boolean isValidSlot(FindItemResult findItemResult){
|
||||
return findItemResult.slot() == -1 || findItemResult.slot() >= 9;
|
||||
}
|
||||
|
||||
private List<Block> setDefaultBlocks(){
|
||||
List<Block> list = new ArrayList<>();
|
||||
list.add(Blocks.OBSIDIAN);
|
||||
list.add(Blocks.COBBLESTONE);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package anticope.rejects.modules;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import anticope.rejects.utils.TntDamage;
|
||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||
import meteordevelopment.meteorclient.settings.BoolSetting;
|
||||
import meteordevelopment.meteorclient.settings.IntSetting;
|
||||
@@ -13,7 +12,6 @@ import meteordevelopment.meteorclient.utils.player.FindItemResult;
|
||||
import meteordevelopment.meteorclient.utils.player.InvUtils;
|
||||
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
|
||||
import meteordevelopment.meteorclient.utils.world.BlockIterator;
|
||||
import meteordevelopment.meteorclient.utils.world.BlockUtils;
|
||||
import meteordevelopment.orbit.EventHandler;
|
||||
import net.minecraft.block.TntBlock;
|
||||
import net.minecraft.item.*;
|
||||
@@ -35,13 +33,6 @@ public class AutoTNT extends Module {
|
||||
private final Setting<Boolean> ignite = sgGeneral.add(new BoolSetting.Builder()
|
||||
.name("ignite")
|
||||
.description("Whether to ignite tnt.")
|
||||
.defaultValue(false)
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Boolean> place = sgGeneral.add(new BoolSetting.Builder()
|
||||
.name("place")
|
||||
.description("Whether to place tnt. (VERY LAGGY)")
|
||||
.defaultValue(true)
|
||||
.build()
|
||||
);
|
||||
@@ -54,24 +45,16 @@ public class AutoTNT extends Module {
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Integer> placeDelay = sgGeneral.add(new IntSetting.Builder()
|
||||
.name("place-delay")
|
||||
.description("Delay in ticks between placement")
|
||||
.defaultValue(1)
|
||||
.visible(place::get)
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Integer> horizontalRange = sgGeneral.add(new IntSetting.Builder()
|
||||
.name("horizontal-range")
|
||||
.description("Horizontal range of ignition and placement")
|
||||
.description("Horizontal range of ignition")
|
||||
.defaultValue(4)
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<Integer> verticalRange = sgGeneral.add(new IntSetting.Builder()
|
||||
.name("vertical-range")
|
||||
.description("Vertical range of ignition and placement")
|
||||
.description("Vertical range of ignition")
|
||||
.defaultValue(4)
|
||||
.build()
|
||||
);
|
||||
@@ -101,19 +84,15 @@ public class AutoTNT extends Module {
|
||||
|
||||
private final List<BlockPos.Mutable> blocksToIgnite = new ArrayList<>();
|
||||
private final Pool<BlockPos.Mutable> ignitePool = new Pool<>(BlockPos.Mutable::new);
|
||||
private final List<TntPos> blocksToPlace = new ArrayList<>();
|
||||
private final Pool<TntPos> placePool = new Pool<>(TntPos::new);
|
||||
private int igniteTick = 0;
|
||||
private int placeTick = 0;
|
||||
|
||||
public AutoTNT() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-tnt", "Places and/or ignites tnt automatically. Good for griefing.");
|
||||
super(MeteorRejectsAddon.CATEGORY, "auto-tnt", "Ignites tnt automatically. Good for griefing.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivate() {
|
||||
igniteTick = 0;
|
||||
placeTick = 0;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@@ -128,17 +107,6 @@ public class AutoTNT extends Module {
|
||||
if (blockState.getBlock() instanceof TntBlock) blocksToIgnite.add(ignitePool.get().set(blockPos));
|
||||
});
|
||||
}
|
||||
|
||||
if (place.get() && placeTick > placeDelay.get()) {
|
||||
// Clear blocks
|
||||
for (TntPos tntPos : blocksToPlace) placePool.free(tntPos);
|
||||
blocksToPlace.clear();
|
||||
|
||||
// Register
|
||||
BlockIterator.register(horizontalRange.get(), verticalRange.get(), (blockPos, blockState) -> {
|
||||
if (BlockUtils.canPlace(blockPos)) blocksToPlace.add(placePool.get().set(blockPos, TntDamage.calculate(blockPos)));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@@ -170,28 +138,7 @@ public class AutoTNT extends Module {
|
||||
igniteTick = 0;
|
||||
}
|
||||
}
|
||||
igniteTick++;
|
||||
|
||||
// Placement
|
||||
if (place.get() && blocksToPlace.size() > 0) {
|
||||
if (placeTick > placeDelay.get()) {
|
||||
// Sort based on closest tnt
|
||||
blocksToPlace.sort(Comparator.comparingInt(o -> o.score));
|
||||
|
||||
// Placement
|
||||
FindItemResult itemResult = InvUtils.findInHotbar(item -> item.getItem() == Items.TNT);
|
||||
if (!itemResult.found()) {
|
||||
error("No tnt in hotbar");
|
||||
toggle();
|
||||
return;
|
||||
}
|
||||
place(blocksToPlace.get(0).blockPos, itemResult);
|
||||
|
||||
// Reset ticks
|
||||
placeTick = 0;
|
||||
}
|
||||
}
|
||||
placeTick++;
|
||||
igniteTick++;
|
||||
}
|
||||
|
||||
private void ignite(BlockPos pos, FindItemResult item) {
|
||||
@@ -201,22 +148,4 @@ public class AutoTNT extends Module {
|
||||
|
||||
InvUtils.swapBack();
|
||||
}
|
||||
|
||||
private void place(BlockPos pos, FindItemResult item) {
|
||||
BlockUtils.place(pos, item, rotate.get(), 10);
|
||||
}
|
||||
|
||||
private class TntPos {
|
||||
public BlockPos.Mutable blockPos;
|
||||
public int score;
|
||||
|
||||
public TntPos set(BlockPos blockPos, int score) {
|
||||
if (this.blockPos != null)
|
||||
this.blockPos.set(blockPos);
|
||||
|
||||
this.score = score;
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
import meteordevelopment.meteorclient.utils.misc.input.KeyAction;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.vehicle.BoatEntity;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractEntityC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
|
||||
@@ -121,7 +121,7 @@ public class BoatGlitch extends Module {
|
||||
@EventHandler
|
||||
private void onKey(KeyEvent event) {
|
||||
if (event.key == mc.options.sneakKey.getDefaultKey().getCode() && event.action == KeyAction.Press) {
|
||||
if (mc.player.getVehicle() != null && mc.player.getVehicle().getType().equals(EntityType.BOAT)) {
|
||||
if (mc.player.getVehicle() != null && mc.player.getVehicle() instanceof BoatEntity) {
|
||||
dontPhase = false;
|
||||
boat = null;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import meteordevelopment.meteorclient.settings.SettingGroup;
|
||||
import meteordevelopment.meteorclient.systems.modules.Module;
|
||||
import meteordevelopment.meteorclient.systems.modules.Modules;
|
||||
import meteordevelopment.meteorclient.utils.player.PlayerUtils;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.vehicle.BoatEntity;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
@@ -95,7 +94,7 @@ public class BoatPhase extends Module {
|
||||
|
||||
@EventHandler
|
||||
private void onBoatMove(BoatMoveEvent event) {
|
||||
if (mc.player.getVehicle() != null && mc.player.getVehicle().getType().equals(EntityType.BOAT)) {
|
||||
if (mc.player.getVehicle() != null && mc.player.getVehicle() instanceof BoatEntity) {
|
||||
if (boat != mc.player.getVehicle()) {
|
||||
if (boat != null) {
|
||||
boat.noClip = false;
|
||||
|
||||
@@ -3,19 +3,18 @@ package anticope.rejects.modules;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.CropBlock;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.network.packet.c2s.play.PlayerInteractBlockC2SPacket;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.hit.HitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.RaycastContext;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import meteordevelopment.meteorclient.events.render.Render3DEvent;
|
||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||
import meteordevelopment.meteorclient.renderer.ShapeMode;
|
||||
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.Rotations;
|
||||
@@ -47,8 +46,7 @@ public class BonemealAura extends Module {
|
||||
isBonemealing = true;
|
||||
Rotations.rotate(Rotations.getYaw(crop), Rotations.getPitch(crop), () -> {
|
||||
InvUtils.swap(bonemeal.slot(), false);
|
||||
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(
|
||||
mc.player.getPos(), rayTraceCheck(crop), crop, true));
|
||||
mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(Utils.vec3d(crop), Direction.UP, crop, false), 0));
|
||||
mc.player.swingHand(Hand.MAIN_HAND);
|
||||
});
|
||||
}
|
||||
@@ -69,22 +67,6 @@ public class BonemealAura extends Module {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private Direction rayTraceCheck(BlockPos pos) {
|
||||
Vec3d eyesPos = new Vec3d(mc.player.getX(), mc.player.getY() + mc.player.getEyeHeight(mc.player.getPose()), mc.player.getZ());
|
||||
for (Direction direction : Direction.values()) {
|
||||
RaycastContext raycastContext = new RaycastContext(eyesPos, new Vec3d(pos.getX() + 0.5 + direction.getVector().getX() * 0.5,
|
||||
pos.getY() + 0.5 + direction.getVector().getY() * 0.5,
|
||||
pos.getZ() + 0.5 + direction.getVector().getZ() * 0.5), RaycastContext.ShapeType.COLLIDER, RaycastContext.FluidHandling.NONE, mc.player);
|
||||
BlockHitResult result = mc.world.raycast(raycastContext);
|
||||
if (result != null && result.getType() == HitResult.Type.BLOCK && result.getBlockPos().equals(pos)) {
|
||||
return direction;
|
||||
}
|
||||
}
|
||||
|
||||
if (pos.getY() > eyesPos.y) return Direction.DOWN;
|
||||
|
||||
return Direction.UP;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onRender(Render3DEvent event) {
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
package anticope.rejects.modules;
|
||||
|
||||
import anticope.rejects.MeteorRejectsAddon;
|
||||
import meteordevelopment.meteorclient.events.world.CollisionShapeEvent;
|
||||
import meteordevelopment.meteorclient.events.world.TickEvent;
|
||||
import meteordevelopment.meteorclient.settings.BlockListSetting;
|
||||
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 meteordevelopment.meteorclient.utils.player.FindItemResult;
|
||||
import meteordevelopment.meteorclient.utils.player.InvUtils;
|
||||
import meteordevelopment.meteorclient.utils.player.Rotations;
|
||||
import meteordevelopment.meteorclient.utils.world.BlockUtils;
|
||||
import meteordevelopment.orbit.EventHandler;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
|
||||
public class Prone extends Module {
|
||||
|
||||
public enum Mode {
|
||||
WaterBucket,
|
||||
JustMaintain,
|
||||
Collision
|
||||
}
|
||||
|
||||
private final SettingGroup sgGeneral = settings.getDefaultGroup();
|
||||
|
||||
private final Setting<Mode> mode = sgGeneral.add(new EnumSetting.Builder<Mode>()
|
||||
.name("mode")
|
||||
.description("The mode used.")
|
||||
.defaultValue(Mode.WaterBucket)
|
||||
.build()
|
||||
);
|
||||
|
||||
private Setting<Boolean> autoMaintain = sgGeneral.add(new BoolSetting.Builder()
|
||||
.name("auto-maintain")
|
||||
.description("Switch to maintain mode when prone.")
|
||||
.defaultValue(true)
|
||||
.build()
|
||||
);
|
||||
|
||||
private final Setting<List<Block>> blocks = sgGeneral.add(new BlockListSetting.Builder()
|
||||
.name("blocks")
|
||||
.description("Selected blocks.")
|
||||
.build()
|
||||
);
|
||||
|
||||
private int waterModeStage = 0;
|
||||
|
||||
private List<BlockPos> waterModeTargets = Arrays.asList(
|
||||
new BlockPos(0, 0, 1),
|
||||
new BlockPos(0, 0, -1),
|
||||
new BlockPos(1, 0, 0),
|
||||
new BlockPos(-1, 0, 0)
|
||||
);
|
||||
|
||||
public Prone() {
|
||||
super(MeteorRejectsAddon.CATEGORY, "prone", "Become prone on demand.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeactivate() {
|
||||
waterModeStage = 0;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onTick(TickEvent.Post event) {
|
||||
if (autoMaintain.get() && mc.player.isInSwimmingPose() && !mc.player.isSubmergedInWater()) {
|
||||
BlockUtils.place(mc.player.getBlockPos().up(), InvUtils.find((itemstack) -> {return (itemstack.getItem() instanceof BlockItem blockitem && blocks.get().contains(blockitem.getBlock()));}), true, 1);
|
||||
}
|
||||
if (mode.get() == Mode.WaterBucket && mc.player.isInSwimmingPose() && waterModeStage > 0) {
|
||||
mc.options.forwardKey.setPressed(false);
|
||||
waterModeStage = 0;
|
||||
}
|
||||
if (mode.get() == Mode.WaterBucket && !mc.player.isInSwimmingPose()) {
|
||||
if (mc.player.isSubmergedInWater()) {
|
||||
mc.options.sprintKey.setPressed(true);
|
||||
waterModeStage += 1;
|
||||
if (waterModeStage > 2) {
|
||||
mc.options.forwardKey.setPressed(true);
|
||||
}
|
||||
} else {
|
||||
FindItemResult result = InvUtils.findInHotbar(Items.WATER_BUCKET);
|
||||
if (!result.found()) {
|
||||
waterModeStage = 0;
|
||||
}
|
||||
for (BlockPos offset : waterModeTargets) {
|
||||
BlockPos target = mc.player.getBlockPos().add(offset);
|
||||
if (mc.world.getBlockState(target).isFullCube(mc.world, target) && mc.world.getBlockState(target.up()).isAir()) {
|
||||
useBucket(result, target);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
private void onCollisionShape(CollisionShapeEvent event) {
|
||||
if (mode.get() != Mode.Collision) return;
|
||||
if (mc.world == null || mc.player == null || event.pos == null) return;
|
||||
if (event.state == null) return;
|
||||
|
||||
if (event.pos.getY() != mc.player.getY() + 1) return;
|
||||
|
||||
event.shape = VoxelShapes.fullCube();
|
||||
}
|
||||
|
||||
private void useBucket(FindItemResult bucket, BlockPos target) {
|
||||
if (!bucket.found()) return;
|
||||
|
||||
Rotations.rotate(Rotations.getYaw(target), Rotations.getPitch(target), 10, true, () -> {
|
||||
if (bucket.isOffhand()) {
|
||||
mc.interactionManager.interactItem(mc.player, Hand.OFF_HAND);
|
||||
} else {
|
||||
InvUtils.swap(bucket.slot(), true);
|
||||
mc.interactionManager.interactItem(mc.player, Hand.MAIN_HAND);
|
||||
InvUtils.swapBack();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class SkeletonESP extends Module {
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
RenderSystem.disableDepthTest();
|
||||
RenderSystem.depthMask(MinecraftClient.isFabulousGraphicsOrBetter());
|
||||
RenderSystem.depthMask(MinecraftClient.isFancyGraphicsOrBetter());
|
||||
RenderSystem.enableCull();
|
||||
|
||||
mc.world.getEntities().forEach(entity -> {
|
||||
@@ -168,8 +168,8 @@ public class SkeletonESP extends Module {
|
||||
bufferBuilder.vertex(matrix4f, 0, -0.55f, 0).color(skeletonColor.r, skeletonColor.g, skeletonColor.b, skeletonColor.a).next();
|
||||
matrixStack.pop();
|
||||
|
||||
// bufferBuilder.end();
|
||||
// BufferRenderer.draw(bufferBuilder); //TODO Skeleton ESP
|
||||
bufferBuilder.clear();
|
||||
BufferRenderer.drawWithShader(bufferBuilder.end());
|
||||
|
||||
if (swimming) matrixStack.translate(0, 0.95f, 0);
|
||||
if (swimming || flying) matrixStack.multiply(new Quaternion(new Vec3f(1, 0, 0), 90 + m, true));
|
||||
@@ -184,6 +184,7 @@ public class SkeletonESP extends Module {
|
||||
RenderSystem.disableBlend();
|
||||
RenderSystem.enableDepthTest();
|
||||
RenderSystem.depthMask(true);
|
||||
RenderSystem.setShader(GameRenderer::getPositionColorShader);
|
||||
}
|
||||
|
||||
private void rotate(MatrixStack matrix, ModelPart modelPart) {
|
||||
|
||||
Reference in New Issue
Block a user