The RailType and RailLogic API allows custom rail types to be registered. Vanilla Minecart Track uses this same API.