Just Enough Resources (JER)

Just Enough Resources (JER)

163M Downloads

JER doesn't support custom text fonts

Speiger opened this issue ยท 2 comments

commented

o/

We use custom fonts to implement a icon system. Which is the best way to keep it compatible with minecraft mods.
Sadly JER doesn't support or breaks custom fonts when used.
Image

Could you be so nice to fix this issue?

Edit the issue is here:

s += "-" + TranslationHelper.translateAndFormat("enchantment.level." + this.enchantment.getMaxLevel());

Potential Fix

	public Component getTranslatedWithLevels() {
		MutableComponent comp = Component.empty();
		comp.append(this.enchantment.getFullname(1));
		if (this.enchantment.getMinLevel() != this.enchantment.getMaxLevel())
			comp.append("-").append(Component.translatable("enchantment.level." + this.enchantment.getMaxLevel()));
		return comp;
	}
commented

@way2muchnoise fixed a small bug in the code provided.
But in the sense that the Enchantment level was still a string instead of a component.

commented

Seems like a good fix, the raw string work is not current practice anyway. It needs to moved to use components. Will merge this is in :)