```groovy import net.minecraft.init.MobEffects import net.minecraft.entity.player.EntityPlayer import net.minecraft.item.ItemStack import com.hbm.hazard.modifier.HazardModifier import net.minecraft.util.text.TextFormatting import net.minecraft.client.resources.I18n mods.hbm.hazards.register("egg", { unstable(1.0, (living, stack, level) -> { if (living.isPotionActive(MobEffects.POISON)) { living.removePotionEffect(MobEffects.POISON) stack.setCount(stack.getCount() - 1) } }, (entityItem, level) -> { }, (EntityPlayer player, List list, double level, ItemStack stack, List<HazardModifier> modifiers) -> { list.add("§2§l[Удаляет отравление]") }) }) ``` Problem with list.add("§2§l[Удаляет отравление]"), in minecraft this text turn in: <img width="729" height="136" alt="Image" src="https://github.com/user-attachments/assets/8919d09e-301e-48f9-b36b-5360eb9fe147" />
Activity
WaitingIdly commentedon Oct 18, 2025
testing with this script:
makes every item have the correct tooltip text:

are you sure your file is encoded properly? it should be in
UTF-8.while this is unlikely to solve your issue, i would also suggest using lang keys and translation files instead of the raw text
seferlian commentedon Oct 18, 2025
Yes, the file is encoded in UTF-8, but for some reason my problem still persists with new script. Although all mods have normal encoding.
seferlian commentedon Oct 18, 2025
Saved the file in ANSI encoding solved the problem.
But this is only a partial solution to the problem, as I cannot use Unicode characters here.