Code Monkey home page Code Monkey logo

tooltipfix's Introduction

ToolTip Fix

Mod loader: Fabric GitHub license GitHub repo size GitHub last commit

Fixes ToolTips from runnning off the screen

Installed:

Image of Yaktocat

Vanilla:

Image of Yaktocat

ToDo:

  • Add compatibility with rei
  • Change icon to more representive
  • Change mod descrition

tooltipfix's People

Contributors

jptrzy avatar kyrptonaught avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tooltipfix's Issues

Incorrect tooltip warpping direction

Tooltipfix seems to assume that the tooltip window is on the other side of the item than in practice, therefore word wrapping in situations when it should not.
bug

TooltipFix breaks vanilla and modded TooltipPositioners, breaks EMI

In 1.19.3 Mojang added the ability for tooltips to use TooltipPositioners that dictate their place on the screen and handle things such as wrapping. TooltipFix completely ignores them and then breaks them by changing the x position of any tooltip. For instance, a mod like EMI that wants to have certain tooltips always render flipped to the left will simply be broken, its tooltips will be wrapped and not be moved. Instead of injecting into the raw render methods, in 1.19.3+, TooltipFix should be modifying the HoveredTooltipPositioner class which handles the vanilla logic for positioning and flipping tooltips, or otherwise doing nothing when non-vanilla tooltip positioners are used.

Example in EMI in vanilla:
image

Then EMI with TooltipFix:
image

Some text is not displayed

I'm using the Earth2Java mod, and for some reason the text in the tooltips is cut off. Because of this, it is not possible to read it, because some of the words are simply not visible.
Perhaps this problem is somehow related to the Russian language, but for example, in the Enchanted ToolTips fashion, all the text is displayed correctly.

The text should be written like this:

Так красочно! Сделайте свои здания более яркими и уютными. Но помните, что ковры огнеопасны!

How it actually looks in the game:
ScreenShot00195

Tooltips replaces colors with alternates.

Usually the mod should just make the text italic or create a new line for either bold or normal text, But for some reason it affects colors and causes them to change when the window size does not have enough room to fit.

Expected behavior:
image

Actual behavior:
image

Works with 1.20.6

I have tested the mod in a 1.20.6 instance and it works fine (no crashes, tooltip wraps as expected). Given 1.20.6 had a single change, it also must work with 1.20.5. I would appreciate if you updated the compatible versions on the Modrinth and Curseforge sites!

Does not fix REI tooltips

Enchantment Descriptions (version 0.6.1 for 1.18.1) item tooltips in REI are not fixed. Using ToolTipFix version 1.0.4 for 1.18.1. The enchantment used to generate such a long tooltip is from the mod "Fabric Enchantments" (Vanilla respiration should do the trick though).

2022-01-09_23 14 11

Minecraft is not responding [Multiconnect].

When Tooltip is being rendered as below:
Th-
-is
-a-
to-
-ol
-t-
-ip
it causes minecraft to not respond. Tooltip should be rendered on the left side of the mouse pointer, but it didn't.

Can't start the game...

Im sorry i know i don't give a lot of thing, but my game crashes when i start it ( no game windows appearing ), im using quilt on prism launcher, heavily modded, lot of the error lines are about ToolTipFix, that's why im coming here !

Here the log file. Hope you can help me !

Thank you in advance !
Your Cordialities
-enzomtp

Suggestion, Compatibility and Enhancement(?)

image
This is REI Tooltip
image
This is tooltipfix(even though I have \n in CraftTweaker's script, it apparently doesn't reflect on Vanilla's tooltip. - Long Short, It's a long ass line without your mod)

var text1 = "Mix this in a big puddle with sand \nto produce Quartz Crystals" as string;
var text2 = "Press Shift for more info" as string;
<item:ae2:certus_quartz_dust>.
addShiftTooltip(((text1 + text2) as TextComponent).setStyle(Style.empty().withColor(c_cyan)),(text2 as TextComponent).setStyle(Style.empty().withColor(c_moreinfo)));

