Request: Get display name from inventory
ShetiPhian opened this issue ยท 1 comments
Note: The change is noticeable at the Tinkers' Construct Crafting Station, but the code change is here in Mantle.
Could BaseContainer.getInventoryDisplayName() also check if itemHandler is an instance of InvWrapper and if so return its name?
This enables a different name to be provided for each InvWrapper, and enables a name to be displayed even if the TileEntity doesn't implement IWorldNameable.
For testing I added this before the existing if(tile instanceof IWorldNameable)
if (itemHandler instanceof InvWrapper) {
ITextComponent textName = ((InvWrapper) itemHandler).getInv().getDisplayName();
if (textName != null) {
return textName.getFormattedText();
}
}