Reliquary Reincarnations

Reliquary Reincarnations

71M Downloads

[1.18.2] Mob charm fragments' JEI description placeholders not replaced correctly

yanang007 opened this issue ยท 2 comments

commented

Game version: 1.18.2
Mod version: Reliquary 1.18.2-2.0.8.1139

Step to reproduce:

  1. Open usages for Skeleton Charm Fragment (any other Mob Charm Fragment also works)
  2. The item description shows that "Skeleton Charm Fragment is a crafting component of Charm"

Possible cause is this:

private static void registerCharmBasedItems(IRecipeRegistration registration, Item item, Function<ItemStack, ResourceLocation> getEntityRegistryName) {
NonNullList<ItemStack> subItems = NonNullList.create();
item.fillItemCategory(Reliquary.ITEM_GROUP, subItems);
for (ItemStack subItem : subItems) {
EntityType<?> entityType = ForgeRegistries.ENTITIES.getValue(getEntityRegistryName.apply(subItem));
if (entityType == null) {
continue;
}
String path = RegistryHelper.getRegistryName(item).getPath();
String itemDescriptionKey = String.format("jei.%s.description.%s", Reference.MOD_ID, path.replace('/', '.'));
String entityName = entityType.getDescription().getString();
registration.addIngredientInfo(subItem, VanillaTypes.ITEM, new TranslatableComponent(itemDescriptionKey, entityName));
}
}

where
registration.addIngredientInfo(subItem, VanillaTypes.ITEM, new TranslatableComponent(itemDescriptionKey, entityName));

doesn't replace the second placeholder in the description "%s Charm Fragment is a crafting component of %s Charm"

commented

Fixed in the latest release

commented

Thanks!