use of cope.cosmos.asm.mixins.accessor.IRenderGlobal in project cosmos by momentumdevelopment.
the class ESPModule method onUpdate.
@Override
public void onUpdate() {
if (mode.getValue().equals(Mode.GLOW)) {
// set all entities in the world glowing
mc.world.loadedEntityList.forEach(entity -> {
if (entity != null && !entity.equals(mc.player) && hasHighlight(entity)) {
entity.setGlowing(true);
}
});
// get the shaders
ShaderGroup outlineShaderGroup = ((IRenderGlobal) mc.renderGlobal).getEntityOutlineShader();
List<Shader> shaders = ((IShaderGroup) outlineShaderGroup).getListShaders();
// update the shader radius
shaders.forEach(shader -> {
ShaderUniform outlineRadius = shader.getShaderManager().getShaderUniform("Radius");
if (outlineRadius != null) {
outlineRadius.set(width.getValue().floatValue());
}
});
}
}
Aggregations