mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-17 10:55:17 +00:00
Implement getCreatorModId on the flower item
Replaces the tooltip containing the creator mod's modid with an override for the method returning it, allowing mods like JEI to show the mod that actually added the flower and return it in mod searches, like Forge's universal bucket already does with mod fluids.
This commit is contained in:
1 parent
15f71c8a53
commit
04cbee8ae7
1 file changed
+7
-3
@@ -104,10 +104,14 @@ public class ItemBlockSpecialFlower extends ItemBlockMod implements IRecipeKeyPr
|
||||
if(!refLocalized.equals(refUnlocalized))
|
||||
stacks.add(TextFormatting.ITALIC + refLocalized);
|
||||
}
|
||||
}
|
||||
|
||||
String mod = BotaniaAPI.subTileMods.get(type);
|
||||
if(mod != null && !mod.equals(LibMisc.MOD_ID))
|
||||
stacks.add(TextFormatting.ITALIC + "[" + mod + "]");
|
||||
@Override
|
||||
public String getCreatorModId(ItemStack itemStack) {
|
||||
String mod = BotaniaAPI.subTileMods.get(getType(itemStack));
|
||||
if(mod != null)
|
||||
return mod;
|
||||
return LibMisc.MOD_ID;
|
||||
}
|
||||
|
||||
public static String getType(ItemStack stack) {
|
||||
|
||||
Reference in new issue
Block a user