Dunkmania101 / SpatialHarvesters

A Minecraft mod that adds harvesters that gather resources from space-time itself!
https://www.curseforge.com/minecraft/mc-mods/spatial-harvesters
MIT License
3 stars 5 forks source link

[1.16] Tooltips on key items all one line, get cut off #25

Closed kwpugh closed 3 years ago

kwpugh commented 3 years ago

Hi,

This looks really nice. One thing, the tooltip for the keys are very long and on one line, so they get cut off depending on your screen resolution. Might be helpful if you multi-line them.

Great job on the block textures too.

Dunkmania101 commented 3 years ago

Thanks! I actually didn't do any of the current item textures as someone had sent them to me as a great improvement on the old ones, although the block models are mine. They also redid the textures for the faces and numbered tops of the blocks, although they're similar to the originals.

Anyway, I tried to fix the tooltips in the Forge version a while back by adding newlines in them, but they just rendered as little boxes. Forge eventually fixed it themselves. As for the Fabric version, there's a mod called ToolTipFix that could help, although it hasn't been updated since October. Its latest version is for 1.16.4, although I suspect it'll work in 1.16.5 too.

kwpugh commented 3 years ago

Ok, I will take a look at that.

As a mod dev, I found it easer to break longer tool tips into smaller phrases

lang file: "item.gobber2.gobber2_ring_miner.tip1": "Breaks most vanilla blocks around the player", "item.gobber2.gobber2_ring_miner.tip2": "Sneak + right-click to set area to break 11x5x11", "item.gobber2.gobber2_ring_miner.tip3": "Right-click to break blocks in set area", "item.gobber2.gobber2_ring_miner.tip6": "Area of effect: 11x5x11",

with different phrases on lines, I can then color code them by type, like green for description, yellow for usage, red for status, etc.

Just sharing, keep up the good work.

Dunkmania101 commented 3 years ago

I was considering that and decided against it for some reason that I can't remember now :) I went so far as to try turning the line into a string, splitting it by an identifier or just ". " and for-loop adding the result to the tooltip. Then I realized that Fabric handles newlines in lang files perfectly fine. Efficiency! He... hehe... programming.

Anyway, I'll release a new version with that in a bit. I might try the color-coding thing, too. Thanks!

It also took me way too long to realize that you're the one who made Gobber :)

kwpugh commented 3 years ago

Thank you.

I've been playing on a small Fabric server of late and a good, simple quarry kind of system is really needed. The quarries from Tech Reborn and Modern Industrialization are quite lacking. Now if I can just figure out how your's work...

Keep it up!

Dunkmania101 commented 3 years ago

Should be fixed in 0.10.3, along with the config and the tags. Thanks!