NBT Editor

NBT Editor

30k Downloads

NBT Editing screen doesn't display properly

MachineRat8 opened this issue ยท 10 comments

commented

From what I've seen in screenshots, this isn't how the mod is supposed to look:

bug-1
Above is a netherite sword enchanted with sharpness 5.
It is missing these:
bug-2
I'm running version 1.5.0 of the mod on 1.18.2, with Java 17, on an M1 Mac.

commented

That's interesting! I'm guessing the issue is related to this line.
It cuts off the rendering on the edges of the list, so when scrolling the keys don't appear on top of the text fields above.
I'm guessing Minecraft handles the window sizing for Mac slightly differently, so the calculations for what area to cut off is off.

One (or both) of these functions must be returning an unusual value:

client.getWindow().getScaleFactor()
client.getWindow().getHeight()

I'm not sure the best way to fix or test this, but I can send you a file with this line removed.
It will also output the result from the above two functions into the log (there will be a little spam).
Can you confirm whether or not it works, and send what is in the new log? Thanks.
Try both fullscreen and not fullscreen, incase that makes a difference to the functions.

Download link: nbteditor-1.5.999.zip
You will have to extract the mod from the zip, as github doesn't support uploading .jars to comments apparently.

commented

Sorry for the delay, I tried it with a brand new instance, with no resource packs on a new world, and it still didn't work, I gave myself the item from the creative inventory and then used an anvil to apply enchantments, so there shouldn't be any problems there. Here is the log, although I can't seem to find an error (aside from the mod generating the config files on first launch).

commented

It appears there is a slight issue when generating the config files. It tries to create the settings file before creating the parent folder, which on the first launch causes the java.nio.file.NoSuchFileException. However, this doesn't end up causing any problems, and doesn't seem to be the source of the issue. It is also fixed for the next launches.

I'm honestly out of ideas on why this would occur. Here are a few more things to try:

  • Changing the gui scale
  • Changing the window size for Minecraft itself
  • Scrolling where it should be
  • Maybe an issue was introduced in a later version:
    • Loading Beta 1.0.0
    • If that works, loading the versions until it stops working

I'm assuming you don't have anything stored in the client chest, but if so I would backup that folder if you try to revert to an earlier version. (<TheGameDirectory>/nbteditor)

commented

I tried everything you said, none of them worked, but I tried clicking underneath the text boxes where the NBT data would be, and I was able to access and edit the data:
image
I tried with v1.0.0 of the mod and with a variety of different resolutions and GUI scales, but the boxes still didn't render. Maybe there could be a config setting changing the rendering from the boxes to 2 text boxes, one for the path, the other for the value, and an icon to the left of both showing what data type it is)?

commented

I'm having trouble replicating the issue.
Try making it in a singleplayer world with no other mods loaded (keeping the Fabric API mod).
Are you receiving the sword in an unusual way? How the item ends up in your inventory shouldn't have any affect, but it is possible a plugin does something weird that messes it up.
Also try disabling all your resource packs; it is possible one of them overrides the icons and fonts in a way that causes issues.
If the problem still persists after all that, I'm not really sure how to help, since it works fine for me.

commented

Can you send the log? It should be located in <TheGameDirectory>/logs
There may be an error message there that could help.

commented

It works! Working with both fullscreen and windowed, with Quilt and Fabric, both work great. Here is the log: latest.log

commented

In the 1.19 update (v1.6.0) there is now a config option to enable the temporary fix.

commented

In the 1.19 update (v1.6.0) there is now a config option to enable the temporary fix.

This fix works for me. Without that option enabled it works fine on my Linux machine, but when I moved the exact same MC folder to my MacBook, I encountered this issue. I enabled the option on my MacBook and it displays properly.

I'm using v1.6.1 on Fabric with Minecraft 1.19.

commented

In the v1.9.0 update, I have now renamed the config option to "Mac Border Patch," as it affects more than just the editor's keys.
This config option is now also enabled by default for new Mac users.