So, let it to be able to detect those \n linefeeds, and reflect them accordingly and probly even adjust the tooltip width with the linefeed?

Creative menu tooltips not fixed

Item tooltips in the creative menu are not fixed by this mod.

Tooltips render correctly when switching to the Survival Inventory tab.

2021-06-26_01 10 04

Using ToolTipFix 1.0.3 for 1.17 and Enchantment Descriptions 3.0.11

Modrinth

You might want to publish to Modrinth as well, as it is a growing mod platform.

[Bug] ToolTipFix is a blessing and a curse.

ToolTipFix is wonderful and fixes a lot of "Damn, that's long" or "LF cubes" inbetween \n
But the automatic \n distribution kinda ruins something for me.

I am writing a book for my server. Blablabla
I am using hover texts for like "What subject is on what page?"
E.G:
Summary:

All about milkshakes...........03

All about bubble tea............23

........................................................

If you hover over "All about milkshakes", you should get:
"
Taste page 3
Consistency page 4 to 5
Additives page 6 to 9
...........
"

I am obviously doing this move:
"
Taste page 3\n
Consistency page 4 to 5\n
Additives page 6 to 9
...........
"

But with TooltipFix it results into:
"
Taste page 3
Consistency page 4 to 5
Additives
page 6 to 9
...........
"

which is not ideal :(

Additional information:
I am using software to write the code for my book and it's doing every "\n" into "\\n" which is annoying, but there's an easy fix to it.
And after changing every "\\n" to "\n": Everything looks clean again and looks as intended (with the mod, just tested while writing this).
I guess it doesn't look for "\\n" even though this mod changes these "\\n" to actual actual paragraph breaks. (without you just see "\n" in the actual text with no breaks)

I don't know if it's worth to also look out for "\\n"s, but if it already meddles with these things, might as well
One guy less in the future who's bitchin about it :)

Have a great day and eat good ^-^
Ikibo ||-//

PS: Sorry for not adjusting the title since I now found a solution, but I really like it.

Game crashed caused by ArrayIndexOutOfBoundsException on Minecraft

Random crash:

---- Minecraft Crash Report ----
// Don't do that.

Time: 2022/1/10 下午9:20
Description: Rendering screen

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 1025
	at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap.rehash(Int2ObjectOpenHashMap.java:1334)
	at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap.insert(Int2ObjectOpenHashMap.java:279)
	at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap.computeIfAbsent(Int2ObjectOpenHashMap.java:500)
	at net.minecraft.class_377.method_2011(class_377.java:102)
	at net.minecraft.class_327.method_27516(class_327.java:55)
	at net.minecraft.class_5225.method_27496(class_5225.java:39)
	at net.minecraft.class_5223.method_27477(class_5223.java:17)
	at net.minecraft.class_5223.method_27473(class_5223.java:120)
	at net.minecraft.class_5223.method_27472(class_5223.java:84)
	at net.minecraft.class_5223.method_27479(class_5223.java:80)
	at net.minecraft.class_5225.method_27482(class_5225.java:38)
	at net.minecraft.class_327.method_1727(class_327.java:362)
	at net.kyrptonaught.tooltipfix.Helper.isTooWide(Helper.java:66)
	at net.kyrptonaught.tooltipfix.Helper.doFix(Helper.java:28)
	at net.minecraft.class_437.redirect$bof000$fixWTTData(class_437.java:2717)
	at net.minecraft.class_437.method_32634(class_437.java:173)
	at net.minecraft.class_437.method_25409(class_437.java:169)
	at net.minecraft.class_481.method_25409(class_481.java:733)
	at net.minecraft.class_465.method_2380(class_465.java:190)
	at net.minecraft.class_481.method_25394(class_481.java:694)
	at net.minecraft.class_757.method_3192(class_757.java:875)
	at net.minecraft.class_310.method_1523(class_310.java:1117)
	at net.minecraft.class_310.method_1514(class_310.java:733)
	at net.minecraft.client.main.Main.main(Main.java:238)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:608)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
	at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap.rehash(Int2ObjectOpenHashMap.java:1334)
	at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap.insert(Int2ObjectOpenHashMap.java:279)
	at it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap.computeIfAbsent(Int2ObjectOpenHashMap.java:500)
	at net.minecraft.class_377.method_2011(class_377.java:102)
	at net.minecraft.class_327.method_27516(class_327.java:55)
	at net.minecraft.class_5225.method_27496(class_5225.java:39)
	at net.minecraft.class_5223.method_27477(class_5223.java:17)
	at net.minecraft.class_5223.method_27473(class_5223.java:120)
	at net.minecraft.class_5223.method_27472(class_5223.java:84)
	at net.minecraft.class_5223.method_27479(class_5223.java:80)
	at net.minecraft.class_5225.method_27482(class_5225.java:38)
	at net.minecraft.class_327.method_1727(class_327.java:362)
	at net.kyrptonaught.tooltipfix.Helper.isTooWide(Helper.java:66)
	at net.kyrptonaught.tooltipfix.Helper.doFix(Helper.java:28)
	at net.minecraft.class_437.redirect$bof000$fixWTTData(class_437.java:2717)
	at net.minecraft.class_437.method_32634(class_437.java:173)
	at net.minecraft.class_437.method_25409(class_437.java:169)
	at net.minecraft.class_481.method_25409(class_481.java:733)
	at net.minecraft.class_465.method_2380(class_465.java:190)
	at net.minecraft.class_481.method_25394(class_481.java:694)

