Support for custom tag types
pupnewfster opened this issue ยท 2 comments
I am adding a few custom EmiStack types, and would like a way to also teach EMI about their corresponding tags. From doing a brief glance through my github/viewing usages in my IDE), I believe the main spots that would need some sort of support are:
TagEmiIngredient#render
, a way to specify if the amount should be rendered or similar to the fluid one be skippedTagEmiIngredient#getTooltip
, a way to specify that the amount should be added to the tooltipEmiIngredient#of(List<? extends EmiIngredient> list, long amount)
, a way to check if the key is an instance and has a corresponding tag typeEmiTags#getRawValues
, a way to let EMI know how to create corresponding EmiStacks for custom registriesEmiTags#getIngredient(Class<T> clazz, List<EmiStack> stacks, long amount)
, a way to specify what registry to check against based on the typeEmiTags#stackFromKey
, a way to create stacks for custom tag registries
I might have missed some use cases as I didn't setup an EMI workspace to browse the actual code, but I think I found at least a good start.
Version: 1.1.1+1.20.4
It may push my next update back but I would like to get this in as soon as possible, as I believe it wouldn't be too unreasonable. Right now the core features of tag integration are specifying a registry, class, and a way to construct a stack from an element of that registry, which is not unreasonable. Additionally, a method for appending to the tooltip between the name and the mod name would be reasonable, but perhaps it'd be better for this to be automatic based on the amount rendering solution required for #482. I'll just have to poke around and see, but I imagine these bugs will be linked.