This commit is contained in:
Bella 2020-04-07 10:50:35 -04:00
parent 94923cd86e
commit dc0ff2129a
No known key found for this signature in database
GPG Key ID: DBD4A6030080C8B3
1 changed files with 11 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import me.zeroeightsix.kami.util.Wrapper;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import org.lwjgl.opengl.GL11;
import static org.lwjgl.opengl.GL11.*;
@ -50,11 +51,18 @@ public class RadarUI extends AbstractComponentUI<Radar> {
continue;
float red = 1f;
float green = 1f;
float blue = 1f;
if (EntityUtil.isPassive(e))
if (EntityUtil.isPassive(e)) {
red = 0;
else
blue = 0;
} else if (EntityUtil.isHostileMob(e)) {
green = 0;
blue = 0;
} else {
red = 0;
green = 0;
}
double dX = e.posX - Wrapper.getPlayer().posX;
double dZ = e.posZ - Wrapper.getPlayer().posZ;
@ -64,7 +72,7 @@ public class RadarUI extends AbstractComponentUI<Radar> {
if (distance > radius * scale || Math.abs(Wrapper.getPlayer().posY - e.posY) > 30)
continue;
glColor4f(red, green, 0f, 0.5f);
glColor4f(red, green, blue, 0.5f);
RenderHelper.drawCircle((int) dX / scale, (int) dZ / scale, 2.5f / scale);
}