Posted August 7, 20214 yr 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); }
August 7, 20214 yr Author Can you give me an example? I've been searching for this article for days, but I can't find it.
August 7, 20214 yr Author 1 hour ago, diesieben07 said: You need to give it a NativeImage, not a BufferedImage. Look at how Minecraft uses DynamicTexture. Also: That is not at all how you handle exceptions, ever. Can you give me an example? I've been searching for this article for days, but I can't find it.
August 7, 20214 yr Author 14 minutes ago, diesieben07 said: Not sure what you mean by "article". Search for references on "DynamicTexture" in your IDE and look where Minecraft creates it. I found this code on Google. So this code is wrong?
August 7, 20214 yr Author 7 minutes ago, diesieben07 said: It is for ancient versions of Minecraft. Thanks!. I'll look it up one more time.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.