-- Screen render details --
Details:
	Screen name: net.minecraft.class_481
	Mouse location: Scaled: (193, 75). Absolute: (1158.000000, 454.000000)
	Screen size: Scaled: (427, 249). Absolute: (2560, 1494). Scale factor of 6.000000
Stacktrace:
	at net.minecraft.class_757.method_3192(class_757.java:875)
	at net.minecraft.class_310.method_1523(class_310.java:1117)
	at net.minecraft.class_310.method_1514(class_310.java:733)
	at net.minecraft.client.main.Main.main(Main.java:238)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:608)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

-- Affected level --
Details:
	All players: 1 total; [class_746['Ghost_chu'/329, l='ClientLevel', x=-94.08, y=66.17, z=91.31]]
	Chunk stats: 4096, 1024
	Level dimension: minecraft:overworld
	Level spawn location: World: (64,88,-1), Section: (at 0,8,15 in 4,5,-1; chunk contains blocks 64,-64,-16 to 79,319,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,-64,-512 to 511,319,-1)
	Level time: 189913 game time, 10171066 day time
	Server brand: §bBilicraft§r§r
	Server type: Non-integrated multiplayer server
Stacktrace:
	at net.minecraft.class_638.method_8538(class_638.java:408)
	at net.minecraft.class_310.method_1587(class_310.java:2402)
	at net.minecraft.class_310.method_1514(class_310.java:752)
	at net.minecraft.client.main.Main.main(Main.java:238)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:608)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

-- Last reload --
Details:
	Reload number: 1
	Reload reason: initial
	Finished: Yes
	Packs: Default, Fabric Mods

