Update to 1.19
This commit is contained in:
@@ -35,8 +35,8 @@ public class AntiSpawnpoint extends Module {
|
||||
|
||||
|
||||
BlockPos blockPos = ((PlayerInteractBlockC2SPacket) event.packet).getBlockHitResult().getBlockPos();
|
||||
boolean IsOverWorld = mc.world.getDimension().isBedWorking();
|
||||
boolean IsNetherWorld = mc.world.getDimension().isRespawnAnchorWorking();
|
||||
boolean IsOverWorld = mc.world.getDimension().bedWorks();
|
||||
boolean IsNetherWorld = mc.world.getDimension().respawnAnchorWorks();
|
||||
boolean BlockIsBed = mc.world.getBlockState(blockPos).getBlock() instanceof BedBlock;
|
||||
boolean BlockIsAnchor = mc.world.getBlockState(blockPos).getBlock().equals(Blocks.RESPAWN_ANCHOR);
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ public class AntiVanish extends Module {
|
||||
return uuidstr;
|
||||
}
|
||||
}
|
||||
return player.getName().asString();
|
||||
return player.getName().getString();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
|
||||
@@ -119,7 +119,7 @@ public class Auto32K extends Module {
|
||||
return;
|
||||
}
|
||||
mc.player.setSneaking(false);
|
||||
mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing(), bestBlock.up(), 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) {
|
||||
@@ -151,10 +151,10 @@ public class Auto32K extends Module {
|
||||
}
|
||||
phase += 1;
|
||||
} else if (phase == 2) {
|
||||
mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), Direction.UP, bestBlock, false));
|
||||
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, mc.world, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing().getOpposite(), bestBlock.up(), false));
|
||||
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);
|
||||
@@ -165,11 +165,11 @@ public class Auto32K extends Module {
|
||||
}else if (phase == 6) {
|
||||
mc.player.getInventory().selectedSlot = redstoneSlot.slot();
|
||||
mc.player.setSneaking(true);
|
||||
mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing().getOpposite(), bestBlock.up(2), false));
|
||||
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, mc.world, Hand.MAIN_HAND, new BlockHitResult(mc.player.getPos(), mc.player.getHorizontalFacing().getOpposite(), bestBlock.add(x, 0, z), false));
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class AutoExtinguish extends Module {
|
||||
|
||||
@EventHandler
|
||||
private void onTick(TickEvent.Pre event) {
|
||||
if (mc.world.getDimension().isRespawnAnchorWorking()) {
|
||||
if (mc.world.getDimension().respawnAnchorWorks()) {
|
||||
if (doesWaterBucketWork) {
|
||||
warning("Water Buckets don't work in this dimension!");
|
||||
doesWaterBucketWork = false;
|
||||
@@ -159,7 +159,7 @@ public class AutoExtinguish extends Module {
|
||||
float pitch = mc.gameRenderer.getCamera().getPitch() % 360;
|
||||
|
||||
Rotations.rotate(yaw, 90);
|
||||
mc.interactionManager.interactItem(mc.player, mc.player.world, Hand.MAIN_HAND);
|
||||
mc.interactionManager.interactItem(mc.player, Hand.MAIN_HAND);
|
||||
mc.player.getInventory().selectedSlot = preSlot;
|
||||
Rotations.rotate(yaw, pitch);
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ public class AutoTNT extends Module {
|
||||
private void ignite(BlockPos pos, FindItemResult item) {
|
||||
InvUtils.swap(item.slot(), true);
|
||||
|
||||
mc.interactionManager.interactBlock(mc.player, mc.world, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, true));
|
||||
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(new Vec3d(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5), Direction.UP, pos, true));
|
||||
|
||||
InvUtils.swapBack();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,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, mc.world, Hand.MAIN_HAND, new BlockHitResult(
|
||||
mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(
|
||||
mc.player.getPos(), rayTraceCheck(crop), crop, true));
|
||||
mc.player.swingHand(Hand.MAIN_HAND);
|
||||
});
|
||||
|
||||
@@ -25,6 +25,7 @@ import meteordevelopment.starscript.Script;
|
||||
import meteordevelopment.starscript.compiler.Compiler;
|
||||
import meteordevelopment.starscript.compiler.Parser;
|
||||
import meteordevelopment.starscript.utils.StarscriptError;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
public class ChatBot extends Module {
|
||||
|
||||
@@ -61,7 +62,8 @@ public class ChatBot extends Module {
|
||||
private void onMessageRecieve(ReceiveMessageEvent event) {
|
||||
String msg = event.getMessage().getString();
|
||||
if (help.get() && msg.endsWith(prefix.get()+"help")) {
|
||||
mc.getNetworkHandler().sendPacket(new ChatMessageC2SPacket("Avaliable commands: " + String.join(", ", commands.keySet())));
|
||||
mc.player.sendMessage(Text.of("Avaliable commands: " + String.join(", ", commands.keySet())), false);
|
||||
// mc.getNetworkHandler().sendPacket(new ChatMessageC2SPacket("Avaliable commands: " + String.join(", ", commands.keySet())), );
|
||||
return;
|
||||
}
|
||||
for (String cmd : commands.keySet()) {
|
||||
|
||||
@@ -15,8 +15,8 @@ import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.passive.TameableEntity;
|
||||
import net.minecraft.network.packet.s2c.play.EntityPositionS2CPacket;
|
||||
import net.minecraft.network.packet.s2c.play.WorldEventS2CPacket;
|
||||
import net.minecraft.text.BaseText;
|
||||
import net.minecraft.text.LiteralText;
|
||||
import net.minecraft.text.MutableText;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Formatting;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
@@ -149,14 +149,14 @@ public class CoordLogger extends Module {
|
||||
}
|
||||
}
|
||||
|
||||
public BaseText formatMessage(String message, Vec3d coords) {
|
||||
BaseText text = new LiteralText(message);
|
||||
public MutableText formatMessage(String message, Vec3d coords) {
|
||||
MutableText text = Text.literal(message);
|
||||
text.append(ChatUtils.formatCoords(coords));
|
||||
text.append(Formatting.GRAY.toString()+".");
|
||||
return text;
|
||||
}
|
||||
|
||||
public BaseText formatMessage(String message, BlockPos coords) {
|
||||
public MutableText formatMessage(String message, BlockPos coords) {
|
||||
return formatMessage(message, new Vec3d(coords.getX(), coords.getY(), coords.getZ()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,11 +52,11 @@ public class CustomPackets extends Module {
|
||||
|
||||
private void onUnknownPacket(CustomPayloadEvent event) {
|
||||
if (!unknownPackets.get()) return;
|
||||
BaseText text = new LiteralText(event.packet.getChannel().toString());
|
||||
MutableText text = Text.literal(event.packet.getChannel().toString());
|
||||
text.setStyle(text.getStyle()
|
||||
.withHoverEvent(new HoverEvent(
|
||||
HoverEvent.Action.SHOW_TEXT,
|
||||
new LiteralText(readString(event.packet.getData()))
|
||||
Text.literal(readString(event.packet.getData()))
|
||||
)));
|
||||
info(text);
|
||||
}
|
||||
@@ -69,8 +69,8 @@ public class CustomPackets extends Module {
|
||||
event.cancel();
|
||||
}
|
||||
|
||||
private BaseText format(String type, BaseText message) {
|
||||
BaseText text = new LiteralText(String.format("[%s%s%s]",
|
||||
private MutableText format(String type, MutableText message) {
|
||||
MutableText text = Text.literal(String.format("[%s%s%s]",
|
||||
Formatting.AQUA,
|
||||
type,
|
||||
Formatting.GRAY
|
||||
@@ -87,18 +87,18 @@ public class CustomPackets extends Module {
|
||||
).toString();
|
||||
}
|
||||
|
||||
private BaseText formatMods(Map<String, BadlionMod> mods) {
|
||||
BaseText text = new LiteralText("Disallowed mods: \n");
|
||||
private MutableText formatMods(Map<String, BadlionMod> mods) {
|
||||
MutableText text = Text.literal("Disallowed mods: \n");
|
||||
|
||||
mods.forEach((name, data) -> {
|
||||
BaseText modLine = new LiteralText(String.format("- %s%s%s ", Formatting.YELLOW, name, Formatting.GRAY));
|
||||
MutableText modLine = Text.literal(String.format("- %s%s%s ", Formatting.YELLOW, name, Formatting.GRAY));
|
||||
modLine.append(data.disabled ? "disabled" : "enabled");
|
||||
modLine.append("\n");
|
||||
if (data.extra_data != null) {
|
||||
modLine.setStyle(modLine.getStyle()
|
||||
.withHoverEvent(new HoverEvent(
|
||||
HoverEvent.Action.SHOW_TEXT,
|
||||
new LiteralText(data.extra_data.toString())
|
||||
Text.literal(data.extra_data.toString())
|
||||
)));
|
||||
}
|
||||
text.append(modLine);
|
||||
|
||||
@@ -207,7 +207,7 @@ public class Lavacast extends Module {
|
||||
}
|
||||
int prevSlot = mc.player.getInventory().selectedSlot;
|
||||
mc.player.getInventory().selectedSlot = findItemResult.slot();
|
||||
mc.interactionManager.interactItem(mc.player,mc.world,Hand.MAIN_HAND);
|
||||
mc.interactionManager.interactItem(mc.player,Hand.MAIN_HAND);
|
||||
mc.player.getInventory().selectedSlot = prevSlot;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ public class Lavacast extends Module {
|
||||
}
|
||||
int prevSlot = mc.player.getInventory().selectedSlot;
|
||||
mc.player.getInventory().selectedSlot = findItemResult.slot();
|
||||
mc.interactionManager.interactItem(mc.player,mc.world,Hand.MAIN_HAND);
|
||||
mc.interactionManager.interactItem(mc.player,Hand.MAIN_HAND);
|
||||
mc.player.getInventory().selectedSlot = prevSlot;
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ public class Lavacast extends Module {
|
||||
}
|
||||
int prevSlot = mc.player.getInventory().selectedSlot;
|
||||
mc.player.getInventory().selectedSlot = findItemResult.slot();
|
||||
mc.interactionManager.interactItem(mc.player,mc.world,Hand.MAIN_HAND);
|
||||
mc.interactionManager.interactItem(mc.player,Hand.MAIN_HAND);
|
||||
mc.player.getInventory().selectedSlot = prevSlot;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ObsidianFarm extends Module {
|
||||
if (mc.player == null) return;
|
||||
if (mc.world == null) return;
|
||||
if (mc.interactionManager == null) return;
|
||||
if (mc.world.getDimension().isRespawnAnchorWorking()) {
|
||||
if (mc.world.getDimension().respawnAnchorWorks()) {
|
||||
allowBreakAgain = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,10 +24,12 @@ import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.math.random.ChunkRandom;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.Heightmap;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.chunk.ChunkStatus;
|
||||
import net.minecraft.world.gen.random.ChunkRandom;
|
||||
//import net.minecraft.world.chunk.world.random.ChunkRandom;
|
||||
import com.seedfinding.mccore.version.MCVersion;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -134,7 +136,7 @@ public class OreSim extends Module {
|
||||
long chunkX = mc.player.getChunkPos().x;
|
||||
long chunkZ = mc.player.getChunkPos().z;
|
||||
ClientWorld world = mc.world;
|
||||
int renderdistance = mc.options.viewDistance;
|
||||
int renderdistance = mc.options.getViewDistance().getValue();
|
||||
|
||||
//maybe another config option? But its already crowded
|
||||
int chunkCounter = 5;
|
||||
@@ -215,7 +217,7 @@ public class OreSim extends Module {
|
||||
}
|
||||
|
||||
private void loadVisibleChunks() {
|
||||
int renderdistance = mc.options.viewDistance;
|
||||
int renderdistance = mc.options.getViewDistance().getValue();
|
||||
|
||||
if (mc.player == null) {
|
||||
return;
|
||||
@@ -287,7 +289,7 @@ public class OreSim extends Module {
|
||||
return;
|
||||
}
|
||||
String biomeName = id.getPath();
|
||||
Identifier dimensionName = world.getDimension().getEffects();
|
||||
Identifier dimensionName = world.getDimension().effects();
|
||||
|
||||
for (Ore ore : oreConfig) {
|
||||
|
||||
@@ -351,7 +353,7 @@ public class OreSim extends Module {
|
||||
// Mojang code
|
||||
// ====================================
|
||||
|
||||
private ArrayList<Vec3d> generateNormal(ClientWorld world, Random random, BlockPos blockPos, int veinSize, float discardOnAir) {
|
||||
private ArrayList<Vec3d> generateNormal(ClientWorld world, ChunkRandom random, BlockPos blockPos, int veinSize, float discardOnAir) {
|
||||
float f = random.nextFloat() * 3.1415927F;
|
||||
float g = (float) veinSize / 8.0F;
|
||||
int i = MathHelper.ceil(((float) veinSize / 16.0F * 2.0F + 1.0F) / 2.0F);
|
||||
@@ -378,7 +380,7 @@ public class OreSim extends Module {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
private ArrayList<Vec3d> generateVeinPart(ClientWorld world, Random 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) {
|
||||
private ArrayList<Vec3d> generateVeinPart(ClientWorld world, ChunkRandom 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.Mutable mutable = new BlockPos.Mutable();
|
||||
@@ -468,7 +470,7 @@ public class OreSim extends Module {
|
||||
return poses;
|
||||
}
|
||||
|
||||
private boolean shouldPlace(ClientWorld world, BlockPos orePos, float discardOnAir, Random random) {
|
||||
private boolean shouldPlace(ClientWorld world, BlockPos orePos, float discardOnAir, ChunkRandom random) {
|
||||
if (discardOnAir == 0F || (discardOnAir != 1F && random.nextFloat() >= discardOnAir)) {
|
||||
return true;
|
||||
}
|
||||
@@ -481,7 +483,7 @@ public class OreSim extends Module {
|
||||
return true;
|
||||
}
|
||||
|
||||
private ArrayList<Vec3d> generateHidden(ClientWorld world, Random random, BlockPos blockPos, int size) {
|
||||
private ArrayList<Vec3d> generateHidden(ClientWorld world, ChunkRandom random, BlockPos blockPos, int size) {
|
||||
|
||||
ArrayList<Vec3d> poses = new ArrayList<>();
|
||||
|
||||
@@ -502,7 +504,7 @@ public class OreSim extends Module {
|
||||
return poses;
|
||||
}
|
||||
|
||||
private int randomCoord(Random random, int size) {
|
||||
private int randomCoord(ChunkRandom random, int size) {
|
||||
return Math.round((random.nextFloat() - random.nextFloat()) * (float) size);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,10 +121,10 @@ public class Prone extends Module {
|
||||
|
||||
Rotations.rotate(Rotations.getYaw(target), Rotations.getPitch(target), 10, true, () -> {
|
||||
if (bucket.isOffhand()) {
|
||||
mc.interactionManager.interactItem(mc.player, mc.world, Hand.OFF_HAND);
|
||||
mc.interactionManager.interactItem(mc.player, Hand.OFF_HAND);
|
||||
} else {
|
||||
InvUtils.swap(bucket.slot(), true);
|
||||
mc.interactionManager.interactItem(mc.player, mc.world, Hand.MAIN_HAND);
|
||||
mc.interactionManager.interactItem(mc.player, Hand.MAIN_HAND);
|
||||
InvUtils.swapBack();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
// bufferBuilder.end();
|
||||
// BufferRenderer.draw(bufferBuilder); //TODO Skeleton ESP
|
||||
|
||||
if (swimming) matrixStack.translate(0, 0.95f, 0);
|
||||
if (swimming || flying) matrixStack.multiply(new Quaternion(new Vec3f(1, 0, 0), 90 + m, true));
|
||||
|
||||
@@ -96,9 +96,9 @@ public class TreeAura extends Module {
|
||||
}
|
||||
InvUtils.swap(sapling.slot(), false);
|
||||
if (rotation.get())
|
||||
Rotations.rotate(Rotations.getYaw(plantPos), Rotations.getPitch(plantPos), () -> mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(Utils.vec3d(plantPos), Direction.UP, plantPos, false))));
|
||||
Rotations.rotate(Rotations.getYaw(plantPos), Rotations.getPitch(plantPos), () -> mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(Utils.vec3d(plantPos), Direction.UP, plantPos, false), 0)));
|
||||
else
|
||||
mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(Utils.vec3d(plantPos), Direction.UP, plantPos, false)));
|
||||
mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(Utils.vec3d(plantPos), Direction.UP, plantPos, false), 0));
|
||||
}
|
||||
|
||||
private void doBonemeal(BlockPos sapling) {
|
||||
@@ -110,9 +110,9 @@ public class TreeAura extends Module {
|
||||
}
|
||||
InvUtils.swap(bonemeal.slot(), false);
|
||||
if (rotation.get())
|
||||
Rotations.rotate(Rotations.getYaw(sapling), Rotations.getPitch(sapling), () -> mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(Utils.vec3d(sapling), Direction.UP, sapling, false))));
|
||||
Rotations.rotate(Rotations.getYaw(sapling), Rotations.getPitch(sapling), () -> mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(Utils.vec3d(sapling), Direction.UP, sapling, false), 0)));
|
||||
else
|
||||
mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(Utils.vec3d(sapling), Direction.UP, sapling, false)));
|
||||
mc.player.networkHandler.sendPacket(new PlayerInteractBlockC2SPacket(Hand.MAIN_HAND, new BlockHitResult(Utils.vec3d(sapling), Direction.UP, sapling, false), 0));
|
||||
}
|
||||
|
||||
private boolean canPlant(BlockPos pos) {
|
||||
|
||||
Reference in New Issue
Block a user