add opacity option to ESP
This commit is contained in:
parent
49cc495e6b
commit
f6c8fe11e8
1 changed files with 9 additions and 3 deletions
|
@ -5,6 +5,9 @@ import de.com.baseband.client.feature.Features;
|
|||
import de.com.baseband.client.feature.category.Render;
|
||||
import de.com.baseband.client.feature.client.Client;
|
||||
import de.com.baseband.client.registry.annotation.Config;
|
||||
import de.com.baseband.client.registry.annotation.Gate;
|
||||
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.entity.Entity;
|
||||
|
@ -39,7 +42,12 @@ public class ESP extends Feature {
|
|||
public boolean wireframe;
|
||||
|
||||
@Config("Fill")
|
||||
@Marker(1)
|
||||
public boolean fill;
|
||||
@Config("Fill opacity")
|
||||
@Range("0.1..1")
|
||||
@Gate(1)
|
||||
public float opacity = 0.2f;
|
||||
|
||||
|
||||
|
||||
|
@ -52,7 +60,7 @@ public class ESP extends Feature {
|
|||
if(fill) {
|
||||
ready();
|
||||
translate(-eyePos.x, -eyePos.y, -eyePos.z);
|
||||
color(Pixels.mulTransparency(Features.getFeature(Client.class).theme.getGreenColor() | 0xff000000, 0.2f));
|
||||
color(Pixels.mulTransparency(Features.getFeature(Client.class).theme.getGreenColor() | 0xff000000, opacity));
|
||||
depth(false);
|
||||
begin(GL11.GL_QUADS);
|
||||
|
||||
|
@ -73,8 +81,6 @@ public class ESP extends Feature {
|
|||
|
||||
end();
|
||||
}
|
||||
|
||||
end();
|
||||
}
|
||||
|
||||
private void draw(RenderWorldLastEvent event, Consumer<AxisAlignedBB> renderer) {
|
||||
|
|
Loading…
Add table
Reference in a new issue