mega12345mega / NBT-Editor

Edit items, blocks, and entities in-game.
MIT License
46 stars 14 forks source link

Game crash when used with another mod #56

Closed Rhgx closed 7 months ago

Rhgx commented 1 year ago

I have another I normally use when playing Minecraft along with NBT Editor called Essential GUI. The mod has a feature where you press ALT and look at a block/entity you can see their properties. After this new 1.20 update came out my game started crashing when looking at a block/entity whilst pressing ALT. I have already reached out to the developer of Essential GUI and he said its a problem with NBT Editor. Here is what he said :

Yep, the problem appears with NBT Editor when pointing to any block/entity while holding Left-Alt to show Advanced Properties but only if Pointed Block/Pointed Entity Advanced Properties Hud Style is set to "Tooltip", if set to "EssentialGUI" it works fine...

Honestly, I don't know what the problem is or how to fix it. I suggest you three possible solutions:

Redefine EssentialGUI's contextual menu key (Left-Alt by default) to another key. But when you press down contextual menu key when pointing to any block/entity it will crash...

Change Pointed Block/Pointed Entity Advanced Hud Style to EssentialGUI.

Disable Pointed Block/Pointed Entity Advanced Properties.

Sorry.

Anyways, here are the crash logs : https://mclo.gs/YYUpsWV

mega12345mega commented 1 year ago

This is interesting! Based on the crash log, it appears that the Essential GUI mod is rendering a tooltip without opening a screen. Currently, my mod assumes that a screen is open whenever a tooltip is being rendered. To add on to that, 1.19.3 and 1.19.4's standard tooltip positioners assume that a screen is open as well.

This should be pretty easy to fix.

In the meantime, I believe if you disable "Tooltip Overflow Fix" in the /nbt config screen, the crash should stop. The disadvantage is that this will make images imported as item lore basically impossible to view if they are not at a tiny resolution.

Rhgx commented 1 year ago

Thanks for the help. When can I expect you to push the fix?

mega12345mega commented 7 months ago

I've now fixed this in v1.13.0!