On the Thin Ice of Modern Life
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m15s

This commit is contained in:
Jess H 2024-06-17 02:21:17 +01:00
parent 3cd14ec5fc
commit bb5f5c70cd
Signed by: UnixSystemV
GPG key ID: 9B21C50B68D67F19

View file

@ -10,11 +10,11 @@ import de.com.baseband.client.registry.annotation.Range;
import de.com.baseband.client.util.adapt.Marker;
import de.com.baseband.client.util.render.Pixels;
import de.com.baseband.client.util.render.RenderAdapter;
import net.minecraft.block.BlockAir;
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.RayTraceResult;
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@ -37,9 +37,9 @@ public class ESP extends Feature {
@Marker(0)
public boolean highlight;
@Config("Highlight Air")
@Config("Highlight Nothing")
@Gate(0)
public boolean hightlightAir;
public boolean hightlightNothing;
@Config("Entities")
public boolean entities;
@ -113,12 +113,14 @@ public class ESP extends Feature {
}
if(highlight) {
if(mc.objectMouseOver != null) {
BlockPos pos = mc.objectMouseOver.getBlockPos();
if(!(mc.world.getBlockState(pos).getBlock() instanceof BlockAir) || !hightlightAir) {
if (!(mc.objectMouseOver.typeOfHit == RayTraceResult.Type.MISS) || !hightlightNothing) {
renderer.accept(mc.world.getBlockState(pos).getBoundingBox(mc.world, pos).offset(pos));
}
}
}
}
}