public static void drawRoundFace(MatrixStack stack, final float x, final float y, final int size, final float alpha, final float radius, final Entity target) {
try {
if (target instanceof AbstractClientPlayerEntity player) {
final ResourceLocation skin = player.getLocationSkin();
IMinecraft.mc.getTextureManager().bindTexture(skin);
RenderSystem.pushMatrix();
RenderSystem.enableBlend();
RenderSystem.blendFunc(770, 771);
roundedFace.init();
roundedFace.setUniform("location", x * 2.0f, sr.getHeight() - size * 2.0f - y * 2.0f);
roundedFace.setUniform("size", size * 2.0f, size * 2.0f);
roundedFace.setUniform("texture", 0);
roundedFace.setUniform("radius", radius * 2.0f);
roundedFace.setUniform("alpha", alpha);
roundedFace.setUniform("u", 0.125f);
roundedFace.setUniform("v", 0.125f);
roundedFace.setUniform("w", 0.125f);
roundedFace.setUniform("h", 0.125f);
quadsBegin(x, y, size, size, 7);
roundedFace.unload();;
RenderSystem.disableBlend();
RenderSystem.popMatrix();
} else {
drawRoundedRect(stack, x, y, size, size, radius, ColorUtility.rgba(20, 20, 20, 60), false, size);
}
}
catch (final Exception e) {
e.printStackTrace();
}
}