make ESP not GL_ERROR constantly
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m48s

This commit is contained in:
Daniella / Tove 2024-06-12 18:59:53 +02:00
parent fe31ff5f19
commit 97ea6fc193
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
2 changed files with 7 additions and 5 deletions

View file

@ -7,10 +7,10 @@ import de.com.baseband.client.feature.client.Client;
import de.com.baseband.client.registry.annotation.Config;
import de.com.baseband.client.util.render.Pixels;
import de.com.baseband.client.util.render.RenderAdapter;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@ -79,7 +79,7 @@ public class ESP extends Feature {
private void draw(RenderWorldLastEvent event, Consumer<AxisAlignedBB> renderer) {
if (entities) {
for (Entity entity : Minecraft.getMinecraft().world.loadedEntityList) {
for (Entity entity : mc.world.loadedEntityList) {
AxisAlignedBB interpolated = RenderAdapter.getLiveEntityBB(entity, event.getPartialTicks());
if (entity == mc.player && mc.gameSettings.thirdPersonView == 0) {
continue;
@ -89,8 +89,11 @@ public class ESP extends Feature {
}
if (tileEntities) {
for (TileEntity entity : Minecraft.getMinecraft().world.loadedTileEntityList) {
renderer.accept(entity.getRenderBoundingBox());
for (TileEntity entity : mc.world.loadedTileEntityList) {
// this is a fuck
// getRenderBoundingBox often falls back to bullshit like INFINITE BOUNDING BOXES.
BlockPos pos = entity.getPos();
renderer.accept(mc.world.getBlockState(pos).getBoundingBox(mc.world, pos));
}
}
}

View file

@ -287,7 +287,6 @@ public class RenderAdapter {
depth(false);
begin(GL11.GL_LINES);
drawAABBLinesNow(bb);
end();