Jade ๐Ÿ”

Jade ๐Ÿ”

155M Downloads

Removing lines from a tooltip

Closed this issue ยท 4 comments

commented

Mod loader

NeoForge

Minecraft version

1.21.1

Mod version

15.10.0

Modloader version

NeoForge: 21.1.137

Modpack info

No response

[IMPORTANT] If bug:

  • I have confirmed this bug is reproducible on a minimal setup, not a modpack with many other mods.

[IMPORTANT] If bug: The latest.log file, not the crash report

No response

Issue description

In my mod, I have it where if you press SHIFT, it shows you more info. I want to hide that and just show the gasses and amount contained.

it's programmer art, temp texture
Image

commented

I guess you could check to see there is an open screen

commented

I've never made Jade comapt before... could you help guide?

commented
public void appendHoverText(ItemStack stack, TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
	if (tooltipFlag.hasShiftDown() || (FMLEnvironment.dist.isClient() && Minecraft.getInstance().screen == null)) {
		// ...
	} else {
		// ...
	}
}
commented

Oh, thanks