-- System Details --
Details:
	Minecraft Version: 1.18.1
	Minecraft Version ID: 1.18.1
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 17.0.1, Eclipse Adoptium
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), Eclipse Adoptium
	Memory: 154119688 bytes (146 MiB) / 1484783616 bytes (1416 MiB) up to 9026142208 bytes (8608 MiB)
	CPUs: 16
	Processor Vendor: AuthenticAMD
	Processor Name: AMD Ryzen 7 5800H with Radeon Graphics         
	Identifier: AuthenticAMD Family 25 Model 80 Stepping 0
	Microarchitecture: Zen 3
	Frequency (GHz): 3.19
	Number of physical packages: 1
	Number of physical CPUs: 8
	Number of logical CPUs: 16
	Graphics card #0 name: NVIDIA GeForce RTX 3070 Laptop GPU
	Graphics card #0 vendor: NVIDIA (0x10de)
	Graphics card #0 VRAM (MB): 4095.00
	Graphics card #0 deviceId: 0x24dd
	Graphics card #0 versionInfo: DriverVersion=30.0.15.1006
	Memory slot #0 capacity (MB): 16384.00
	Memory slot #0 clockSpeed (GHz): 3.20
	Memory slot #0 type: DDR4
	Memory slot #1 capacity (MB): 16384.00
	Memory slot #1 clockSpeed (GHz): 3.20
	Memory slot #1 type: DDR4
	Virtual memory max (MB): 41288.86
	Virtual memory used (MB): 35297.39
	Swap memory total (MB): 8668.80
	Swap memory used (MB): 361.47
	JVM Flags: 6 total; -XX:+UseG1GC -XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmn256m -Xmx8601m
	Fabric Mods: 
		alternatecurrent: Alternate Current 1.1.0
		animatica: Animatica 0.3+1.18
		architectury: Architectury 3.4.9
		authme: Auth Me 2.2.0
		beenfo: Beenfo 1.18.1-fabric0.45.0-1.3.3
		bilicraftclientui: Bilicraft Client UI 0.2.16
		bilicraftdanmaku: Bilicraft Danmaku 0.0.4
		citresewn: CITResewn 0.8.2+1.18.1
		cloth-basic-math: cloth-basic-math 0.6.0
		cloth-config: Cloth Config v6 6.1.48
		com_bilicraft_bilicraftdanmaku-protocol: BilicraftDanmaku-Protocol 1.4-SNAPSHOT
		com_google_guava_guava: guava 31.0.1-jre
		com_velocitypowered_velocity-native: velocity-native 1.1.0-SNAPSHOT
		crowdin-translate: CrowdinTranslate 1.4+1.18
		customlan: Custom LAN 1.18-v2.0.1
		enchantment_lore: Enchantment Lore 1.2.4+MC1.18-1.18.1
		enhanced_attack_indicator: Enhanced Attack Indicator 1.0.2+1.18
		entity-distance: Entity Distance Mod 1.0.4
		fabric: Fabric API 0.45.2+1.18
		fabric-api-base: Fabric API Base 0.4.1+b4f4f6cd65
		fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.5.0+17be577f65
		fabric-biome-api-v1: Fabric Biome API (v1) 6.0.1+ded849a965
		fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.9+3ac43d9565
		fabric-command-api-v1: Fabric Command API (v1) 1.1.6+3ac43d9565
		fabric-commands-v0: Fabric Commands (v0) 0.2.5+b4f4f6cd65
		fabric-containers-v0: Fabric Containers (v0) 0.1.18+d154e2c665
		fabric-content-registries-v0: Fabric Content Registries (v0) 0.4.5+6f53a73d65
		fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.1.8+3ac43d9565
		fabric-dimensions-v1: Fabric Dimensions API (v1) 2.1.9+a1d9bbf565
		fabric-entity-events-v1: Fabric Entity Events (v1) 1.4.5+6b21378a65
		fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.4.16+bfa23f1765
		fabric-events-lifecycle-v0: Fabric Events Lifecycle (v0) 0.2.6+b4f4f6cd65
		fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.10+3ac43d9565
		fabric-item-api-v1: Fabric Item API (v1) 1.3.0+691a79b565
		fabric-item-groups-v0: Fabric Item Groups (v0) 0.3.3+3ac43d9565
		fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.8+c8aba2f365
		fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.6+b4f4f6cd65
		fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 1.4.10+c15ca33565
		fabric-loot-tables-v1: Fabric Loot Tables (v1) 1.0.8+3ac43d9565
		fabric-mining-level-api-v1: Fabric Mining Level API (v1) 1.0.3+3ac43d9565
		fabric-mining-levels-v0: Fabric Mining Levels (v0) 0.1.8+b4f4f6cd65
		fabric-models-v0: Fabric Models (v0) 0.3.3+3ac43d9565
		fabric-networking-api-v1: Fabric Networking API (v1) 1.0.18+3ac43d9565
		fabric-networking-v0: Fabric Networking (v0) 0.3.5+b4f4f6cd65
		fabric-object-builder-api-v1: Fabric Object Builder API (v1) 1.11.1+3b82842e65
		fabric-object-builders-v0: Fabric Object Builders (v0) 0.7.9+3ac43d9565
		fabric-particles-v1: Fabric Particles (v1) 0.2.9+526dc1ac65
		fabric-registry-sync-v0: Fabric Registry Sync (v0) 0.9.0+befed49e65
		fabric-renderer-api-v1: Fabric Renderer API (v1) 0.4.9+3ac43d9565
		fabric-renderer-indigo: Fabric Renderer - Indigo 0.4.12+3ac43d9565
		fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.7+b4f4f6cd65
		fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.4+7242e9d765
		fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 0.1.18+3ac43d9565
		fabric-rendering-v0: Fabric Rendering (v0) 1.1.9+b4f4f6cd65
		fabric-rendering-v1: Fabric Rendering (v1) 1.10.3+6b21378a65
		fabric-resource-loader-v0: Fabric Resource Loader (v0) 0.4.11+3ac43d95c8
		fabric-screen-api-v1: Fabric Screen API (v1) 1.0.7+3ac43d9565
		fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.1.11+3ac43d9565
		fabric-structure-api-v1: Fabric Structure API (v1) 2.0.8+295197a765
		fabric-tag-extensions-v0: Fabric Tag Extensions (v0) 1.2.5+3ac43d9565
		fabric-textures-v0: Fabric Textures (v0) 1.0.9+3ac43d9565
		fabric-tool-attribute-api-v1: Fabric Tool Attribute API (v1) 1.3.5+fb3b57b465
		fabric-transfer-api-v1: Fabric Transfer API (v1) 1.5.6+b4f4f6cd65
		fabricloader: Fabric Loader 0.12.12
		fallingleaves: Falling Leaves 1.8.1+1.18.1
		fix_chat_lag: Non blocking chat 1.0.0
		gbfabrictools: GBfabrictools 1.3.4+1.18
		inspecio: Inspecio 1.2.1+1.18
		iris: Iris 1.1.4
		isometric-renders: Isometric Renders 0.2.11+1.18
		java: OpenJDK 64-Bit Server VM 17
		kappa: Kappa 3.0.2
		krypton: Krypton 0.1.6
		lazydfu: LazyDFU 0.1.2
		minecraft: Minecraft 1.18.1
		modmenu: Mod Menu 3.0.1
		multiconnect: MultiConnect 1.5.10
		multiconnect-api: MultiConnect API 1.5.10
		not-enough-servers: Not Enough Servers 1.0.2
		org_anarres_jcpp: jcpp 1.4.14
		org_joml_joml: joml 1.10.2
		org_slf4j_slf4j-api: slf4j-api 1.7.12
		oro_config: OroArmor Config 2.1.0
		pinglist: PingList 1.3.3
		sodium: Sodium 0.4.0-alpha5+build.9
		soundphysics: Sound Physics 0.5.2
		starlight: Starlight 1.0.0+fabric.d0a3220
		tooltipfix: ToolTip Fix 1.0.4-1.18
		worldmesher: Worldmesher 0.2.5+1.18
	Launched Version: Bilicraft-1.18.1
	Backend library: LWJGL version 3.2.2 build 10
	Backend API: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2 GL version 3.2.0 NVIDIA 510.06, NVIDIA Corporation
	Window size: 2560x1494
	GL Caps: Using framebuffer using OpenGL 3.2
	GL debug messages: 
	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'fabric'
	Type: Client (map_client.txt)
	Graphics mode: fancy
	Resource Packs: vanilla, Fabric Mods
	Current Language: 简体中文 (**)
	CPU: 16x AMD Ryzen 7 5800H with Radeon Graphics 

