Search in sources :

Example 1 with EntityEntry

use of net.minecraftforge.fml.common.registry.EntityEntry in project ConvenientAdditions by Necr0.

the class ItemMobCatcher method addInformation.

@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
    super.addInformation(stack, player, tooltip, advanced);
    tooltip.add(Helper.localize("tooltip." + ModConstants.Mod.MODID + ":" + ModConstants.ItemNames.mobCatcher + ".strength", type.captureStrength));
    tooltip.add(Helper.localize("tooltip." + ModConstants.Mod.MODID + ":" + ModConstants.ItemNames.mobCatcher + ".hostile", type.captureHostile ? Helper.localize(ModConstants.Mod.MODID + ":yes") : Helper.localize(ModConstants.Mod.MODID + ":no")));
    tooltip.add(Helper.localize("tooltip." + ModConstants.Mod.MODID + ":" + ModConstants.ItemNames.mobCatcher + ".boss", type.captureBoss ? Helper.localize(ModConstants.Mod.MODID + ":yes") : Helper.localize(ModConstants.Mod.MODID + ":no")));
    if (isHoldingMob(stack)) {
        EntityEntry entry = ForgeRegistries.ENTITIES.getValue(new ResourceLocation(getEntityId(stack)));
        if (entry != null)
            tooltip.add(Helper.localize("tooltip." + ModConstants.Mod.MODID + ":mobCatcherHoldingEntity", Helper.localize("entity." + entry.getName() + ".name")));
        else
            tooltip.add(Helper.localize("tooltip." + ModConstants.Mod.MODID + ":mobCatcherHoldingEntity", "?"));
    } else
        tooltip.add(Helper.localize("tooltip." + ModConstants.Mod.MODID + ":mobCatcherHoldingEntity", Helper.localize(ModConstants.Mod.MODID + ":none")));
}
Also used : EntityEntry(net.minecraftforge.fml.common.registry.EntityEntry) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

EntityEntry (net.minecraftforge.fml.common.registry.EntityEntry)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1