ArcanePigeon / MobScarecrow

A mod for minecraft that adds a scarecrow to keep mobs away from your base.
3 stars 1 forks source link

Tooltips #15

Open Khytwel opened 2 years ago

Khytwel commented 2 years ago

Hi,

It seems that it is currently impossible to change the tooltips, even by directly modifying the en_us file in the mod.

(I use the lastest version in 1.18.2, I do not know if it works in 1.19)

ArcanePigeon commented 2 years ago

the tooltips are made normally by having the items append tooltip point to the lang file. there was an issue in 0.5.0 where gold and void keys/locks pointed to the wrong item and was fixed in 0.5.1. which ones were you trying to modify?

ArcanePigeon commented 2 years ago

oh i thought this was my probably chests repo. oops. ill take a look in a min

ArcanePigeon commented 2 years ago

you are modifying the tooltip.shift values right? "item.mobscarecrow.default_scarecrow.tooltip.shift": "§6Scares Hostile Mobs", "item.mobscarecrow.generic_scarecrow.tooltip" : "Press §eSHIFT§r for more Information",

Khytwel commented 2 years ago

Yes it is, especially the first one to add the distance

ArcanePigeon commented 2 years ago

Are you using a resource pack to modify the lang file and if so is it above the fabric resources pack in the pack order? or are you using kubejs?

Khytwel commented 2 years ago

I use KubeJS

ArcanePigeon commented 2 years ago

I generate all the item tooltips using an enum that has a string id attached to each scarecrow type here https://github.com/ReillyGregorio/MobScarecrow/blob/c5b85b1ea8407e760ba42f7b25f12ffc261e9ab7/src/main/java/org/cloudwarp/mobscarecrow/blockdetails/ScarecrowItem.java#L83 I do this to reduce the amount of files and lines I have to make. I am not sure of another way to fix the issue other than creating a bunch of redundant code so I would recommend you message the developer of KubeJS about the issue and see what they think.

Khytwel commented 2 years ago

Afterwards, even by directly modifying the en_us, it does not work. So maybe an option to disable the tooltips?

ArcanePigeon commented 2 years ago

That is very strange, I will look into adding an option to disable the tooltips.