Wrapping assumes mutable list

Simple example in code here, the list has elements removed, added, and replaced, which assumes the list supports mutable operations. This is true in vanilla contexts, but mods may render tooltips differently. I recently patched my mod to use mutable lists to combat this issue, I assume other mods may have to as well.

1.18.2 Forge Fork (not asking for one)

I was using some mods for 1.18.2 that had massive tooltip cutoff issues, so I went searching and found your mod. However, since this mod is Fabric and I was using Forge, I forked and ported the 1.18 branch for my own purposes. If your interested, feel free to have it.

https://github.com/littlej541/tooltipfix/tree/1.18-forge

If not, I might upload it myself to CurseForge. Wouldn't blame you if you didn't want to potentially get spammed with "where other version?" and "mod not work" for a whole other mod loader.

It doesn't work (1.17)

Expected behavior :

Actual behavior :

mod list :

Is there any other way to activate it? Or is there something I misunderstood? I want to know how to use it. thank you.

Empty lines are removed from tooltips

In item tooltips, lore lines with empty text are removed entirely. The following command gives the player an item that reproduces this issue:

give @s minecraft:egg{display:{Lore:['{"text":"Line 1"}','{"text":""}','{"text":"Line 3"}']}}
Expected Actual
Vanilla appearance of item tooltip Modded appearance of item tooltip

