|View Issue Details [ Jump to Notes ] ||[ Issue History ] [ Print ] |
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000166||tAPI||Items||public||2015-05-28 14:45||2015-06-10 09:08|
|Assigned To|| |
|Product Version||184.108.40.206 r15|| |
|Target Version||Fixed in Version|| |
|Summary||0000166: CraftGroups are not named using their displayName|
|Description||If you use a CraftGroup multiple times, the first recipe using it works as expected. However all the other recipes using that group will show up (for example in the guide crafting gui) with their name instead of their display name because they don't have one.|
This is caused by the RecipeResolver which creates a GroupItem the first time the group is used in a Recipe and saves it into ItemDef.
Additional items that use this group will use that previously created item, BUT COPY IT! The reference of this item copy will not be saved into ItemDef.
Now if the CraftGroupResolver sets the display name it will only set it for the original item defined in ItemDef, but not for the copied ones. This causes the recipes besides the first one to have a wrongly named CraftGroup inside of them.
|Steps To Reproduce||Create multiple recipes using one CraftGroup|
|Additional Information||To fix this in my mod I just made a custom RecipeResolver which hangs on to the reference until OnLoad on my ModBase is called. Then it sets the displayName of each of those item copies to ItemDef.byType[itemCopy.type]|
|Tags||No tags attached.|