Support tile names
DoctorFTB opened this issue ยท 4 comments
Hello.
Can you add support tiles which not implements INamedContainerProvider?
My variant realisation:
Add Map<String, String> where key is tile.getClass().getName() and value is key for I18n.
And
https://github.com/Tfarcenim/crafting-station/blob/rewrite/src/main/java/com/tfar/craftingstation/CraftingStationContainer.java#L136
Changed to:
containerNames.add(te instanceof INamedContainerProvider ? ((INamedContainerProvider)te).getDisplayName() : myMap.containsKey(te.getClass().getName()) && LanguageMap.getInstance().exists(myMap.get(te.getClass().getName())) ? new TranslationTextComponent(myMap.get(te.getClass().getName())) : new StringTextComponent("placeholder"));
(Yeah, its one line, but you can use other realisation, its example)
And example for use:
SomeClass.myMap.put(MyClassTile.class.getName(), "translate");
Not understand your question..
Make map, every mod can add localization for support placeholder.