Fix #5, disable AutoTNT for now

This commit is contained in:
Cloudburst
2021-06-02 21:47:33 +02:00
parent 1f6c9d6aa6
commit 33169c1681
3 changed files with 83 additions and 76 deletions

View File

@@ -29,7 +29,7 @@ public class MeteorRejectsAddon extends MeteorAddon {
modules.add(new AutoExtinguish()); modules.add(new AutoExtinguish());
modules.add(new AutoHighway()); modules.add(new AutoHighway());
modules.add(new AutoPot()); modules.add(new AutoPot());
modules.add(new AutoTNT()); //modules.add(new AutoTNT());
modules.add(new Confuse()); modules.add(new Confuse());
modules.add(new InteractionMenu()); modules.add(new InteractionMenu());
modules.add(new Glide()); modules.add(new Glide());

View File

@@ -83,10 +83,11 @@ public class AutoTNT extends Module {
if (ticks <= 0) { if (ticks <= 0) {
// Clear and get tnt blocks // Clear and get tnt blocks
blocks.clear(); blocks.clear();
for (BlockPos blockPos : BlockUtils.getSphere(mc.player.getBlockPos(), range.get(), range.get())) { // TODO: Fix
bp.set(blockPos); // for (BlockPos blockPos : BlockUtils.getSphere(mc.player.getBlockPos(), range.get(), range.get())) {
if (mc.world.getBlockState(blockPos).getBlock() instanceof TntBlock) blocks.add(bp); // bp.set(blockPos);
} // if (mc.world.getBlockState(blockPos).getBlock() instanceof TntBlock) blocks.add(bp);
// }
// Make sure there are TNTs around us // Make sure there are TNTs around us
if (blocks.size() <= 0) { if (blocks.size() <= 0) {
@@ -144,4 +145,5 @@ public class AutoTNT extends Module {
private void setBpToVec3d(Vec3d pos) { private void setBpToVec3d(Vec3d pos) {
bp.set(pos.getX(), pos.getY(), pos.getZ()); bp.set(pos.getX(), pos.getY(), pos.getZ());
} }
} }

View File

@@ -6,15 +6,19 @@ import meteordevelopment.orbit.EventHandler;
import minegame159.meteorclient.events.render.RenderEvent; import minegame159.meteorclient.events.render.RenderEvent;
import minegame159.meteorclient.settings.*; import minegame159.meteorclient.settings.*;
import minegame159.meteorclient.systems.modules.Module; import minegame159.meteorclient.systems.modules.Module;
import minegame159.meteorclient.utils.player.PlayerUtils;
import minegame159.meteorclient.utils.render.color.Color; import minegame159.meteorclient.utils.render.color.Color;
import minegame159.meteorclient.utils.render.color.SettingColor; import minegame159.meteorclient.utils.render.color.SettingColor;
import net.minecraft.client.model.ModelPart; import net.minecraft.client.model.ModelPart;
import net.minecraft.client.options.Perspective;
import net.minecraft.client.render.*; import net.minecraft.client.render.*;
import net.minecraft.client.render.entity.LivingEntityRenderer; import net.minecraft.client.render.entity.LivingEntityRenderer;
import net.minecraft.client.render.entity.PlayerEntityRenderer; import net.minecraft.client.render.entity.PlayerEntityRenderer;
import net.minecraft.client.render.entity.model.PlayerEntityModel; import net.minecraft.client.render.entity.model.PlayerEntityModel;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.client.util.math.Vector3f; import net.minecraft.client.util.math.Vector3f;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.math.*; import net.minecraft.util.math.*;
@@ -37,9 +41,11 @@ public class SkeletonESP extends Module {
MatrixStack matrixStack = event.matrices; MatrixStack matrixStack = event.matrices;
float g = event.tickDelta; float g = event.tickDelta;
Render3DUtils.INSTANCE.setup3DRender(true); Render3DUtils.INSTANCE.setup3DRender(true);
Color skeletonColor = skeletonColorSetting.get();
mc.world.getEntities().forEach(entity -> { mc.world.getEntities().forEach(entity -> {
if (entity instanceof PlayerEntity && entity.getUuid() != mc.player.getUuid()) { if (!(entity instanceof PlayerEntity)) return;
if (mc.options.getPerspective() == Perspective.FIRST_PERSON && (Entity)mc.player == entity) return;
Color skeletonColor = PlayerUtils.getPlayerColor((PlayerEntity)entity, skeletonColorSetting.get());
PlayerEntity playerEntity = (PlayerEntity) entity; PlayerEntity playerEntity = (PlayerEntity) entity;
Vec3d footPos = Render3DUtils.INSTANCE.getEntityRenderPosition(playerEntity, g); Vec3d footPos = Render3DUtils.INSTANCE.getEntityRenderPosition(playerEntity, g);
@@ -124,7 +130,6 @@ public class SkeletonESP extends Module {
matrixStack.multiply(new Quaternion(new Vector3f(0, 1, 0), playerEntity.bodyYaw + 180, true)); matrixStack.multiply(new Quaternion(new Vector3f(0, 1, 0), playerEntity.bodyYaw + 180, true));
matrixStack.translate(-footPos.x, -footPos.y, -footPos.z); matrixStack.translate(-footPos.x, -footPos.y, -footPos.z);
}
}); });
Render3DUtils.INSTANCE.end3DRender(); Render3DUtils.INSTANCE.end3DRender();
} }