I want to make an overlay using player's face.
I thought of two ways.
First, import images through Url.
Second, save and recall files.
But both failed.
First, dynmaictexture can't convert using bufferedImage.
Second, I can't save asset folder.
Please help me, including examples.
I'm working on an overlay-related mode.
However, a dynamic related error occurred.
The bottom is the sauce, and the error message is "error: incompatible types: BufferedImage cannot be converted to NativeImage ".
Please Help me..
public DynamicTexture getImage(String UUID) {
BufferedImage bi = null;
try {
URL url = new URL("https://crafatar.com/avatars/" + UUID);
bi = ImageIO.read(url);
} catch(MalformedURLException e) {
} catch(IOException e) {
}
return new DynamicTexture(bi);
}