ToolTipFix Crashes when run with Mod Menu

[22:17:05] [main/INFO]: [FabricLoader] Loading 48 mods: [email protected]+ca58154a7d, [email protected], [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected], [email protected]+ca58154a7d, [email protected], [email protected]+c045166c7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, java@8, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected], [email protected]+ca58154a7d, [email protected]+daa38b3d7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+1.16, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d, [email protected]+ca58154a7d
[22:17:05] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/C:/Users/Aaron%20Lawson/AppData/Roaming/.minecraft/libraries/net/fabricmc/sponge-mixin/0.8.2+build.24/sponge-mixin-0.8.2+build.24.jar Service=Knot/Fabric Env=CLIENT
[22:17:08] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[22:17:08] [main/INFO]: Setting user: EricKilla
[22:17:09] [main/INFO]: [Indigo] Registering Indigo renderer!
[22:17:09] [main/INFO]: Backend library: LWJGL version 3.2.2 build 10
[22:17:10] [main/INFO]: Narrator library for x64 successfully loaded
[22:17:10] [main/INFO]: Reloading ResourceManager: Default, Fabric Mods (Fabric Screen Handler API (v1), Fabric Networking Block Entity (v0), Fabric Renderer API (v1), Fabric Key Bindings (v0), Mod Menu, Fabric Command API (v1), Fabric Loader, Fabric Screen API (v1), Fabric Tool Attribute API (v1), Fabric Renderer - Indigo, Fabric Structure API (v1), Fabric Containers (v0), Fabric Object Builder API (v1), Fabric Crash Report Info (v1), Fabric Item API (v1), Fabric Events Interaction (v0), Fabric Game Rule API (v1), Fabric Entity Events (v1), Fabric API Base, Fabric Rendering (v0), Fabric Key Binding API (v1), Fabric Rendering (v1), Fabric Rendering Data Attachment (v1), Fabric Resource Loader (v0), Fabric Textures (v0), Fabric Content Registries (v0), Fabric Tag Extensions (v0), Fabric Biome API (v1), Fabric Rendering Fluids (v1), Fabric Commands (v0), Fabric Registry Sync (v0), Fabric BlockRenderLayer Registration (v1), Fabric Lifecycle Events (v1), Fabric Mining Levels (v0), Fabric Renderer Registries (v1), Fabric Networking API (v1), Fabric Events Lifecycle (v0), Fabric Loot Tables (v1), Fabric API, Fabric Item Groups (v0), Fabric Models (v0), Fabric Particles (v1), Fabric Object Builders (v0), Fabric Networking (v0))
[22:17:14] [main/INFO]: OpenAL initialized.
[22:17:14] [main/INFO]: Sound engine started
[22:17:14] [main/INFO]: Created: 1024x1024x4 minecraft:textures/atlas/blocks.png-atlas
[22:17:14] [main/INFO]: Created: 256x128x4 minecraft:textures/atlas/signs.png-atlas
[22:17:14] [main/INFO]: Created: 1024x512x4 minecraft:textures/atlas/banner_patterns.png-atlas
[22:17:14] [main/INFO]: Created: 1024x512x4 minecraft:textures/atlas/shield_patterns.png-atlas
[22:17:14] [main/INFO]: Created: 256x256x4 minecraft:textures/atlas/chest.png-atlas
[22:17:14] [main/INFO]: Created: 512x256x4 minecraft:textures/atlas/beds.png-atlas
[22:17:14] [main/INFO]: Created: 512x256x4 minecraft:textures/atlas/shulker_boxes.png-atlas
[22:17:14] [main/INFO]: Created: 256x256x0 minecraft:textures/atlas/particles.png-atlas
[22:17:14] [main/INFO]: Created: 256x256x0 minecraft:textures/atlas/paintings.png-atlas
[22:17:14] [main/INFO]: Created: 256x128x0 minecraft:textures/atlas/mob_effects.png-atlas
[22:17:18] [main/WARN]: Warning! Mod tooltipfix has a broken icon, loading default icon
[22:17:23] [main/FATAL]: Reported exception thrown!
net.minecraft.class_148: Rendering screen
	at net.minecraft.class_757.method_3192(class_757.java:625) ~[intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1048) ~[intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:681) [intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:215) [intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51]
	at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51]
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:226) [fabric-loader-0.11.1.jar:?]
	at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:139) [fabric-loader-0.11.1.jar:?]
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:27) [fabric-loader-0.11.1.jar:?]
Caused by: java.lang.ClassCastException: net.minecraft.class_5481$$Lambda$3305/1498187897 cannot be cast to net.minecraft.class_2561
	at net.kyrptonaught.tooltipfix.Helper.doFix(Helper.java:30) ~[tooltipfix-1.0.2-1.16.1.jar:?]
	at net.minecraft.class_437.handler$zdi000$fix(class_437.java:1555) ~[intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at net.minecraft.class_437.method_25417(class_437.java) ~[intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at net.minecraft.class_437.method_25424(class_437.java:128) ~[intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at com.terraformersmc.modmenu.gui.ModsScreen.lambda$init$2(ModsScreen.java:136) ~[modmenu-1.16.4.jar:?]
	at com.terraformersmc.modmenu.gui.ModsScreen$$Lambda$3324/404709812.onTooltip(Unknown Source) ~[?:?]
	at net.minecraft.class_4185.method_25352(class_4185.java:47) ~[intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at com.terraformersmc.modmenu.gui.widget.ModMenuTexturedButtonWidget.method_25359(ModMenuTexturedButtonWidget.java:61) ~[modmenu-1.16.4.jar:?]
	at com.terraformersmc.modmenu.gui.ModsScreen$1.method_25359(ModsScreen.java:156) ~[modmenu-1.16.4.jar:?]
	at net.minecraft.class_339.method_25394(class_339.java:86) ~[intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at com.terraformersmc.modmenu.gui.ModsScreen$1.method_25394(ModsScreen.java:150) ~[modmenu-1.16.4.jar:?]
	at net.minecraft.class_437.method_25394(class_437.java:81) ~[intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	at com.terraformersmc.modmenu.gui.ModsScreen.method_25394(ModsScreen.java:339) ~[modmenu-1.16.4.jar:?]
	at net.minecraft.class_757.method_3192(class_757.java:616) ~[intermediary-fabric-loader-0.11.1-1.16.5.jar:?]
	... 10 more

Running the following: Fabric Loader 0.11.1-1.16.5, Fabric API 0.30.0-1.16, ModMenu 1.16.4 for 1.16.5, ToolTipFix 1.0.2-1.16.1

Issue occurs when opening Mod Options setting box shown below:

https://cdn.discordapp.com/attachments/621951511865327647/806380393430646815/2.PNG

Forge please!

We would be very happy if this mod would also work with the Forge mod loader!
Personally, I don't prefer Fabric so much because sometimes it crashes with some mods (quite a few important mods), and even if I change the version or API, it still doesn't work properly for me :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.